NordVPN Help Center
One place for all the information you need

What is SOCKS?

Updated

Socket Secure (SOCKS) is an Internet protocol which routs network packets between server and a client through a proxy server. In addition SOCKS5 provides authentication therefore only authorized users can access the server. SOCKS server proxies connects through TCP to a willful IP address and provides values for UDP packets to be forwarded.

SOCKS operates at Layer5 of the Open System Interconnection reference model. It has three layers – transport layer, an intermediate layer between the presentation layer and the session layer.

Comparison to HTTP proxies

SOCKS performs at a lower level than HTTP proxies: SOCKS takes advantage of handshake protocol to report the proxy software about the connection the client attempts to make and so operates as transparently as possible while an HTTP proxy could interpret and copy headers (for instance to invoke another underlying protocol, such as File Transfer Protocol (FTP). Nevertheless an HTTP proxy normally forwards an HTTP request to the eligible HTTP server). Although an HTTP proxy has a variant model in mind, the CONNECT method permits forwarding TCP connections. Nevertheless SOCKS proxies may work in reverse and forward UDP traffic while HTTP proxies can’t. HTTP proxies usually are more aware of the HTTP protocol and they perform higher-level filtering. However that normally only applies to POST and GET methods but not the CONNECT method.

SOCKS

Let's take an example: Rob wishes to communicate with Jack over the internet, but a firewall between them operates on his network. Therefore Rob is not authorized to associate with Jack directly. Hence Rob connects to the SOCKS proxy on his network and informing SOCKS proxy about the connection he wills to make to Jack. SOCKS proxy starts a connection through the firewall and eases the communication between Rob and Jack.

HTTP

Rob wishes to download a web page from Jack who runs a web server. Rob can’t directly join Jack’s server as firewall has been put on his network. To get in touch with the server Rob connects to his network HTTP proxy. His web browser communicates straight to the proxy in the same way it would communicate directly with Jack’s server if it could. It transmits a standard HTTP request header. The HTTP proxy connects to Jack’s server and then sends back to Rob any data Jack’s server returns.