What is a SOCKS5 proxy?
SOCKS5 is a proxy protocol that relays network connections between a client and a server without caring what's inside them. Unlike an HTTP proxy, which understands web requests, a SOCKS5 proxy works at a lower level: it simply opens a connection to the host and port you ask for and passes bytes back and forth.
The protocol was standardised in RFC 1928 in 1996, and it's still widely used because it's simple, flexible and supported by a huge range of software.
What SOCKS5 adds over earlier versions
- Authentication. Username and password (RFC 1929), plus the option of no authentication for whitelisted clients.
- UDP support. SOCKS5 can relay UDP datagrams, which matters for games, voice, video and DNS.
- IPv6 support. Destination addresses can be IPv6.
- Remote DNS. The client can send a hostname instead of an IP, letting the proxy resolve it. This prevents your local network from seeing which domains you look up.
See SOCKS4 vs SOCKS5 for the detailed comparison.
SOCKS5 vs HTTP proxies
| SOCKS5 | HTTP(S) proxy | |
|---|---|---|
| Layer | Session layer, protocol-agnostic | Application layer, HTTP-aware |
| Traffic types | Any TCP, plus UDP | HTTP, and HTTPS via CONNECT tunnels |
| Can modify or cache content | No | Yes (for plain HTTP) |
| Authentication | Username/password or none | Basic auth, IP whitelist |
| Remote DNS | Yes (socks5h) | Yes, implicitly (proxy resolves host) |
| Browser support | Chrome and Firefox (no auth in Chrome) | Universal |
| Tool support | Broad, but not universal | Universal |
For web scraping and automation, the practical difference is small. HTTP proxies are slightly more convenient because every tool supports their authentication. SOCKS5 shines when you need non-HTTP protocols or UDP. More in HTTP vs HTTPS proxies.
When to use SOCKS5
- Non-web applications. Email clients, FTP, SSH, torrent clients, chat apps, game launchers.
- UDP traffic. Online games, VoIP, video calls and some streaming protocols.
- Avoiding DNS leaks. Using
socks5h://makes the proxy resolve hostnames. See DNS leaks and proxies. - Apps that only offer SOCKS settings. Telegram, many desktop apps and some bots.
- Tunnelling arbitrary tools, for example with
proxychains. See proxy chains.
SOCKS5 and anonymity
SOCKS5 doesn't add headers to your traffic, so it's inherently "elite" in terms of anonymity levels. However, SOCKS5 does not encrypt anything. Your traffic between you and the proxy is only as private as the application protocol: HTTPS stays encrypted; plain protocols don't.
Setting up SOCKS5 in common tools
curl (note socks5h for remote DNS):
curl --proxy socks5h://USER:PASS@proxy.example.com:1080 https://httpbin.org/ipPython requests (requires pip install requests[socks]):
import requests
proxy = "socks5h://USER:PASS@proxy.example.com:1080"
print(requests.get("https://httpbin.org/ip", proxies={"http": proxy, "https": proxy}).json())Node.js with socks-proxy-agent:
import { SocksProxyAgent } from 'socks-proxy-agent';
import axios from 'axios';
const agent = new SocksProxyAgent('socks5h://USER:PASS@proxy.example.com:1080');
const { data } = await axios.get('https://httpbin.org/ip', { httpAgent: agent, httpsAgent: agent });
console.log(data);Chrome / Puppeteer: --proxy-server=socks5://host:1080. Chrome doesn't support SOCKS5 username/password, so whitelist your IP or use a local forwarder. See Puppeteer SOCKS5 proxy.
Firefox: Settings → Network Settings → Manual proxy configuration → SOCKS Host, select SOCKS v5, and tick "Proxy DNS when using SOCKS v5". See browser proxy settings.
Proxy tip: A practical next step is to run a few requests through a commercial pool and watch what changes. Geonode supports HTTP, HTTPS and SOCKS5 and lets you switch between rotating and sticky sessions from the same endpoint. We walk through it in our Geonode proxies guide.
Which proxy types come as SOCKS5?
All of them, depending on the provider. Many residential and mobile providers expose SOCKS5 on their gateways alongside HTTP. Datacenter proxy sellers almost always offer both. When comparing, check whether SOCKS5 is included in the same plan or costs extra, and whether UDP is actually supported (many providers only relay TCP). See best SOCKS5 proxies.
Common SOCKS5 problems
- "Connection refused": wrong port. SOCKS often runs on a different port from HTTP on the same provider.
- DNS resolves locally: you used
socks5://instead ofsocks5h://in curl or Python. - Authentication ignored: the client (for example Chrome) doesn't support SOCKS5 auth.
- UDP doesn't work: the provider doesn't support UDP ASSOCIATE.
See common proxy errors.
SOCKS5 configuration by application type
| Application | Where to set SOCKS5 | Auth support |
|---|---|---|
| Firefox | Network Settings → SOCKS Host | Prompts for credentials |
| Chrome/Edge | Launch flag or extension | No native auth |
| Telegram | Settings → Data and Storage → Proxy | Yes |
| SSH | ssh -o ProxyCommand="nc -X 5 -x host:1080 %h %p" user@server | Depends on nc variant |
| Git | git config --global http.proxy socks5h://host:1080 | Credentials in URL |
| Torrent clients | Connection/proxy settings | Usually yes |
| Any CLI tool | Wrap with proxychains | Yes, via config |
UDP: verify before you rely on it
Many products advertise SOCKS5 without supporting UDP ASSOCIATE. If your use case depends on UDP:
- Ask the provider explicitly whether UDP is supported on the product you're buying.
- Test with the real application, not just a TCP connection.
- Watch for apps that fall back to direct UDP when the proxy refuses, which leaks your real IP.
SOCKS5 over residential, ISP and mobile
SOCKS5 is just the protocol on the gateway. Behind it, the IP type determines trust and speed:
- Residential SOCKS5: high trust, variable speed, per-GB.
- ISP SOCKS5: high trust, fast, static, per-IP.
- Datacenter SOCKS5: fast, cheap, easy to identify.
- Mobile SOCKS5: highest trust, variable speed.
When comparing offers, compare the IP type first, then check that SOCKS5 is included. See best SOCKS5 proxies.
Security reminder
SOCKS5 doesn't encrypt your traffic. Credentials for the SOCKS5 proxy itself travel in plain text during the handshake. On untrusted networks, prefer IP whitelisting, or wrap the connection in an SSH tunnel or VPN.
Build a SOCKS5 proxy in one command for testing
If you want to see how SOCKS5 behaves before buying, OpenSSH can turn any server you can log in to into a private SOCKS5 proxy:
ssh -N -D 1080 user@your-server.example.com
# in another terminal:
curl --proxy socks5h://127.0.0.1:1080 https://api.ipify.org-D 1080 opens a local SOCKS port on your machine. Traffic sent to it travels encrypted through SSH and leaves from your server's IP. -N tells SSH not to run a remote command. The curl request should print your server's IP, not your own.
This is genuinely useful for:
- testing how a tool handles SOCKS5 and
socks5hbefore you configure a paid proxy; - reaching a service that only accepts connections from your server's IP;
- protecting traffic on public Wi-Fi when you don't have a VPN.
Know its limits. SSH dynamic forwarding relays TCP only, not UDP. The exit IP is a datacenter address, so it won't behave like a residential proxy on protected sites. And it gives you exactly one IP. When you outgrow it, a dedicated SOCKS server such as Dante or gost is the next step, then commercial SOCKS5 proxies.
If you want the protocol details, the original RFC 1928 is short and readable, and RFC 1929 covers username and password authentication. For proxying whole command-line tools, see proxy chains.
FAQ
Is SOCKS5 faster than an HTTP proxy?
Marginally, because it does less processing, but the difference is usually invisible next to network latency.
Is SOCKS5 secure?
It doesn't encrypt traffic. Use it with encrypted protocols such as HTTPS or SSH.
Is SOCKS5 better for sneaker bots?
Not usually. Most sneaker bots expect HTTP proxies in ip:port:user:pass format. See sneaker proxies.
Can I use residential proxies over SOCKS5?
Yes, many residential proxy providers support SOCKS5 on their gateways.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.