Definition
SOCKS5 is version 5 of the SOCKS protocol, which relays connections through a proxy and defines authentication negotiation, destination addressing, and commands including CONNECT and UDP ASSOCIATE.
The negotiation sequence
RFC 1928 describes a client opening a TCP connection to the SOCKS server, offering authentication methods, completing the selected method, and then sending its relay request. The destination can be an IPv4 address, a domain name, or an IPv6 address.
The server evaluates the request and returns a reply indicating success or a failure such as an unsupported command, an unreachable host, or a connection refused. These are SOCKS replies, not HTTP status codes. An HTTP 407 page and a SOCKS authentication failure belong to different protocol exchanges.
Protocol capabilities and service support
The specification includes CONNECT, BIND, and UDP ASSOCIATE. A product advertising SOCKS5 still needs to document which commands, addresses, and authentication methods its implementation allows. In particular, a SOCKS5 label is not evidence that a particular subscription accepts UDP traffic.
Port 1080 is conventional in the RFC, but a provider can assign another port. Use the actual service endpoint rather than replacing its port with a conventional value.
Encryption and DNS are separate choices
SOCKS5 is not automatically an encrypted transport. RFC 1929 explicitly warns that its username/password subnegotiation carries the password in cleartext. Destination TLS can protect application content but does not retroactively protect an earlier unencrypted proxy login.
Domain-name addressing allows the proxy to receive a hostname. Whether a client instead resolves that hostname locally depends on client configuration. For example, curl distinguishes local-resolution socks5 behavior from socks5h or --socks5-hostname behavior.
Sources
- RFC 1928: SOCKS Protocol Version 5
- RFC 1929: Username/Password Authentication for SOCKS V5
- curl: official manual
Sources checked on November 18, 2026. Examples are illustrative, not measurements of a live proxy service.
Related concepts
Frequently asked questions
Is SOCKS5 limited to web pages?
No. It relays supported network connections rather than requiring all application data to be HTTP.
Does SOCKS5 always encrypt my password?
No. The username/password method in RFC 1929 sends it in cleartext unless the surrounding transport provides protection.
Does SOCKS5 automatically resolve DNS remotely?
No. The client may send a hostname or a resolved IP address. Check the selected client mode.
Does SOCKS5 support ICMP ping?
RFC 1928 does not provide network-layer gateway services such as forwarding ICMP messages.
Is SOCKS5 always faster than HTTP?
The protocol label alone cannot establish that. Compare measured behavior for the same task and network conditions.