-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shouldn env_proxy
affect after proxy that provided by users from code
#10025
Comments
Sorry, I re-read the message several times and still cannot figure out what is the question. |
|
Thanks for the clarification. |
Can you create a test in a PR to reproduce the issue? |
was mistake. if proxy is not None:
proxy = URL(proxy)
elif self._trust_env:
with suppress(LookupError):
proxy, proxy_auth = get_env_proxy_for_url(url) the issues only are:
|
Could probably cache one of those functions if you wanted to open a PR. |
Lines 306 to 320 in 1fa237f
but the proxies_from_env() is no parameter, compared to cache it, I think it can just be stored in session level.and the explicitly throw error for socks5 proxy not supported should be in a different PR? |
Yeah, I think that sounds reasonable. |
the |
Is your feature request related to a problem?
aiohttp/aiohttp/client.py
Lines 502 to 507 in e79b2d5
aiohttp/aiohttp/client.py
Lines 609 to 617 in e79b2d5
currently, the
async def _request(...)
get env proxy
fromenv and registry
in each request(aka _request()) call.Describe the solution you'd like
keep
env proxy
in session, and use aftercode proxy
that provided by usersalso should throw error for
socks5
proxy since aiohttp does not work withsocks5
currentlyDescribe alternatives you've considered
N/A
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: