Proxy types · glossary

SOCKS5 proxy

A SOCKS5 proxy relays TCP connections at the transport level without understanding the application protocol, so it can carry HTTP, HTTPS, SMTP, custom binary protocols or anything else over TCP. SOCKS5 adds username-password authentication and, optionally, remote DNS resolution and UDP association. It is the protocol to use for tools that are not HTTP clients or that need the proxy to resolve hostnames.

3 min read Also called SOCKS proxy, SOCKS5 Updated

SOCKS5 versus HTTP proxy#

SOCKS5HTTP proxy
Protocols carriedAny TCPHTTP and HTTPS (CONNECT can tunnel other TCP too)
Understands the requestNoYes for plain HTTP
DNS resolutionOn the proxy (socks5h) or locally (socks5)On the proxy for full-URL requests; host name sent in CONNECT
Client supportMost tools; some need a libraryUniversal

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.

Proxy URL
socks5h://USER-cc-us:PASS@res.hodlproxy.com:9001

How a SOCKS5 connection works#

  1. Greeting: the client connects to the proxy port and lists the authentication methods it supports.
  2. Authentication: the proxy picks one, typically username and password (RFC 1929), and checks the credentials.
  3. Connect request: the client asks for a destination, either as a hostname (remote DNS) or as an IP address it resolved itself.
  4. Relay: the proxy opens the TCP connection from its exit IP and relays bytes in both directions without reading them.

SOCKS5, SOCKS4 and VPN#

SOCKS5SOCKS4VPN
AuthenticationUsername and passwordNone (user ID only)Keys or certificates
Remote DNSYes (hostname in the request)Only with the SOCKS4a extensionThrough the tunnel
UDPDefined (UDP ASSOCIATE), rarely offeredNoYes
ScopePer applicationPer applicationThe whole device
EncryptionNone of its ownNoneYes

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 a socks5h:// URL in proxies.
  • 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:port works 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.

Ready when you are

See it on a real request.

Create an account, top up $20 and run the quickstart against your own target. Traffic you buy never expires.