3.9.4.1 Establishing a SOCKS Encapsulation Connection

When the application layer requests a SOCKS connection, the SOCKS protocol layer MUST initialize the SOCKS state variables as defined in the abstract data model (see section 3.9.1). After the connection state variables are initialized, the SOCKS protocol enters the connection establishment phase. Initialization SHOULD include fetching the proxy configuration information<62>.

The SOCKS handshake occurs between the client and proxy; there are no direct connections to servers.