feat: add support for https_proxy environment variable (#415)#650
feat: add support for https_proxy environment variable (#415)#650recreators01 wants to merge 2 commits into
Conversation
|
Please rebase your PR properly on top of current |
ok |
|
Close:#415 |
| http_pool: PoolManager | ||
| if "https_proxy" in os.environ: | ||
| http_pool = ProxyManager( | ||
| proxy_url=os.environ["https_proxy"], |
There was a problem hiding this comment.
Is lowercase https_proxy a common env variable or something you came up with for this PR? If it isn't common, IMO it would better to be uppercase, and specific to UMU, i.e. UMU_HTTP_PROXY to match the existing UMU_HTTP_RETRIES and UMU_HTTP_TIMEOUT
There was a problem hiding this comment.
Common env variable. Most app use it, e.g. curl wget git python urllib/urllib2.
There was a problem hiding this comment.
I see, for future reference this is the rationale curl provides: https://everything.curl.dev/usingcurl/proxies/env.html#http_proxy-in-lower-case-only
https_proxyshould be enough.Regarding the changes to
umu_runtime.py, the URL must include a scheme when usingProxyManager; otherwise, it will not work.