Merge pull request #3540 from mjauvin/system-proxy

document proxy environment variable for system proxy
This commit is contained in:
Florian Bruhin 2018-01-30 15:56:53 +01:00 committed by GitHub
commit fb5d0f7e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,8 @@ class ProxyFactory(QNetworkProxyFactory):
"""
proxy = config.val.content.proxy
if proxy is configtypes.SYSTEM_PROXY:
# On Linux, use "export http_proxy=socks5://host:port" to manually set system proxy
# ref. http://doc.qt.io/qt-5/qnetworkproxyfactory.html#systemProxyForQuery
proxies = QNetworkProxyFactory.systemProxyForQuery(query)
elif isinstance(proxy, pac.PACFetcher):
proxies = proxy.resolve(query)