SOCKS5: Proxy Negotiation and Traffic Relaying
SOCKS5 negotiates how a client reaches a destination through a proxy. It relays traffic at the transport level and does not itself define HTTP semantics or encryption.
Updated · Editorial approach and simulation limits
Method negotiation precedes a destination request
The client begins by listing authentication methods it supports, and the server selects one or rejects the negotiation. If the chosen method requires authentication, that exchange happens before the client asks to reach a destination.
A successful method negotiation does not yet connect to the target. The client then sends a request such as CONNECT with an address type, destination and port. The server’s reply reports whether it established the relay.
CONNECT and UDP ASSOCIATE relay different traffic
CONNECT requests a TCP connection to a destination. UDP ASSOCIATE establishes the context used to relay UDP datagrams, which have their own SOCKS header containing addressing information. These commands are not HTTP methods; a SOCKS proxy can carry non-HTTP application traffic.
A client may receive a success response from the proxy but still fail to complete the application protocol with the destination. Separate the client-to-proxy negotiation, proxy-to-target path and application response when diagnosing the failure.
SOCKS5 does not encrypt the relayed session
The protocol’s optional username-password method is an authentication choice, not transport encryption. Once connected, the proxy can relay application bytes; confidentiality depends on the application protocol, such as TLS or SSH, and on how the proxy path is protected.
A network trace can expose destination metadata and timing, while an encrypted application stream may hide its content. Protocol Explorer illustrates the negotiation fields but does not connect to a SOCKS server.
Explore SOCKS5 interactively
Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.
Specification and source
For exact protocol requirements, consult the primary document: RFC 1928: SOCKS Protocol Version 5. This page summarizes selected behavior and is not a substitute for the specification.
Related protocol lessons
Browse all application protocols · Separate proxy negotiation from the tunneled application