Symptoms#
- An IP-echo call returns the same address several times in a row although no session id is set.
- A target that rate-limits per IP blocks a crawler that "rotates" but reuses a pool of ten connections.
Fixes by client#
| Client | How to get a new connection per request |
|---|---|
| cURL | each invocation is a new connection already |
| Python requests | requests.get(...) without a Session, or headers={"Connection": "close"} |
| Node.js fetch / undici | new ProxyAgent per request, or pipelining: 1 with keepAliveTimeout: 0 |
| Go net/http | Transport.DisableKeepAlives = true |
| Browsers | not controllable; use a sticky session instead and rotate by changing -sid- |
The other way round#
When you *want* one exit for several requests, keep-alive is your friend on the same connection, but do not rely on it: use a sticky session so the guarantee survives connection resets.
How it works at ProxShift#
ProxShift gateways select the exit per new connection and keep it for the life of that connection (idle connections are closed after 60 seconds). -sid- makes the choice explicit and connection-independent.