SOCKS

From Free net encyclopedia

For other meanings, see Sock (disambiguation).

SOCKS is an Internet protocol that allows client-server applications to transparently use the services of a network firewall. SOCKS is an abbreviation for "SOCKetS" [1].

Clients behind a firewall wanting to access exterior servers connect to a SOCKS proxy server instead. This proxy server controls the eligibility of the client to access the external server and passes the request on to the server.

The protocol was originally developed by David Koblas and then extended to version 4 by Ying-Da Lee of NEC. Unofficial SOCKS 4a extensions adds support for DNS names to resolve names with SOCKS server. The current version 5 of the protocol, RFC 1928, extends the previous version by supporting UDP, authentication and IPv6.

According to the OSI model it is an intermediate layer between the application layer and the transport layer.

Contents

SOCKS 4 protocol

A typical SOCKS 4 connection request looks like this (each number is one byte):

Client to Socks Server: | 0x04 | 0x01 | 0x00 0x50 | 0x42 0x66 0x07 0x63 |

field 1: socks version number
field 2: command
field 3: network byte order port number
field 4: network byte order ip address

Server to socks client: | 0x00 | 0x5a | 0x00 0x50 |0x42 0x66 0x07 0x63 |

field 1: null byte
field 2: status
field 3: network byte order port number
field 4: network byte order ip address

This is a socks 4 request to connect to 66.102.7.99:80, the server replies with an "OK."

From this point on any data sent from the socks client to the socks server will be relayed to 66.102.7.99 and vice versa.

The command field can be 0x01 for "connect" or 0x02 for "bind". "bind" allows incoming connections for protocols like active FTP.

The status field is 0x5a as an "ack" on success and (0x5a | 1) for a "nack" on failure.

SOCKS servers

List of SOCKS servers programs:

SOCKS clients

There are client programs that socksify [2], which allows adaptation of any software to connect to external networks via SOCKS.

List of SOCKS clients:

Client License Version Release date Platform Support
Dante client BSD/Carnegie Mellon University 1.1.18 09/2005 Linux v4, v5
FreeCap GPL 3.18 02/2006 Windows v4, v5, HTTPS
ProxyCap Single or multiuser fee 2.03 - Windows -
SocksCap Non-Comercial home use 2.38 06/2005 Windows v5
tsocks GPL 1.8 10/2002 POSIX (source) -
nylon 3-clause BSD - 06/2003 OpenBSD v4, v5
socat GPL - 09/2005 POSIX -

See also

External links

de:SOCKS zh:SOCKS