-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Extension doesn't work behind an autoconfigured web proxy #22
Comments
Hi Johannes, we don't currently handle that case at all. We use Soup to fetch the json & images, so it shouldn't be impossible to implement. If you are aware of a GNOME extension that has a working implementation that you'd recommend can you let me know? I don't have a way to test this, so it could be a pain to build something from scratch. |
We use the Soup proxy resolver, which seems like it should use the GNOME settings. Can you tell me what errors you are seeing with journalctl? |
Hello neffo |
No problem, thanks for submitting the ticket though. The error seems to be this one: That suggests the proxy autodetection is either ignoring the GNOME settings or it's unable to use the proxy to look up hostnames? Ugh. |
I also sit behind a corporate proxy and fetching the images doesn't work for me. but with a different error:
If I could somehow help with debugging, I'm open to doing so - I'm also a developer, but I have zero experience with Gnome extension development, so I might need some guidance. In my case, the proxy is without authentication, and I use Ubuntu 20.04 with Gnome 3.36.8 |
This is a long standing bug, which I don't have a direct way to test. If you are able to checkout version-41 branch of this repo, you could test if this simple fix corrects it #170 . My understanding is that this proxy resolver should already be enabled by default, but that is based on documentation alone (not tested). |
I tried uninstalling version from gnome extension page using gnome extensions app, installing version from the branch using included
PS: In the about tab in settings, I still see version 40, but I guess, based on the diff of #170 it is correct, right? |
Thanks for helping debug this. Ok just pushed a new commit which will dump Soup headers, if you want to enable debug logging it should hopefully output something like this:
|
Of course, internet connection works perfectly fine for other apps at the same moment (using that corporate proxy) |
Doesn't seem to be using proxy at all, no. However, if I set my proxy to 'test:8080' (not a real host) in GNOME settings I get this:
This suggests the proxy detection is doing something for me. I suspect your proxy is set up a bit different however. Does wget work for that link above? Update: Looks like the detection of proxies might be a bit timing related. We're currently using a persistent session, but the detection seems to a one time thing as a result (which might be a problem if the proxy changes). Perhaps we could cycle the session if the GNOME system proxy changes? |
Aha, when I set proxy mode to "manual" in Gnome, then the download works! But for general usage, I need to use the automatic mode, so the system downloads pac file with some more complex rules from our proxy server and that obviously doesn't work with the extension |
Right, ok so as I suspected it might be timing related. This might need some reworking. This is technically possible if there is a signal (such as dconf key changing) when the pac file is downloaded we can restart the session to handle the changes. (Or it could be that it doesn't work with pac file proxy settings, which would be annoying.) Possible this key would work: |
Ok, I have just committed a change that will create a new Soup session on refresh. It's possible the proxy settings are fixed by creating a session at startup. Creating a new one each refresh might solve a (possible) timing issue. |
Thanks, I'll test it next week, when I'm in the office again and I'll let you know |
Any word on if this helped with this issue? |
Oh, sorry, I completely forgot and I was in the office yesterday.... I'll put a reminder to my calendar for a next week |
Ok I've been testing this locally and for some reason libsoup (or at least the way I'm using it) doesn't acknowledge auto configured proxies (even with changes I've made). It's not timing related (as I suspected above), so nothing will have changed. It's like the proxy resolver is not picking up any proxy at all, even with a very simple .PAC file:
Using manual proxy works just fine (so confirming what you said):
|
Just to confirm your observation, even the latest commits from the
|
Thanks for confirming (means my testing approach was useful), I've actually had a lot of trouble tracking this one down. I'm not sure libsoup actually knows what to do with .pac files. It seems to use a simple proxy lookup that appears to just look at protocols (aka the http/https/socks part of the url). I might raise a ticket upstream. An alternative, hacky method would be to manually set a proxy host within the extension but that doesn't seem the 'right' way to do it. |
Personally, I would raise the ticket in the lib. This ticket is open for more than 4 years without getting too much attention, so I don't think it's worth implementing some hacky solution on your side. |
@neffo Did you close this one on purpose? I guess you'll just wait for a fix in the library, right? |
Yep, was closed automatically. Reopened, pending a miracle (or a work around). |
Hello
I'm behind a proxy (with authentication).
In Debian I set all the proxy-stuff and also "org.gnome"-proxy-settings are set.
But I get "A network error occured: 2" as message.
How can I add proxy-informations to the script?
regards
Johannes
The text was updated successfully, but these errors were encountered: