Skip to content
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

Let QGIS make use of System's Default Proxy always #53424

Closed
wants to merge 1 commit into from

Conversation

rduivenvoorde
Copy link
Contributor

@rduivenvoorde rduivenvoorde commented Jun 9, 2023

(also for discussion, OR if people think this change will be a problem for some users...)

QGIS always had NO proxy settings enabled.
In my experience with users is that it is hard for them to 'just install QGIS and use it' when they are behind a proxy...

So we tell QGIS/Qt to use the Default System Proxy, IF set in the environment.
For what I understand, this is what for example Google Chrome is also doing: just listen to the System's Proxy

Reasoning is, that now for people behind a (institutional web) proxy they have to find out how to set the proxy (and which one). While in all/most environments these settings are available in the environment.

And users NOT having a proxy will not be affected by this change (?).

Reasoning is, that now for people behind a (institutional web) proxy they
have to find out how to set the proxy (and which one).
While in all/most environments these settings are available in the environment.

And users NOT having a proxy will not be affected by this change (?).
@github-actions github-actions bot added this to the 3.32.0 milestone Jun 9, 2023
@rduivenvoorde rduivenvoorde reopened this Jun 12, 2023
@rduivenvoorde
Copy link
Contributor Author

Ok, one of the differences between 'Use System Proxy' and setting the proxy yourself is with feed.qgis.org...

See #53456

Not sure if this is an argument to NOT do this PR though...

@gdt
Copy link
Contributor

gdt commented Jun 19, 2023

I don't follow the ? after "users not having a system default will not be affected". I think it needs to be really clear that if there is no system proxy configured, nothing changes.

I'm also not clear on how one configures a system default proxy in a portable way. I can't tell from the PR whether this is an environment variable, or if there are OS-specific mechanisms wrapped by QT.

Overall, I don't mean to say "this is a bad change". It's more "from reading the PR I cannot understand the argument that this change is correct".

@rduivenvoorde
Copy link
Contributor Author

I don't follow the ? after "users not having a system default will not be affected". I think it needs to be really clear that if there is no system proxy configured, nothing changes.

Well, the question mark is there because I cannot test every environment. But in my experience using QGIS in proxied/non-proxied environments (I work for clients who are behind a proxy, and at home there is no proxy) the 'use default proxy' just works.

I'm also not clear on how one configures a system default proxy in a portable way. I can't tell from the PR whether this is an environment variable, or if there are OS-specific mechanisms wrapped by QT.

For what I know it is wrapped by Qt.. I use this 'Use Default Proxy' setting both on Windows machines and Linux machines in proxied environments, that these just work. Also if I am at home and there is no proxy anymore.

If I disable the proxy on a Windows machine in a proxied environment then proxy in QGIS is also gone (in 'Use Default Proxy' mode)
I disable the windows proxy by

  • opening Chrome
  • opening settings
  • searching for 'proxy'
  • clicking the 'Open your computer's proxy settings'
  • there (it brings you to Windows settings somewhere))
    So I think proxy settings in Window can both come from environment and from this inner Windows stuff above...

So the question mark is actually a question for people who are NOT behind a proxy to enable the proxy and set it to 'Use Default system's proxy' and check if QGIS is still able to retrieve content form outside LAN

@nyalldawson
Copy link
Collaborator

@rduivenvoorde

I'm +1 to this change, but I suggest we wait until post-3.32 release to merge.

This PR is also incomplete, in that there's a bunch of other places where the proxy/proxyEnabled setting is read where the default also needs to be updated. (And ideally it would use the newer settings registry approach instead). I'm happy to do these changes if you'd like, or I can hold off if you're up to tackling them!

@rduivenvoorde
Copy link
Contributor Author

@nyalldawson please do, I thought everywhere this would be picked up (as I thought networkmanager is setup here).

No stress about which version, it's just one of those UI/user hick ups I see at clients with proxies (most/all governmental/municipalities, THE target for QGIS here in NL).

FYI: this is a screenie of a just installed Chrome. You cannot even instruct chrome to behave other then the OS.
And the OS here, is set on 'automatically detect settings', not sure if Chrome then picks this up, or if network requests are actually handled via Windows (host.exe?)...
For Linux it would be even greater to have an option 'follow OS settings' or so (which then could look for http(s)_proxy env params... but probably start with your proposal :-)

Screenshot from 2023-06-20 10-18-41

@pathmapper
Copy link
Contributor

Should be clear, but wanted to mention it :-)

When QGIS uses the systems default proxy in the future, there would be still a need to have the option to exclude certain URLs from using the proxy:

grafik


This change using the system proxy would match the behaviour of QGIS already using System Root Authorities:
grafik


All in all I'm also +1 for this change as this would make setting up QGIS behind proxy easier.

Don't know if there are use cases where one would like to set a proxy for QGIS other than the system proxy though.

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 5, 2023
@github-actions
Copy link

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@github-actions github-actions bot closed this Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Uh oh! Seems this work is abandoned, and the PR is about to close.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants