You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proxies should use proxy_ssl_context when connecting via ProxyConfig.use_forwarding_for_https = True #2577
This was discovered in #2558 and discussed with @jalopezsilva on Discord. The gist is it appears that we're using HTTPSConnection.ssl_context to connect to HTTPS proxies when using use_forwarding_with_https = True mode. This is likely caused by us treating the proxy like it's the origin when we have proxies in "forwarding" mode and previously we didn't have a forwarding mode for HTTPS.
When ProxyConfig.use_forwarding_with_https = True and ssl_context is specified:
If proxy_ssl_context is specified then error out with ValueError
If proxy_ssl_context isn't specified:
On 1.26.x emit a DeprecationWarning instructing to switch to proxy_ssl_context and set the value of ssl_context to proxy_ssl_context
On 2.x raise a ValueError that proxy_ssl_context should be used, not ssl_context.
Only proxy_ssl_context should be used for creating the connection to proxies in all modes (HTTP->HTTPS, HTTPS->HTTP, HTTPS->HTTPS, in forwarding/tunnel modes).
Remove the skip to test_proxy_https_target_tls_error added in 9f4d05c
Hey @abebeos , I only ever got as far as adding the ValueError exception and a unit test for it. I'm not going to be finishing this change so feel free to reuse anything that's useful off my draft PR.
changed the title [-]Proxies should use proxy_ssl_context when connecting via ProxyConfig.use_forwarding_with_https = True[/-][+]Proxies should use proxy_ssl_context when connecting via ProxyConfig.use_forwarding_for_https = True[/+]on Jun 1, 2026
Activity
Skip expected failure due to urllib3#2577
Use proxy_ssl_context as SSL ctx when forwarding
Use proxy_ssl_context as SSL ctx when forwarding
Remove deprecated setting of ssl_context
Remove deprecated setting of ssl_context
fyunusa commentedon Aug 13, 2022
Hi @sethmlarson have this issue been fixed ?
I propose this patch for the 2.x version
pquentin commentedon Aug 19, 2022
You will need a pull request with tests before we can review your code.
fyunusa commentedon Aug 19, 2022
OK @pquentin noted I'll work on that also
sethmlarson commentedon Aug 19, 2022
@umarfarouk98 this issue is already being worked on by @avi364 I think in #2651?
fyunusa commentedon Aug 19, 2022
OK yeah, I see that
sg3-141-592 commentedon Jan 15, 2024
Hey @abebeos , I only ever got as far as adding the ValueError exception and a unit test for it. I'm not going to be finishing this change so feel free to reuse anything that's useful off my draft PR.
alexprabhat99 commentedon Sep 21, 2024
Hi @sethmlarson
Is this issue fixed or still accepting PRs?
Fix proxy_ssl_context ignored for HTTPS forwarding proxies
[-]Proxies should use proxy_ssl_context when connecting via ProxyConfig.use_forwarding_with_https = True[/-][+]Proxies should use proxy_ssl_context when connecting via ProxyConfig.use_forwarding_for_https = True[/+]Merge 'build(deps): bump urllib3 from 2.7.0 to 2.8.0' from app/depend…