Boost.Socks Logo

PrevUpHomeNext

Protocol

This section briefly discusses the SOCKS protocols and their relationship with the I/O operations provided by the library.

SOCKS4

SOCKS4 was developed by David Koblas and Michelle Koblas (Koblas, David; Koblas, Michelle R. (1992)). The most common specification and implementation was introduced by Ying-Da Lee (SOCKS Protocol Version 4).

The protocol allows transparent access across the firewall, where the server data between the client and the server with minimum processing overhead. In practice, SOCKS4 servers can proxy TCP connections to any IP address.

This means SOCKS performs at the session layer 5 of the OSI model. Thus, the SOCKS server does not have to know anything about the application protocol. This also makes it easy to accommodate encryption to protect the traffic from snoopers.

Once the client is connected to the SOCKS server, only two operations are defined in SOCKS Protocol Version 4:

  1. CONNECT: Establishes a proxy connection to the application server
  2. BIND: Prepare for an inbound connection from the application server

SOCKS4A

SOCKS Protocol Version 4A extends the SOCKS Protocol Version 4 protocol to allow a client to specify a destination domain name rather than an IP address.

This is useful when the client cannot resolve the destination host's domain name to an IP address.

SOCKS5

SOCKS5 (RFC 1928) provides optional authentication so that only authorized users can access a SOCKS server. Besides proxying TCP connections, SOCKS5 provides a means for UDP packets to be forwarded.


PrevUpHomeNext