-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Support for proxy that requires DigestAuth #6025
Comments
Hi @raffaem, Can you try using the |
Nada, it fails even with requests 2.25.1 Here is the code:
Here is the output:
Works fine with the implementation of Tey' from StackOverflow |
Thanks for checking @raffaem. Looking at the StackOverflow post, there's some pretty extensive monkey-patching for both Requests, urllib3 and httplib to make this possible. This isn't something we're likely to ever add directly to Requests and I'm doubtful it would even make it into the Requests toolbelt. Unfortunately, I don't see a clean way for us to do this with what's currently exposed from urllib3/httplib. |
Uhm can we work with
|
You can read all of the patching changes made here, with several of them overriding behavior from the standard library. That would require changes to CPython itself, meaning the earliest this behavior could be available is in 3.11 or 3.12. We'd need someone to drive those changes to expose APIs for urllib3 to do this, or potentially rework how urllib3 interacts with That's all going to be an extremely time intensive change though that likely won't be widely available for at least a couple years. The short term solution may be the proposed patch in the StackOverflow question. It's not something we can support or include directly in Requests though. |
Do these changes make it a little bit easier to extract the challenge and re-use it to send the correct header using requests or requests-toolbelt? I understand it would require urllib3 to be updated but the change would be much smaller now that headers are accessible to urllib3 when calling |
Related request to httpx: encode/httpx#2033 |
Requests seems not to have support for proxies which requires DigestAuth, only BasicAuth.
In this SO post there is an authorization module that implements support for proxies that require DigestAuth, and also allow to connect to HTTPS websites.
requests-toolbet (I don't know whether it is an official project of requests) has a HTTPProxyDigestAuth class, but doesn't allow to connect to HTTPS websites.
The text was updated successfully, but these errors were encountered: