SOCKS5
SOCKS5 is the latest version of the SOCKS proxy protocol. It routes any kind of network traffic — TCP and UDP — between a client and a server through a proxy, with optional authentication and no awareness of the underlying application.
Definition
SOCKS5 (Socket Secure 5) is a proxy protocol that operates at the session layer (layer 5) of the OSI model. It forwards network packets between a client and a destination through an intermediary proxy server, without inspecting or modifying the traffic itself. This protocol-agnostic design is what makes SOCKS5 so versatile: it works equally well for web browsing, email, file transfers, gaming, streaming and torrenting.
How SOCKS5 works
When a client connects, it performs a short handshake with the SOCKS5 proxy to negotiate an authentication method. Once authenticated, the client tells the proxy which destination host and port it wants to reach, and the proxy opens that connection on the client's behalf, relaying data in both directions.
SOCKS5 vs HTTP proxies
Unlike an HTTP proxy, which understands and can cache or filter web requests, SOCKS5 is a low-level tunnel that simply passes bytes through. That makes it faster and more flexible for non-web protocols, but it also means SOCKS5 does not add encryption on its own — you should layer TLS or a VPN on top if confidentiality matters.
- UDP support — handles real-time traffic like VoIP, gaming and DNS.
- Authentication — username/password and GSS-API methods restrict access.
- No traffic interpretation — lower overhead and broad compatibility.
Examples
curl --socks5 user:pass@proxy.example.com:1080 https://api.ipify.org
Setting SOCKS5 host, port and credentials in Firefox under Settings → Network Settings
Routing a Python requests session through a SOCKS5 proxy with requests[socks]
Common Use Cases
Frequently Asked Questions
Keep Learning
All termsDatacenter Proxy
A datacenter proxy is an IP address hosted on servers in a data center rather than assigned by an ISP — offering high speed and low cost, but easier for websites to detect.
Read definitionSSL/TLS
SSL/TLS is the encryption protocol that secures data in transit on the web — the 'S' in HTTPS — protecting it from eavesdropping and tampering.
Read definitionHTTP Proxy
An HTTP proxy is an intermediary server that forwards web (HTTP/HTTPS) requests on your behalf, able to read, cache and filter traffic at the application layer.
Read definitionResidential Proxy
A residential proxy routes your traffic through a real device with an IP assigned by an Internet Service Provider, so requests appear to come from a genuine home user rather than a server.
Read definition