SOCKS5 versus HTTP proxy#
| SOCKS5 | HTTP proxy | |
|---|---|---|
| Protocols carried | Any TCP | HTTP and HTTPS (CONNECT can tunnel other TCP too) |
| Understands the request | No | Yes for plain HTTP |
| DNS resolution | On the proxy (socks5h) or locally (socks5) | On the proxy for full-URL requests; host name sent in CONNECT |
| Client support | Most tools; some need a library | Universal |
socks5 versus socks5h#
In cURL and Python, socks5:// resolves the destination hostname on your machine and sends the IP to the proxy; socks5h:// sends the hostname and lets the exit resolve it. Use socks5h to keep DNS queries in the exit's country and to avoid leaking hostnames to your local resolver.
socks5h://USER-cc-us:PASS@res.hodlproxy.com:9001How a SOCKS5 connection works#
- Greeting: the client connects to the proxy port and lists the authentication methods it supports.
- Authentication: the proxy picks one, typically username and password (RFC 1929), and checks the credentials.
- Connect request: the client asks for a destination, either as a hostname (remote DNS) or as an IP address it resolved itself.
- Relay: the proxy opens the TCP connection from its exit IP and relays bytes in both directions without reading them.
SOCKS5, SOCKS4 and VPN#
| SOCKS5 | SOCKS4 | VPN | |
|---|---|---|---|
| Authentication | Username and password | None (user ID only) | Keys or certificates |
| Remote DNS | Yes (hostname in the request) | Only with the SOCKS4a extension | Through the tunnel |
| UDP | Defined (UDP ASSOCIATE), rarely offered | No | Yes |
| Scope | Per application | Per application | The whole device |
| Encryption | None of its own | None | Yes |
Using SOCKS5 in common tools#
- cURL:
-x socks5h://user:pass@host:port(the h keeps DNS at the exit). - Python requests: install
requests[socks], then use asocks5h://URL inproxies. - Firefox: manual SOCKS v5 with "Proxy DNS when using SOCKS v5"; it has no credentials field, so authenticate by IP whitelist.
- Chrome and Chromium:
--proxy-server=socks5://host:portworks without credentials only; use a whitelist or an extension. - Telegram: Settings, Proxy, Add proxy, SOCKS5 with server, port, username and password.
The conventional SOCKS port is 1080, but providers choose their own: HodlProxy uses 9001 on its gateways and 8001 on dedicated addresses. See SOCKS5 proxies for networks and prices.
How it works at HodlProxy#
HodlProxy gateways speak SOCKS5 on port 9001 with the same credentials and username parameters as HTTP; dedicated addresses on port 8001. UDP ASSOCIATE and BIND are not supported: TCP only.
Questions people ask#
Is SOCKS5 faster than HTTP?
Not measurably. Both add one hop; SOCKS5 does slightly less parsing but the network path dominates. Choose by tool support and DNS behaviour, not speed.
Is a SOCKS5 proxy secure?
It authenticates you to the proxy but does not encrypt anything itself. Use protocols with their own encryption (HTTPS, SSH) through it; they stay encrypted end to end.
Does a SOCKS5 proxy hide my IP address?
Yes, from the destination: the target sees the exit IP. Use socks5h so that DNS lookups are made at the exit too, and remember that browser fingerprints and cookies are not hidden by any proxy.
What port does SOCKS5 use?
Port 1080 by convention, any port in practice. On HodlProxy, 9001 on the rotating gateways and 8001 on dedicated addresses.
Should I use SOCKS5 or a VPN?
A VPN covers the whole device through one server; SOCKS5 covers the applications you configure, each with its own exit, location and session. For data collection, multi-accounting and automation, per-application proxies are the usual choice.