Negotiate a method before requesting a relay
01The application connects to a SOCKS server and offers methods. The server chooses a method before the application requests any target.
Separate failure branch:05 FF travels proxy to client. The client MUST close; it must not send a CONNECT request on that failed negotiation.
Source for this drawing: RFC 1928 · Read RFC section 3 ↗
New to this? Start hereA quick picture + helpful background
A request starts a conversation.
A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
A method choice is not a target connection.
- The greeting contains VER=05, NMETHODS and that many method octets. The server selects a method from the offered list; its reply is VER and METHOD, not a CONNECT reply.
- Method00 means no authentication required;01 is GSSAPI and02 username/password. If METHOD is FF, none is acceptable and the client MUST close the connection.
- Complete any method-specific subnegotiation before the relay request. Compliant implementations MUST support GSSAPI and SHOULD support username/password under RFC1928; the no-auth illustration is one chosen session, not a complete compliant implementation.
An octet is an eight-bit byte; displayed byte values are hexadecimal. TCP port1080 is conventional, not an enforced universal port. GSSAPI is the Generic Security Service Application Program Interface; method details are in separate RFC1961/1929. Confidentiality and integrity depend on the chosen method and any separate application protection. No real authentication, credentials or network service is used.
Read the RFC section ↗