A SOCKS5 proxy is a proxy server that relays your network traffic through an intermediary without reading or changing what is inside it. It works with almost any application, not just web browsers, because it forwards raw connections rather than web requests. That flexibility is the reason it exists.
The name comes from the protocol, not from a product. SOCKS5 is version 5 of the SOCKS protocol, defined in RFC 1928 in March 1996. It sits between the application layer and the transport layer, which the RFC calls a shim layer. Your app asks it to open a connection to a host and port, and the proxy passes the bytes back and forth. For the wider family of proxy types, start with our guide to the types of proxies.

What Is a SOCKS5 Proxy?
A SOCKS5 proxy is a transport-layer proxy. When your application connects to one, the proxy opens a TCP connection to the destination you named, or associates a UDP port for UDP traffic, and then relays data between you and the destination. It never parses the content, so it can carry web pages, email, file transfers, games, chat, and custom protocols alike.
That is the core difference from an HTTP proxy. An HTTP proxy understands HTTP: it reads request lines, headers, and URLs. A SOCKS5 proxy does not understand any application protocol. It only knows the destination host and port, and it moves bytes. That makes it more flexible, and also less helpful: it cannot cache pages, filter content, or rewrite headers.
SOCKS is sometimes written out as “Socket Secure”, although the original RFC does not define it as an acronym. A SOCKS proxy server is the server that runs the protocol, and a SOCKS5 proxy is one running version 5, the current version. If you need the basics first, our guide to what is a proxy server covers the foundations.
How Does a SOCKS5 Proxy Work?
A SOCKS5 session has four steps: a short handshake, then the relay.

- Greeting. Your application connects to the SOCKS5 server, conventionally on TCP port 1080, and lists the authentication methods it supports.
- Method selection and authentication. The server picks one method. The methods defined in RFC 1928 are no authentication, GSSAPI, and username and password. If the server accepts none of your methods, it answers with no acceptable methods and the connection closes.
- Request. Your application sends a request with a command and a destination: an IPv4 address, an IPv6 address, or a domain name, plus a port. The commands are CONNECT, BIND, and UDP ASSOCIATE.
- Reply and relay. The proxy opens the connection and answers with a reply code. From then on, data flows through unchanged, and the destination sees the proxy’s IP address, not yours.
Because the proxy relays raw bytes, the rest of the connection behaves as if your application had connected directly, apart from the changed source address. Encryption still comes from the application: HTTPS, TLS, SSH, or a VPN tunnel running through the proxy.
SOCKS5 or SOCKS5h: Who Looks Up the Address?
One detail catches people out. With socks5, your own machine resolves the destination hostname before asking the proxy to connect. With socks5h, the proxy resolves the hostname instead, so the DNS lookup does not come from your own network. The convention comes from cURL, which uses socks5h:// for proxy-side resolution and socks5:// for local resolution.
If you care about keeping DNS lookups off your local network, use the h variant:
curl --socks5-hostname user:pass@proxy.example.com:1080 https://example.com
In Python, libraries such as requests accept a socks5h:// proxy URL the same way.
SOCKS4 vs SOCKS5
SOCKS5 is an extension of SOCKS4, and the differences are practical rather than cosmetic.
| SOCKS4 | SOCKS5 | |
|---|---|---|
| TCP support | Yes | Yes |
| UDP support | No | Yes, through UDP ASSOCIATE |
| Authentication | None | No auth, username and password, GSSAPI |
| Addressing | IPv4 only | IPv4, IPv6, and domain names |
| Proxy-side DNS | No, SOCKS4a adds it | Yes, with the socks5h form |
| Standard | Early practice | RFC 1928, March 1996 |
SOCKS4 only handles TCP, only accepts IPv4 addresses, and has no authentication at all. Anyone who can reach a SOCKS4 server can use it. SOCKS4a, a later extension, adds domain-name addressing.
SOCKS5 adds UDP forwarding, IPv6 and domain-name addressing, and negotiated authentication. It also defines the BIND command for protocols that need an incoming connection, such as active FTP. In practice, SOCKS4 survives only in old setups. Anything new should use SOCKS5.
SOCKS5 vs HTTP Proxy
The choice between them is usually obvious once you know what traffic you need to carry.
| SOCKS5 proxy | HTTP proxy | |
|---|---|---|
| Layer | Between application and transport | Application layer, HTTP only |
| Traffic it carries | Any TCP or UDP traffic | HTTP, and HTTPS through a CONNECT tunnel |
| Reads the content | No, relays raw bytes | Yes for plain HTTP, no for HTTPS in a tunnel |
| Authentication | Username and password, GSSAPI, or none | Username and password in a header |
| Caching and filtering | No | Possible for plain HTTP |
| DNS resolution | Proxy-side with socks5h | Proxy-side for the CONNECT target |
| Typical port | 1080 | 8080, 3128, or provider-assigned |
Use an HTTP proxy for websites and HTTP tools. It understands the traffic, it can cache and filter, and every browser and HTTP library supports it.

Our HTTP vs HTTPS proxy comparison explains the HTTP side in full, including the CONNECT tunnel that carries HTTPS.
Use SOCKS5 when the traffic is not HTTP, when the application only speaks SOCKS, or when you want the proxy to resolve hostnames for you. Games, email clients, chat apps, torrent clients, and custom TCP tools are the usual cases. For HTTPS websites the two behave almost the same.
SOCKS5 is also the protocol that SSH dynamic forwarding creates. Running ssh -D 1080 user@server opens a local SOCKS5 proxy on your own machine that forwards traffic through the SSH server. That is a useful way to get a private SOCKS proxy without a provider, if you already have a server you trust.
What Is a SOCKS5 Proxy Used For?
Non-web applications. Any application that speaks TCP or UDP can use a SOCKS5 proxy, including email clients, games, and messaging apps that have no HTTP proxy setting.
Torrents and peer-to-peer traffic. Torrent clients commonly support SOCKS5, and UDP support matters because peer discovery and some transfers use UDP. A SOCKS5 proxy does not encrypt torrent traffic, and it does not hide it from the network operator.
Gaming. Games often need UDP for low-latency play, and they rarely support HTTP proxies. A SOCKS5 proxy with UDP support fits, although whether a given provider actually supports UDP varies, so confirm it before buying.
Scraping and automation. Scrapers that need to carry non-HTTP traffic, or that want proxy-side DNS resolution, use SOCKS5 endpoints from residential or mobile pools. Our guides to residential proxies and mobile proxies explain those pools.
SSH and remote access. SOCKS5 is the standard way to forward traffic through an SSH tunnel or a bastion host to reach internal services without exposing them directly.
Bypassing network restrictions. SOCKS5 can carry traffic out through a network that only allows certain applications, because it does not depend on HTTP. This is a legitimate use on networks you manage, and it is also a reason some networks block port 1080.

Does a SOCKS5 Proxy Encrypt Your Traffic?
No. SOCKS5 does not include built-in encryption. It hides your IP address from the destination, but your internet provider, your network operator, and anyone on the path can still read unencrypted traffic.
Encryption has to come from another layer. HTTPS encrypts web traffic, TLS encrypts mail and other protocols that support it, and SSH encrypts a tunnel that a SOCKS proxy runs inside. A VPN encrypts all of a device’s traffic. If you need encryption, pair SOCKS5 with one of those, or use a VPN instead. Our proxy vs VPN guide compares the two approaches, and the forward vs reverse proxy hub explains where proxies sit in a network.
The same warning applies to authentication. Username and password authentication proves who you are to the proxy. It does not encrypt the traffic, and on an unencrypted connection the credentials themselves travel in the clear.
Setting Up a SOCKS5 Proxy
Setup is usually a matter of entering four values in your application: host, port, username, and password. The port is conventionally 1080.
In a browser. Firefox supports SOCKS5 directly in its network settings, including a remote DNS option that behaves like socks5h. Chrome relies on the operating system proxy settings or an extension.
In curl. Use --socks5-hostname for proxy-side DNS resolution, or --socks5 for local resolution:
curl --socks5-hostname user:pass@proxy.example.com:1080 https://example.com
In Python. Libraries that support SOCKS, such as requests with the requests[socks] extra, accept a socks5h:// proxy URL in the same way.
With SSH. ssh -D 1080 user@server creates a local SOCKS5 proxy on port 1080 of your own machine, forwarding through the server. This is the fastest way to get a private SOCKS proxy if you already run a server.
Checking it works. After setup, check the exit IP from the application itself, for example by loading an IP-check page through the proxy. If the page shows the proxy IP, the relay is working. Our full setup walkthrough is in how to set up a proxy server, and our guide to how to check if a proxy works covers the checking tools.
Free SOCKS5 Proxies and Free Lists
Free SOCKS5 proxy lists are widely shared, and they are a poor choice for anything serious. A free SOCKS5 server has no accountable operator, so it can log traffic, inject content, or disappear without warning. Because SOCKS5 does not encrypt traffic, a malicious operator sees every unencrypted byte.
Free lists also have a practical problem: their addresses are shared by large numbers of people, so they are usually already blocked or rate-limited. A small paid SOCKS5 endpoint from a provider you can hold accountable, or a SOCKS proxy you run yourself over SSH, is safer than any free list. If you need a provider comparison, our guide to the best proxy providers is the place to go.
SOCKS5 Proxy Security Checklist

- Confirm UDP support before buying, if you need UDP. The protocol defines it, but support is optional and varies by provider.
- Use socks5h when DNS privacy matters, so lookups go through the proxy.
- Do not rely on SOCKS5 for encryption. Add HTTPS, TLS, SSH, or a VPN for that.
- Use authentication. An open SOCKS5 server with no authentication will be found and used by strangers.
- Check the exit IP after setup, and check it again when sessions change.
- Keep credentials out of shared files and screenshots.
Our VPN protocols compared guide covers the encryption side that SOCKS5 leaves out.
Watch: SOCKS5 Proxy Explained on Video
This short video from ProxyEmpire explains SOCKS5 and how it differs from an HTTP proxy, including the socks5 vs socks5h distinction.
SOCKS5 Proxy Explained (and SOCKS5 vs HTTP Proxies)
Frequently Asked Questions
What is a SOCKS5 proxy?
A SOCKS5 proxy is a proxy server that uses the SOCKS5 protocol, defined in RFC 1928, to relay TCP and UDP traffic without reading or changing it.
Is a SOCKS5 proxy safe?
It hides your IP address from the destination, but it does not encrypt your traffic by itself. Pair it with HTTPS, TLS, SSH, or a VPN when encryption matters, and avoid free SOCKS5 lists run by unknown operators.
What is the difference between SOCKS4 and SOCKS5?
SOCKS4 handles TCP only, IPv4 only, and has no authentication. SOCKS5 adds UDP forwarding, IPv6 and domain-name addressing, and authentication. SOCKS5 is the current version and the one to use.
What is the difference between a SOCKS5 proxy and an HTTP proxy?
An HTTP proxy understands HTTP and is built for web traffic, with caching and filtering for plain HTTP. A SOCKS5 proxy relays any TCP or UDP traffic without reading it, so it works with games, email, torrents, and other non-web applications. For HTTPS websites the two behave almost the same.
What port does SOCKS5 use?
Conventionally TCP port 1080, as stated in RFC 1928. Providers often use their own ports, so check the port in your credentials.
What does socks5h mean?
The h means the proxy resolves the destination hostname for you. With plain socks5, your own machine does the DNS lookup. With socks5h, the lookup happens through the proxy, so it does not come from your own network.
Can I use a SOCKS5 proxy for torrenting?
Yes, torrent clients commonly support SOCKS5, and UDP support is useful for peer traffic. SOCKS5 does not encrypt the traffic, and UDP support is optional, so confirm it with the provider before buying.
Do VPNs offer SOCKS5 proxies?
Some VPN services include a SOCKS5 proxy as an extra feature with a subscription. It is a proxy endpoint, not a VPN tunnel, so it does not encrypt traffic the way the VPN itself does.
Sources
10
- IETF, RFC 1928: SOCKS Protocol Version 5, March 1996. https://www.rfc-editor.org/rfc/rfc1928.txt
- IETF, RFC 1929: Username/Password Authentication for SOCKS V5. https://www.rfc-editor.org/rfc/rfc1929.txt
- Wikipedia, SOCKS. https://en.wikipedia.org/wiki/SOCKS
- MDN Web Docs, Proxy servers and tunneling. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Proxy_servers_and_tunneling
- NordVPN, What Is a SOCKS5 Proxy and Why Should You Use One? https://nordvpn.com/blog/socks5-proxy/
- Geonode, SOCKS5 Proxy Guide: What It Is, How It Works and Setup. https://geonode.com/blog/beginners-guide-to-socks5-proxies
- ProxyEmpire, What Is a SOCKS Proxy? SOCKS5 Explained and vs HTTP. https://proxyempire.io/socks-proxy/
- ProxyEmpire, SOCKS vs HTTP Proxy: SOCKS5 vs HTTP Differences Explained. https://proxyempire.io/socks-vs-http-proxy/
- DataGet, SOCKS5 Proxy Explained: How It Works and When to Use It. https://dataget.ai/blogs/socks5-proxy-explained/
- Shifter, What Is a SOCKS5 Proxy? https://shifter.io/glossary/socks5-proxy




