502 vs 504: Bad Gateway vs Gateway Timeout
502 means the next server answered badly. 504 means it never answered in time. We tested which hop sends each through Squid 6.13 and…
How proxies work, what the four categories actually differ on, and the protocol detail underneath.
Nearly every practical proxy question reduces to one of three things: who owns the address, how the connection is carried, and how long you keep the same identity. The rest is detail hanging off those three.
The four categories do not differ on protocol. They differ on who the address is registered to, and everything else follows from that.
The comparison guide works through which to use when. The short version: registration decides how the address is treated before it does anything, and the ASN is where that decision is read from.
An HTTPS request through an HTTP proxy is not forwarded, it is tunnelled. The client asks the proxy to open a tunnel with CONNECT, the proxy answers, and the encrypted traffic passes through untouched. This is why the proxy sees the destination hostname and the byte counts but not the contents.
SOCKS5 works one layer lower and carries any TCP stream. It cannot add HTTP headers, which makes it structurally quieter, and it has one option that catches everybody: whether your machine or the proxy resolves the hostname.
A rotating endpoint gives you a different address per request or per interval. A sticky session holds one for a while. Neither is better; they answer different questions.
The guide on choosing between them covers the failure this causes most often: a crawler rotating per request that cannot understand why a paginated list keeps returning page 1. The site bound the cursor to a session, the session to an address, and the address changed.
Two authentication models exist and they fail in opposite ways. Credentials travel with the request and survive a changing address, but leak into logs and shell history. An address allow-list sends nothing secret and breaks silently the moment your address changes.
On residential networks the username usually carries more than identity. Country, city, session identifier and rotation behaviour are commonly appended to it, because the gateway hostname is fixed and the credential is the only field a client can vary per request.
The environment variables look like the simplest approach and behave differently in every runtime. Tested across curl, wget, Python, Go and Node, the clients disagree on the case of HTTP_PROXY, on what a leading dot in NO_PROXY matches, and on whether CIDR ranges work at all.
502 means the next server answered badly. 504 means it never answered in time. We tested which hop sends each through Squid 6.13 and…
CF-Connecting-IP carries a visitor address from Cloudflare to an origin. Learn the trust boundary, Nginx setup and spoofing test.
Cloudflare Error 1005 means a site owner blocked your network ASN. Learn how visitors, proxies, and owners can diagnose it and when to stop…
Connection reset by peer means the far end aborted the TCP connection with a RST. Real output from curl, Python, Node and Chrome, each…
Crawl-delay asks a crawler to wait between requests, but it is not standard and Google ignores it. Learn the safer controls.
curl is a request workbench; Wget is a download worker. Compare real defaults, proxy behavior, resumes, recursion, retries, and local measurements.
ERR_EMPTY_RESPONSE means a server or proxy closed the connection without sending a byte. Causes we reproduced, how to tell them apart, and fixes.
ERR_PROXY_CONNECTION_FAILED means Chrome could not reach its proxy. Each cause reproduced, with the command that finds it and the fix.
What Chrome's ERR_TUNNEL_CONNECTION_FAILED means, each cause we reproduced with real proxies, and how to find and fix the one you have.
A forward proxy acts for the client, a reverse proxy for the site. We ran Squid both ways and Apache as a reverse proxy,…
http_proxy, https_proxy and no_proxy tested in 12 client setups: the uppercase rule, leading dots, CIDR and wildcards that each client reads differently.
401 asks for credentials, 403 refuses with or without them, 407 is your proxy asking. Real curl, requests, httpx and Node output for each.
HTTP 402 Payment Required is reserved by HTTP and used by APIs or proxies for paid access and quota refusals. Read the body and…
HTTP 407 Proxy Authentication Required means the proxy wants credentials. Read Proxy-Authenticate and send Proxy-Authorization to the proxy.
HTTP 421 means the server will not answer for that hostname on this connection. Retry on a new connection whose TLS name matches the…
HTTP 428 Precondition Required means a write must include a condition such as If-Match. Fetch the current ETag before retrying.
HTTP 503 Service Unavailable means the responding service cannot handle the request now. Find the layer, honour Retry-After and bound retries.
HTTP 504 Gateway Timeout means a gateway did not receive an upstream response before its deadline. Locate the timer before changing proxy exits.
HTTP 505 means the server does not support the request's HTTP version. Retry with a negotiated version such as HTTP/1.1 after checking the proxy.
The exact 407 and tunnel errors curl, Python, Node and Chrome print, what causes each, and the command that shows whether the proxy or…
Exact proxy error messages from curl, Python, Node, Chrome, Squid and Apache, reproduced on a test rig, with the cause and fix for each.
A proxy reroutes only the programs you point at it; a VPN reroutes the whole machine. We ran Squid and WireGuard side by side…
A server that makes requests on your behalf, so the destination sees the proxy's address instead of yours.
A VPN tunnels every app to a datacentre server. A residential proxy sends chosen requests out via home ISP lines. We checked 88 addresses.
SOCKS5 adds passwords, IPv6, UDP and proxy-side DNS; SOCKS4 saves one round trip. Real handshakes from curl, Chrome, Firefox and Go.
socks5h sends the hostname to a SOCKS5 proxy for DNS resolution. See the wire difference from socks5 with a real curl capture.
Sticky vs rotating proxies: which suits each task, why a pooled client never rotates, and the session-ID pattern that failed at request 250.
One gateway address that sends each request or session through a different exit in the provider's pool, so your configuration never changes.
A cookie jar is the store a client keeps of the cookies it has received, keyed by domain and path, and replayed on later…
A proxy whose exit address belongs to a hosting or cloud network. Fast and cheap per address, and the easiest type for a site…
A DNS leak is a name lookup that travels outside the path you intended, so a resolver you did not choose learns the hostname…
A proxy the client chooses and configures. It forwards your requests outward, so the destination connects with the proxy rather than with you.
A JA3 fingerprint is an MD5 hash of five fields from the TLS ClientHello, kept in the order the client sent them.
A proxy that exits through a mobile carrier's network, on a public address that real subscribers share behind carrier-grade NAT.
A port is a 16-bit number identifying one endpoint of a transport connection, so a single address can carry many independent conversations at once.
A proxy server sends your requests from its own address. What it can read, what it adds to your headers, and the four types,…
A proxy whose exit address belongs to a consumer ISP, so the traffic appears to come from an ordinary home connection.
A proxy deployed in front of a server. Clients connect to it as if it were the origin, and it forwards to the real…
A proxy gateway that hands out a different exit address over time, per new connection or on a timer, while your client keeps one…
A proxy protocol, defined in RFC 1928, that relays any TCP stream and optionally UDP without reading it. socks5h sends the hostname to the…
A proxy setting that holds one exit address for a period, or, on a load balancer, a cookie that pins each visitor to one…
A subnet is a contiguous block of addresses that share a common leading prefix and are administered as one network.
A transparent proxy usually means one the network routes traffic through without any client setting, so the client does not know it is there.
A WebRTC leak is a network address disclosed by the browser's real-time communication stack, outside the path your proxy controls.
The number that identifies a network announcing IP addresses on the internet. For proxies, it decides how an exit is classified before it is…
The last hop before the destination: the machine whose address the website records, in proxy networks, Tor and Tailscale alike.
A static address registered to a consumer ISP but hosted in a datacentre and rented per IP. Often sold as a static residential proxy.
Certificate pinning is when a client accepts only a specific public key or certificate for a host, not any certificate that chains to a…
Carrier-grade NAT (CGNAT) is address translation inside an operator's network, so that many subscribers share one public IPv4 address.
CIDR is the notation and allocation scheme that writes a block of IP addresses as an address followed by a prefix length, such as…
Asking a proxy service for an exit in a particular country, region, city or network. The site you visit then judges your location with…
Authorising a proxy by the address your traffic comes from instead of a username and password. Simple on a fixed server, fragile anywhere else.
IPv6 is the version of the Internet Protocol with 128-bit addresses, written as eight groups of up to four hexadecimal digits.
How a proxy decides you may use it: credentials in a Proxy-Authorization header, or a list of allowed source addresses. A 407 means it…
The HTTP method that asks a proxy to open a raw TCP tunnel to a host and port. It is how HTTPS, and anything…
Referer is the HTTP request header that names the page or resource the requested URL was obtained from.
Via is a standard HTTP header to which each proxy or gateway appends the protocol version it received the message on and a name…
X-Forwarded-For is a de facto request header to which each proxy appends the address of the client it received the request from.
TLS interception, or SSL inspection, is when a middlebox terminates a client's encrypted connection, reads the plaintext and re-encrypts it onward.
X-Real-IP is a proxy convention for one client address. Learn when Nginx can trust it and how a direct client can forge it.