SOCKS5 vs SOCKS4 — Auth, DNS and IPv6 Differences

SOCKS4 is the 1990s draft that made generic proxying possible; SOCKS5, standardized as RFC 1928 in 1996, is the revision that turned it into a protocol you can run a modern network on. The differences are not cosmetic: authentication, name resolution, address families and datagram support were all rebuilt. This page walks the socks4 vs socks5 comparison gap by gap, then says where SOCKS4 still legitimately appears.

One ground rule before the tables: everything measured on this site probes the SOCKS5 handshake, so the SOCKS5 side of the socks5 vs socks4 comparison carries real numbers from public endpoint sweeps — while the SOCKS4 side is protocol fact from the specification and its behavior, not benchmark theater.

4protocol gaps SOCKS5 closed: auth, DNS, IPv6, UDP
3 vs 1address types: IPv4, domain, IPv6 versus IPv4 only
2,034 msmedian SOCKS5 handshake across public endpoints
1,369 msmedian connect-to-target stage both generations pay

SOCKS4 survives on legacy inertia; SOCKS5 wins wherever a choice exists — then the endpoint decides the rest.

measured

1. Two Generations, One Family

The wire difference starts at hello. SOCKS4 sends a fixed request — version byte, command, port, IPv4 address, a userid string — and gets back two status bytes. SOCKS5 opens a negotiation instead: the client offers authentication methods, the server picks one, and only then does the request go out. That exchange is what lets SOCKS5 carry username-password authentication as a standard method rather than the informal userid field SOCKS4 left behind.

The request itself changed just as much. SOCKS4 knows one address form, a 32-bit IPv4 literal, and one command, TCP CONNECT. SOCKS5’s address field is typed — IPv4, a domain name, or IPv6 — and its command set adds BIND and UDP ASSOCIATE. Six rows below carry the whole comparison; the four rows where SOCKS4 says no are the four gaps the next section walks through.

Capability contrast between SOCKS4 and SOCKS5 on the wire.
CapabilitySOCKS4SOCKS5
AuthenticationInformal userid field, no negotiationMethod negotiation, username-password per RFC 1929
Name resolutionIPv4 only — client resolves, or SOCKS4a patchDomain field in the request, server resolves
Address familiesIPv4IPv4, domain, IPv6
UDPNoneUDP ASSOCIATE command
CommandsCONNECT (BIND in practice)CONNECT, BIND, UDP ASSOCIATE
Error reportingOne reply code, 90–91 splitGranular reply codes per failure reason

2. The Four Gaps, Gap by Gap

Authentication first. SOCKS4’s userid field was never a standard — some servers required it, some logged it, none verified it. SOCKS5’s method negotiation made auth a first-class step: the RFC 1929 username-password method is implemented everywhere, and the GSSAPI slot exists for environments that need it. For anything behind credentials — which is most paid or private pools — SOCKS4 simply cannot express the arrangement cleanly.

Name resolution is the leak-shaped gap. A plain SOCKS4 client must hand over an IPv4 literal, which means the client’s own resolver does the DNS lookup and that query travels outside the tunnel. SOCKS4a bolted on a domain-string escape hatch years later; SOCKS5 has had it from birth in the typed address field. The protocol page shows how the domain option rides in the request itself.

The last two gaps are about what the tunnel can carry. IPv6: SOCKS4’s 32-bit address field cannot even represent an IPv6 destination, so a growing share of the web is unreachable through it without a resolver-side workaround. UDP: SOCKS4 has no datagram path at all, which rules out voice, gaming, QUIC and most anything modern that is not plain TCP. SOCKS5’s UDP ASSOCIATE closes it with a relay negotiated per session.

None of these gaps cost anything on the wire today. The measured cost of a tunnel lives elsewhere: a median 2,034 ms handshake on the SOCKS5 side and a 1,369 ms connect-to-target stage that both generations pay once traffic flows. Protocol generation decides capability, not speed — the proxy speed test is what sorts endpoints either way.

3. What Still Runs on SOCKS4

SOCKS4 persists for unglamorous reasons. Old applications and appliances were written against it and never updated; some embedded tooling still ships a SOCKS4-only proxy field; and open scanners keep finding answering servers, which keeps addresses flowing into public lists regardless of demand. A first honest note: our endpoint sweeps speak the SOCKS5 handshake, so SOCKS4-only servers in any pool would fail our checks outright — this site’s numbers never include them.

A second honest note: some “SOCKS4” entries in public lists are simply mislabeled SOCKS5, because both protocols have historically shared ports and scanners rarely verify the dialect. That ambiguity is one more reason to prefer a checker that actually performs the handshake rather than a bare TCP connect test — the proxy checker negotiates the real protocol, and the configuration page shows how to make a client match the server’s dialect instead of guessing.

4. The Migration Decision

The rule is short: choose SOCKS5 whenever a choice exists, keep SOCKS4 only where a legacy client locks you in, and verify endpoints after the switch — the four KPI numbers on this page came from exactly that routine.

The sibling comparison covers the other boundary: SOCKS5 versus HTTP proxies decides between protocol families, this page decides between generations of one family.

One caution transfers from every other page on this site: a protocol upgrade on an unverified endpoint changes nothing observable. Check liveness, check exit geography, then grade throughput before real work rides the tunnel.

Migration calls for SOCKS4 versus SOCKS5 by situation.
SituationCallWhy
New setup, free to chooseSOCKS5All four gaps closed; auth and UDP come standard
Legacy client, SOCKS4-only fieldSOCKS4, temporarilyWire compatibility beats capability you cannot reach
Unlabeled pool entryVerify dialectMislabels are common; a real handshake test settles it
Auditing an old configPlan the moveIPv6 and DNS paths are the first things SOCKS4 breaks

Migration itself is rarely the hard part — most clients take the same host, port and credentials with a protocol dropdown one value apart. The hard part is the same as ever: the pool behind the dropdown. Verify it, and the generation question has already been answered correctly.

One dropdown separates SOCKS4 from SOCKS5 in most configs — and one wrong pick looks like a dead proxy.

Try RoxyBrowser free

RoxyBrowser keeps the protocol explicit per profile, binds one proxy to one browser identity, and tests the tunnel before a session starts. Official site: roxybrowser.com, free tier, Windows and macOS builds.

Frequently Asked Questions

Is SOCKS5 backward compatible with SOCKS4?

No. The two handshakes are different on the wire — SOCKS4 opens with a fixed request layout and expects a short reply code, while SOCKS5 starts with a method-negotiation exchange defined in RFC 1928. A client speaking one will not complete a handshake with a server implementing only the other. Many proxy servers implement both protocols side by side, sometimes even on the same port, which is why some SOCKS4 endpoints keep working in client tools — but that is server-side support, not protocol compatibility.

Why do proxy lists still contain SOCKS4 addresses?

Three reasons, and none of them is a reason to use the protocol. Legacy software and appliances shipped decades ago still speak nothing else. Open proxy scanners sweep address ranges and publish whatever answers, protocol included. And some pools mislabel SOCKS5 endpoints as SOCKS4 or the reverse, because the protocols often share ports and scanners rarely verify carefully. Our own endpoint sweeps on this site probe the SOCKS5 handshake only, so any SOCKS4 entries mixed into public lists would simply fail our checks — a useful filter by itself.

Does SOCKS4 support hostnames and DNS?

Plain SOCKS4 does not: the request carries only an IPv4 address, so the client must resolve the hostname itself and leak that lookup to its own resolver. The later SOCKS4a patch added one feature — the client may send a domain string instead of an IP for the server to resolve. That closes the DNS gap for hostnames but nothing else: SOCKS4a still has no authentication negotiation, no IPv6 and no UDP. SOCKS5 covers all of it natively, since its address field accepts IPv4, a domain name, or an IPv6 address.

Should I switch from SOCKS4 to SOCKS5?

For new work, yes — SOCKS5 is the default unless a legacy client locks you to SOCKS4, and the switch is usually a one-line change in the proxy field. The relay itself costs the same either way: what dominates a tunnel’s delay is the server-side connect stage, measured at a median 1,369 ms through public endpoints, not the handshake dialect. After switching, treat the new endpoints like any others: run them through a handshake checker and a speed test before real traffic, because protocol generation says nothing about whether a specific endpoint is alive or fast.