SOCKS5 proxies explained: how they differ from HTTP and when to use one
By the ProxyOnly team · 14 Nov 2026 · 6 min read · Updated 16 Nov 2026
What a SOCKS5 proxy is, how it differs from an HTTP proxy, what it does not hide, and how to set one up in curl, Python, Node.js and a browser.
If you have shopped for proxies you have seen two labels over and over: HTTP and SOCKS5. Sellers list both, forums argue about both, and it is rarely explained what the difference means for the thing you are trying to do. This article explains what a SOCKS5 proxy is, how it differs from an HTTP proxy, a mistake that leaks your DNS lookups, and how to configure one in the tools you probably use.
What SOCKS5 is
SOCKS5 is a general-purpose proxy protocol, defined in RFC 1928. An HTTP proxy understands web traffic. It reads your request, knows it is HTTP, and forwards it. A SOCKS5 proxy does not care what is inside the connection. You ask it to open a connection to a host and port, it does, and then it passes bytes back and forth in both directions.
Because of that, SOCKS5 can carry more than web traffic. Email, chat, file transfers, database connections, game traffic and your own custom protocol can all go through it, as long as the client supports SOCKS5. It can also carry UDP traffic through a feature called UDP associate, although many clients and many providers do not support that part, so do not assume it.
SOCKS5 also defines how you authenticate. The usual method is a username and password, described in RFC 1929, and some servers allow connections with no authentication at all.
SOCKS5 and HTTP proxies compared
- An HTTP proxy understands HTTP, so it can read the request, add headers, cache responses and filter content. It handles HTTPS by opening a tunnel with the
CONNECTmethod and then passing encrypted bytes through. - A SOCKS5 proxy does not read your traffic at all. It opens the connection and relays it.
- HTTP proxies are supported almost everywhere that makes web requests: browsers, HTTP libraries, scrapers, command line tools.
- SOCKS5 is supported by a smaller set of tools, but those include most browsers' settings, curl, many libraries through an add-on, and many desktop applications.
- SOCKS5 is the only choice for non-web traffic.
- For plain web requests the two behave almost the same from your side. SOCKS5 is sometimes described as faster because it does less work, but the difference is usually small and depends far more on the network than on the protocol.
What SOCKS5 does not do
A few things people assume that are not true.
SOCKS5 does not encrypt your traffic. It relays bytes as they are. If you connect to a website over HTTPS the traffic is encrypted between you and the website, as normal, and if you connect over plain HTTP it is not. A proxy, SOCKS5 or otherwise, is not a VPN, and proxy vs VPN explains where the two differ.
SOCKS5 does not make you anonymous. The proxy operator can see where you connect to, and with plain HTTP can see the contents too. Websites can still recognize you by cookies, accounts, browser fingerprints and behavior, whatever address you use.
SOCKS5 does not make a blocked site accessible by itself. What decides whether a site accepts the address is the type of address, which is a different question from the protocol. Our guide to choosing between datacenter, ISP, residential and mobile proxies covers that.
The DNS mistake: socks5 versus socks5h
This is the single most useful thing in this article.
Before your computer can connect to a website it has to turn the name into an address, which is a DNS lookup. With SOCKS5 you can do the lookup in two places. If the client does it locally, your own network sees which sites you are visiting, and the proxy only receives an address. If the client hands the name to the proxy, the proxy does the lookup, and it happens from the proxy's location.
Many tools tell these apart with the scheme in the proxy URL:
socks5://resolves names on your machinesocks5h://resolves names on the proxy
For most proxy jobs you want socks5h. If you are checking what a site looks like from another country, a local lookup can send you to a different server than a visitor in that country would reach, and it also leaks the names you are visiting to your own network. In curl the equivalent flag is --socks5-hostname. For the wider picture of how names and addresses escape a proxy, see DNS and WebRTC leaks.
Setting up SOCKS5 in common tools
In these examples, replace USER, PASS, HOST and PORT with the values from your dashboard. Do not paste your real credentials into a script you share. Read them from an environment variable.
curl
curl --proxy socks5h://USER:PASS@HOST:PORT https://httpbin.org/ipThe response shows the address the website saw. It should be the proxy's address, not your own.
Python
Requests needs an extra package to speak SOCKS.
pip install "requests[socks]"import requests
proxy = "socks5h://USER:PASS@HOST:PORT"
proxies = {"http": proxy, "https": proxy}
response = requests.get("https://httpbin.org/ip", proxies=proxies, timeout=30)
print(response.json())Node.js
npm install socks-proxy-agent axiosimport axios from "axios";
import { SocksProxyAgent } from "socks-proxy-agent";
const agent = new SocksProxyAgent("socks5h://USER:PASS@HOST:PORT");
const response = await axios.get("https://httpbin.org/ip", { httpAgent: agent, httpsAgent: agent });
console.log(response.data);Browsers
Firefox has a proxy setting under Network Settings. Choose manual proxy configuration, enter the host and port next to SOCKS Host, pick SOCKS v5, and tick the option to proxy DNS when using SOCKS v5. That last tick is the browser version of socks5h.
Chrome and other browsers based on it use the system proxy setting and, at the time of writing, do not support a username and password for a SOCKS5 proxy. If your proxy needs a login, use Firefox, an extension built for the purpose, or an HTTP proxy instead. Browser behavior changes, so check the current documentation if it matters to you.
Which one should you use?
Choose an HTTP proxy when you are making web requests and your tool supports it. It is supported everywhere, it is the easiest to set up, and it is what most guides and libraries assume.
Choose SOCKS5 when you need to carry something that is not HTTP, when an application only offers a SOCKS setting, or when you specifically want the proxy to resolve names for you.
If a tool supports both, the proxy type matters much less than the address type and the location. Choose those first.
A note on free SOCKS5 lists
Searches for a free SOCKS5 proxy turn up long public lists. Be careful with them. Anyone can run an open proxy, and the person who does can see everything you send in plain text and, for unencrypted connections, change it. Many listed proxies are slow, dead within hours, or set up to harvest traffic. They are not suitable for anything involving a login or a payment. If you want to try a proxy, use a small paid plan or a trial from a service that publishes what it is.
What about ProxyOnly
Our proxies are HTTP proxies, and each one comes with its own host, port, username and password, which work with every tool in our integration guides. The FAQ says orders are delivered with an HTTP proxy port, so if a tool only supports SOCKS5, contact support before you order.
If you are still working out which kind of proxy you need, read our guide to residential proxies and how to buy one, or start with the guide to ordering your first proxy. If a connection fails, fixing common proxy errors lists the usual causes. One that is specific to this article is pointing an HTTP proxy setting at a SOCKS port, or the other way round. The result is a confusing error rather than a clear one.
Try it yourself
Create an account, add funds from US$1 and order a proxy in the country you need.
Keep reading
25 Nov 2026 · Proxy basics
IP whitelisting (allowlisting) explained, and how static proxies help
IP allowlisting restricts access to a known set of addresses. Why it keeps breaking when your own address changes, and the fixes that actually hold.
25 Nov 2026 · Proxy basics
Buying IPv6 proxies: when they work and when they do not
IPv6 proxies cost a fraction of IPv4 because they only reach sites that publish an IPv6 address. How to check your targets before you spend anything.