SOCKS5 vs HTTP CONNECT Proxies: Latency, TLS, and Scraping Trade-Offs

For HTTPS targets, both HTTP CONNECT and SOCKS5 create an opaque end-to-end encrypted TCP tunnel where the proxy cannot inspect TLS payloads. HTTP CONNECT (port 8080) requires one fewer round trip on auth and works natively in Chromium/Playwright, whereas SOCKS5 (port 1080) supports arbitrary non-HTTP TCP protocols and avoids HTTP proxy headers.

1. Wire handshake differences

HTTP CONNECT sends `CONNECT host:443 HTTP/1.1` with `Proxy-Authorization` in a single TCP flight, returning `200 Connection Established` in 1 RTT before TLS begins. SOCKS5 performs a 3-step binary handshake (method negotiation -> RFC 1929 username/password auth -> CONNECT target), adding 1 extra RTT on fresh connections.

2. Always use socks5h:// to avoid local DNS leaks

In curl and Python `requests`, `socks5://` resolves the target hostname on your local machine first, leaking your DNS queries and returning region-wrong CDN IPs. Always use `socks5h://` so DNS resolution happens remotely at the exit node.

# Remote DNS resolution over SOCKS5 (correct)
curl -x socks5h://rf_yourkey__pool-resi_cr-de:[email protected]:1080 https://ipinfo.io/json

# Single-RTT HTTPS CONNECT tunnel
curl -x http://rf_yourkey__pool-resi_cr-de:[email protected]:8080 https://ipinfo.io/json

3. Which one to pick

Use HTTP CONNECT (`gw.resi.fast:8080`) for Playwright, Puppeteer, Go `net/http`, Node `undici`, and high-RPS HTTPS scraping. Use SOCKS5 (`gw.resi.fast:1080`) for non-HTTP TCP apps, SSH/custom protocols, or antidetect profiles explicitly configured for SOCKS5.

FAQ

Is SOCKS5 faster than HTTP CONNECT for HTTPS scraping?

No. Once the tunnel is established, both relay raw encrypted TCP bytes identically; HTTP CONNECT actually saves one handshake round trip during connection setup.