Glossary
SOCKS5 proxy: a protocol level relay
SOCKS5 is a proxy protocol that forwards raw network connections, TCP and optionally UDP, without understanding or changing the application data inside them.
Definition
SOCKS is a small protocol from the 1990s, and version 5 (RFC 1928) is the one in use today. A client connects to the SOCKS server, says which host and port it wants, optionally authenticates, and then the server simply pipes bytes in both directions. It does not parse HTTP, so it works for any protocol: web traffic, mail, SSH, game traffic or database connections.
SOCKS5 compared with HTTP proxies
| Aspect | HTTP proxy | SOCKS5 proxy |
|---|---|---|
| Understands HTTP | Yes, can add or read headers on plain HTTP | No, relays bytes only |
| HTTPS | Through a CONNECT tunnel | Native, like any TCP stream |
| UDP | No | Yes, with UDP ASSOCIATE (if the server enables it) |
| Other protocols | Limited | Any TCP based protocol |
| URL scheme | http:// | socks5:// or socks5h:// |
For ordinary HTTPS scraping the two behave almost the same once the tunnel is open. The difference shows up with other protocols, with UDP and in how DNS is handled.
Authentication
SOCKS5 negotiates an auth method at the start of each connection. The common choices are "no authentication", usually combined with an IP allowlist, and username and password (RFC 1929). In URL form that looks like socks5://user:pass@203.0.113.20:1080. Note that the username and password travel unencrypted in the handshake, so use SOCKS5 over trusted paths or tunnel it.
UDP and DNS
UDP support lets traffic such as DNS queries, QUIC (HTTP/3) and WebRTC flow through the proxy. Without it, a browser may send that traffic directly, which can reveal your real address; the WebRTC leak entry explains the effect. Many commercial providers do not enable UDP, so check before you rely on it.
DNS is the other subtle point. With socks5://, many clients resolve the hostname locally and send only an IP to the proxy. With socks5h:// (the "h" means hostname), the proxy resolves it. Remote resolution keeps your DNS queries off your local network and gives you the answers a visitor in the proxy's region would get. More on that under DNS.
Using SOCKS5 in code
# pip install "requests[socks]"
import requests
relay = "socks5h://scrape01:pw@203.0.113.20:1080"
resp = requests.get(
"https://example.com/products?page=2",
proxies={"http": relay, "https": relay},
timeout=30,
)
print(resp.status_code, len(resp.text))
Playwright and Puppeteer accept a SOCKS5 server in their launch or context options; at the time of writing, Chromium does not support SOCKS5 username and password auth directly, so many teams run a local forwarder. Check the current docs for your tool.
SOCKS5 and GateSolver tasks
GateSolver does not sell proxies of any protocol. The task examples in our docs pass your own proxy as an http://user:pass@host:port string; check the API docs and the SOCKS5 support answer for which schemes a task accepts before switching. Most proxy providers expose the same exit over both protocols on different ports, so you can give the task the HTTP form and use SOCKS5 in your own client, as long as both reach the same exit IP.
Common questions
Is SOCKS5 faster than an HTTP proxy?
Not noticeably for HTTPS. Both just relay an encrypted stream once the tunnel is open; the exit network matters far more.
What is the difference between socks5 and socks5h?
With socks5h the proxy resolves hostnames, so DNS lookups happen at the exit rather than on your own machine.
Does every SOCKS5 proxy support UDP?
No. UDP ASSOCIATE is optional, and many commercial providers leave it disabled, so confirm it before you depend on it.
Is SOCKS5 authentication encrypted?
No. The username and password are sent in clear text during the handshake, so the path to the proxy should be trusted.
Can I use the same exit over HTTP and SOCKS5?
Often yes. Many providers offer both protocols on different ports for the same pool or session.
Keep reading
- Proxy serverA forward proxy relays requests under its own address; see what it changes, what it keeps and how credentials are written.
- DNSDNS turns hostnames into IP addresses, and where that lookup happens affects speed, geolocation and leaks when you scrape through proxies.
- Do proxies support SOCKS5?Many proxy services offer SOCKS5 next to HTTP; it carries any TCP traffic, while HTTP proxies are simpler to set up.
- What proxy format does a solving task accept?Tasks take one proxy string in URL form, http://user:pass@host:port, in the proxy field of the task object.