-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
"I use the same proxy for requests to 300 websites from china, and httpx and requests behave completely differently." #6871
Comments
我知道原因所在了 |
This was referenced Feb 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
same code ,same proxies!
success rate verry diffrrence
this is requests success rate!
this is httpx success rate!
I am a user from China. I suspect that when using a proxy with requests, the process of obtaining the DNS IP does not go through the proxy, or it directly uses the system's DNS to obtain the IP. At this point, it has already been intercepted by the Great Firewall of China, leading to the retrieval of an incorrect IP and ultimately causing a SOCKSHTTP timeout. However, httpx does not have this issue. I think it might be a bug in requests, but I can't find the cause. I also don't know how to fix it.
Since our project extensively uses the requests library, we cannot quickly switch to httpx. I hope you can help me solve this bug. We have debugged up to the point of establishing the SOCKS connection and found that both are the same, but the final success rates are completely different. httpx can achieve a 90% success rate, while requests only reaches a 20% success rate.
I would prefer to know and fix this bug.
The text was updated successfully, but these errors were encountered: