CONNECT, BIND, and UDP ASSOCIATE in SOCKS5
After access negotiation, a SOCKS5 client sends a relay command. CONNECT covers most application workflows, while the standard also defines BIND and UDP ASSOCIATE. Understanding their separate roles prevents a TCP test from being mistaken for UDP validation and avoids blaming the entire proxy when a client implements only a subset.
Key points in one minute
- CONNECT creates an outbound TCP connection.
- BIND waits for an inbound connection in supported workflows.
- UDP ASSOCIATE establishes a context for UDP relay.
- Both client and server must implement the required command.
CONNECT for ordinary TCP workflows
CONNECT asks the SOCKS server to connect to a specified address and port. After a successful reply, both sides exchange TCP data through the relay. Web requests, APIs, and many business applications use this path.
BIND for an expected inbound connection
BIND serves protocols that expect the remote side to connect back. The server reports a bound address and sends a second reply when the inbound connection arrives. This command is less common and is often omitted by end-user clients.
UDP ASSOCIATE and datagram framing
UDP ASSOCIATE provides the UDP relay address, after which datagrams carry a SOCKS5 header. UDP remains distinct from TCP and needs its own validation. Fragmentation is defined but optional to implement, so applications are encouraged to avoid relying on it.
Testing actual capabilities
A CONNECT test validates only the TCP path. UDP requires an authorized UDP test and BIND requires a controlled inbound peer. Product documentation should list implemented commands rather than presenting the full standard as a guaranteed feature set.
Practical checklist
- 1Identify the required command before configuring the client.
- 2Confirm support on both client and server.
- 3Do not treat a TCP test as proof of UDP support.
- 4Restrict destinations to authorized business services.
- 5Record the SOCKS5 result code for every stage.
Sources and documentation
This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.