GlossaryProtocolsIntermediate

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.

Last updated May 28, 2026

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

1

curl --socks5 user:pass@proxy.example.com:1080 https://api.ipify.org

2

Setting SOCKS5 host, port and credentials in Firefox under Settings → Network Settings

3

Routing a Python requests session through a SOCKS5 proxy with requests[socks]

Common Use Cases

Web scraping that needs UDP or non-HTTP protocols
Bypassing firewalls that block direct connections
Routing torrent traffic through a proxy
Accessing geo-restricted services
Tunneling application traffic that HTTP proxies can't handle

Frequently Asked Questions

SOCKS5 supports authentication and carries more traffic types, but it does not encrypt traffic by itself. For confidentiality, combine it with TLS or use a VPN.
Yes. UDP support is a key addition over SOCKS4, which is why SOCKS5 suits streaming, gaming, VoIP and DNS.
Port 1080 is the conventional default, though providers often expose SOCKS5 on custom ports.