Conan: Problem with custom proxy settings when ALL_PROXY is defined

Created on 28 Aug 2019  路  2Comments  路  Source: conan-io/conan

I have problems with local repository when using system proxy variables (ALL_PROXY, HTTP_PROXY, etc.) and custom proxy settings in conan config, as described in documentation (http, https, no_proxy_match)

After investigation of the problem, i found, that the key problem was with ALL_PROXY variable:

I think the problem is here: https://github.com/conan-io/conan/blob/master/conans/client/rest/conan_requester.py#L118

for var_name in ("http_proxy", "https_proxy", "no_proxy"):
    popped = True if os.environ.pop(var_name, None) else popped
    popped = True if os.environ.pop(var_name.upper(), None) else popped

This script removes proxy-variables from environment, including no_proxy, but ALL_PROXY remains, so requests tries to connect to the repository through proxy.
I think adding all_proxy to this code can fix problem.

To reproduce the problem:
Use last conan build (1.18.1) from pypi

  1. Set environment variable ALL_PROXY
  2. Set http, https variables, and no_proxy_match for local repository in conan-config
  3. Try to install some package from local repository.
low good first issue medium review bug

All 2 comments

Thanks for pointing it out, I would probably add the ftp_proxy too (https://curl.haxx.se/docs/manual.html)

I want to contribute to this fix since it's trival.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zomeck picture zomeck  路  3Comments

zlalanne picture zlalanne  路  3Comments

uilianries picture uilianries  路  3Comments

rconde01 picture rconde01  路  3Comments

bobeff picture bobeff  路  3Comments