Repository: conan-io/conan

Issue:
Problem with custom proxy settings when ALL_PROXY is defined
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](url)
```
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.





Problem with custom proxy settings when ALL_PROXY is defined
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](url)
```
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.







Discussion:
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.
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.

Resolving patch:
diff --git a/conans/client/rest/conan_requester.py b/conans/client/rest/conan_requester.py
--- a/conans/client/rest/conan_requester.py
+++ b/conans/client/rest/conan_requester.py
@@ -115,7 +115,7 @@ def _call_method(self, method, url, **kwargs):
         if self.proxies or self._no_proxy_match:
             old_env = dict(os.environ)
             # Clean the proxies from the environ and use the conan specified proxies
-            for var_name in ("http_proxy", "https_proxy", "no_proxy"):
+            for var_name in ("http_proxy", "https_proxy", "ftp_proxy", "all_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
         try:


Test patch: