treq icon indicating copy to clipboard operation
treq copied to clipboard

HTTP_PROXY et al. Environment Vars Not Supported

Open 0cjs opened this issue 6 years ago • 3 comments

Unlike requests, treq doesn't support the (semi-standard) environment variables for proxy configuration, such as HTTP_PROXY, https_proxy, no_proxy and others. This makes it unusable in some applications, such on company networks that do not allow direct Internet access.

This is a separate concern from issue #174 and corresponding PR #130: those appear to talk about/provide only programatic proxy support, which would still require users running third-party code that uses treq to change that third-party code if they must use a proxy. (That said, integrating PR #130 would still be helpful to me in some situations, so I'd still encourage integrating it ASAP.)

0cjs avatar Jan 24 '19 06:01 0cjs

Oh, just in case whomever might work on this is not aware, requests uses urllib.requests.getproxies() to retrive proxy information from the environment (including MacOS X system configuration and the Windows registry, where applicable), so that's what should be used here, too, though there's still further processing required for no_proxy and perhaps all_proxy and other things.

0cjs avatar Jan 24 '19 07:01 0cjs

This would be handy!

glyph avatar Feb 19 '19 06:02 glyph

+1

aigr avatar Apr 15 '19 09:04 aigr