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
Describe the bug
When using curl-cffi, using a proxy through Proxy Gateway for rotation on each request becomes impossible (the IP becomes static for some reason, despite the fact that static sessions are disabled in the proxy provider's settings).
Things are complicated when you use so-called tunnel proxies where the exit node changes but proxy server url does not change. When the proxy url stays the same, it's reasonable that the client reuses the old connections, actually I think the way libcurl handles it is the correct way.
A few things you can try to see if it helps:
Turn off http/2, requests.get(url, http_version=CurlHttpVersion.V1_1)
Use the proxy when requesting, session.get(url, proxy=...)
The solutions you provided did not work (at least in my case). However, I found two solutions myself.
According to this documentation, the Connection header can be set to close to ensure that the connection will close after processing the request. HTTP 1.0 has close as the default, so here are two solutions:
Thanks for posting your solution here. I would not recommend http/1.0 as it has been deprecated for a very long time. Adding connection: close is the right way to go if it solves your problem.
Describe the bug
When using
curl-cffi
, using a proxy through Proxy Gateway for rotation on each request becomes impossible (the IP becomes static for some reason, despite the fact that static sessions are disabled in the proxy provider's settings).To Reproduce
aiohttp
usingpip install aiohttp
httpx
usingpip install httpx
curl-cffi
usingpip install curl-cffi
PROXY_URL
with the URL of your proxy gatewayExpected behavior
The IP changes with each request, similar to how it happens in
aiohttp
orhttpx
.Versions
pip freeze
dump:Additional context
The text was updated successfully, but these errors were encountered: