Your proxy provider gives you two ports for the same IP. One says HTTP, the other says SOCKS5. Pick the wrong one and Chrome keeps asking for a password it will never accept, or curl quietly leaks every domain you visit to your own DNS resolver.
The usual advice is "SOCKS5 is faster and more secure". Neither part holds up.
SOCKS5 vs HTTP proxy is a choice about what your app can speak, who resolves DNS, and whether you need UDP. Encryption isn't on that list, because neither protocol encrypts anything. That's a VPN's job, and my proxy vs VPN comparison explains where one ends and the other starts.
I've gone through the specs (RFC 1928, RFC 1929, RFC 9110), curl's docs and Chromium's proxy notes. Below: what each one does, a side-by-side table, copyable curl commands and a simple rule for picking the port.

What is the difference between SOCKS5 and HTTP proxies?
The short answer: an HTTP proxy speaks HTTP and understands web requests. A SOCKS5 proxy doesn't care what you send. It opens a connection to a host and port for you and relays the bytes.
That one difference explains almost everything else in this post.
An HTTP proxy reads your request. For a plain http:// page, the client sends the full URL to the proxy, like GET http://example.org/page HTTP/1.1, and the proxy fetches it. RFC 9112 calls this the absolute-form. Because the proxy understands the request, it can cache it, filter it, add headers or block it.
A SOCKS5 proxy works one level lower. RFC 1928 describes it as a "shim-layer" between the application layer and the transport layer. Your app tells the proxy "connect me to this host on this port", and after that the proxy only moves data. It could be a web page, an email session, a database connection or a game.

SOCKS5 vs HTTP proxy: side-by-side comparison
Here's the whole comparison in one table. Every row comes from the RFCs and client docs linked in this post.
| HTTP proxy | SOCKS5 proxy | |
|---|---|---|
| Where it works | Application layer, understands HTTP | Between the app and transport layer, protocol-agnostic |
| Traffic it carries | HTTP directly, HTTPS and other TCP through CONNECT | Any TCP, plus UDP through UDP ASSOCIATE if both sides support it |
| HTTPS websites | CONNECT tunnel, then TLS end to end | Relays the TCP connection, TLS end to end |
| Authentication | Proxy-Authorization header, usually Basic | Username and password (RFC 1929) or GSSAPI |
| Encryption by itself | None | None |
| DNS resolution | The proxy resolves the hostname | Your choice: socks5 resolves locally, socks5h at the proxy |
| Can see or change requests | Yes for plain http://, no inside a CONNECT tunnel | No, it only relays bytes |
| Adds headers | The spec requires a Via header on forwarded HTTP | No headers, it doesn't speak HTTP |
| Default port | No fixed standard (Chrome assumes 80, curl 1080) | 1080 by convention |
| Chrome support | Yes, with Basic, Digest, NTLM or Negotiate auth | Yes, but no authentication at all |
| Good fit | Browsers, APIs, scrapers, n8n | Telegram, SSH tunnels, custom TCP apps, UDP |
Two rows in that table cause most of the trouble people run into: authentication in Chrome, and DNS. I'll get to both.
How does an HTTP proxy handle HTTPS? (the CONNECT tunnel)
For HTTPS, an HTTP proxy doesn't read your traffic. It builds a tunnel.
The client sends a CONNECT request with only a host and port, such as CONNECT example.com:443 HTTP/1.1. RFC 9110 says that once the proxy answers with any 2xx status, it switches to "blind forwarding of data, in both directions" until the tunnel closes. Your browser then runs TLS through that tunnel straight to the website.
So the proxy sees the hostname and port. It doesn't see the page, the cookies or the form you submit. As curl's own guide puts it, the proxy "cannot see nor modify the traffic without breaking the encryption".
Two catches matter here:
- The hostname in the CONNECT line travels to the proxy in the clear. Chromium's proxy docs say this directly.
- Most HTTP proxies only allow CONNECT to port 443 and a few others. RFC 9110 tells proxies to restrict it, because an open CONNECT to port 25 could be used to relay spam.
That second point matters if you want to push something other than HTTPS through an HTTP proxy, like SSH or IMAP. The CONNECT mechanism can carry any TCP stream, but your provider decides which ports it allows. SOCKS5 has no such convention, so it's the easier choice for non-web TCP.
This sounds good on paper, but what about plain http:// pages? Those go to the proxy unencrypted, and the proxy can read and modify them. That's true of SOCKS5 too. If the site itself isn't on HTTPS, no proxy protocol fixes that.
How does a SOCKS5 connection work?
A SOCKS5 connection starts with a short handshake before any of your data moves. RFC 1928 defines three steps.

Greeting. The client opens a TCP connection to the proxy (port 1080 by convention) and lists the authentication methods it supports. The proxy picks one, or replies that none are acceptable and the client must hang up.
Auth. If the proxy picked username and password, the client sends both (RFC 1929). A status of success lets it continue. Anything else, and the server must close the connection.
Connect. The client sends a request with a command and a destination. There are three commands: CONNECT for a normal TCP connection, BIND for protocols where the server connects back to the client (RFC 1928's example is FTP), and UDP ASSOCIATE for UDP. The destination can be an IPv4 address, an IPv6 address or a domain name.
That last detail is the reason socks5h exists. If the client sends a domain name, the proxy resolves it. If the client resolves it first and sends an IP, your own DNS server saw the lookup.
socks5 vs socks5h: where does DNS get resolved?
This is the one letter that causes the most leaks.
curl's documentation spells it out. With socks5:// (or --socks5), curl resolves the hostname on your machine and sends the proxy an IP. With socks5h:// (or --socks5-hostname), curl sends the hostname and the proxy resolves it. Python Requests follows the same convention and says so in its docs.
Why care? If your machine resolves the name, your ISP or local DNS resolver sees every domain you visit, even though the website sees the proxy's IP. For scraping that's mostly harmless. For anything where you don't want your local network to see where you go, it defeats the point.
HTTP proxies don't have this switch. The client sends the hostname in the URL or the CONNECT line, and the proxy resolves it. Chromium's docs confirm Chrome always defers name resolution to an HTTP proxy, and with SOCKS5 it also always resolves at the proxy side. Firefox lets you choose, through the network.proxy.socks_remote_dns setting.
My take: use socks5h every time you have the choice. There's rarely a good reason to resolve locally when you're already paying for a proxy. If you want to confirm it's working, my guide on how to test a proxy for DNS and WebRTC leaks has a terminal-only DNS check.
Do SOCKS5 or HTTP proxies encrypt your traffic?
No. Neither one does, and this is the myth worth killing.
Look at how each sends your password:
- HTTP proxies usually use Basic authentication. RFC 7617 says Basic only Base64-encodes user-id:password and calls it "not a secure method of user authentication" without TLS. Base64 is an encoding, not encryption. Anyone on the path can reverse it.
- SOCKS5 username and password auth is no better. RFC 1929's security section says the request "carries the password in cleartext" and isn't recommended where sniffing is possible.
What protects your data is TLS between your app and the website, which happens the same way through both. A proxy that "supports HTTPS" means it supports the CONNECT tunnel, not that it encrypts anything itself.
There is a real encrypted option: an HTTPS proxy, where your client talks TLS to the proxy itself. curl supports it with an https:// proxy scheme, and Chromium's docs say this keeps the CONNECT hostname hidden, and your credentials travel inside TLS too. The catch is that many providers label a plain HTTP proxy with CONNECT support as "HTTP(S)". Ask which one you're getting.
Which is faster, SOCKS5 or HTTP?
Neither is faster in any way you can rely on. I haven't benchmarked them for this post, and I'd be suspicious of anyone who quotes a universal winner.
Here's what the protocols do on each new connection:
- SOCKS5 needs a greeting, an optional auth exchange and a connect request before your data flows. That's a few extra round trips to the proxy per connection.
- An HTTP proxy with plain http:// sends the request straight away. For HTTPS, it sends one CONNECT request and waits for the reply before TLS starts. If the client doesn't send credentials up front, a 407 challenge adds another round trip.
Once the tunnel is up, both only move bytes. From then on, speed depends on the proxy server, how far it is from you and the target, and how loaded its network is. A proxy in the wrong country costs you far more than any handshake.
One real difference does show up in Chromium's docs. Chrome caps HTTP/1.1 proxies at 32 simultaneous connections across all sites. HTTPS proxies using HTTP/2 avoid that limit. That matters for heavy browser automation, not for normal browsing.
Which apps need SOCKS5 and which need an HTTP proxy?
In practice, your app usually makes this decision for you. Here's what the official docs say for the tools people ask about most.
| App or tool | HTTP proxy | SOCKS5 | Note |
|---|---|---|---|
| Chrome | Yes, with auth | Yes, without auth | Chrome supports no SOCKS5 authentication |
| Firefox | Yes | Yes | Remote DNS for SOCKS is a setting |
| curl | Yes (default) | Yes | Use socks5h:// for remote DNS |
| Python Requests | Yes | Yes, with requests[socks] | socks5h:// for remote DNS |
| n8n HTTP Request node | Yes | Not documented | The Proxy option asks for an HTTP proxy |
| Telegram | Some apps | Yes | Also supports MTProto proxies |
| UDP apps (games, calls, some torrent clients) | No | Only if UDP ASSOCIATE works | Check the provider supports UDP |
Browsers
The surprise is Chrome. Chromium's proxy documentation says plainly: "No authentication methods are supported for SOCKSv5 in Chrome". If your provider gives you a SOCKS5 proxy with a username and password, Chrome can't use it directly. Use the HTTP port with the same credentials, whitelist your IP with the provider, or put a local SOCKS client in between.
Chrome also uses SOCKS5 only for TCP page requests. It can't relay UDP through it.
curl, scrapers and scripts
For web scraping, an HTTP proxy is the simpler default. Every HTTP library supports it, auth is built in, and HTTPS goes through CONNECT without extra setup. Choose SOCKS5 when the provider only offers it, or when you need non-HTTP traffic from the same script. Your choice of protocol is separate from the IP type: residential proxies and datacenter proxies often come with both HTTP and SOCKS5 ports.
n8n and automation tools
The n8n HTTP Request node has a Proxy option, and n8n's docs describe it as the place to "specify an HTTP proxy". Stick with HTTP there. My guide to proxies for n8n workflows covers which proxy types fit which jobs.
Telegram
Telegram's own proxy page says its apps generally support two types: SOCKS5 (server, port and an optional username and password) and MTProto. Some apps also support HTTP proxies. If you're only routing Telegram, MTProto is usually the better pick, and I compared both in my post on Telegram proxies.
Games, voice calls and torrents
These lean on UDP, and that's the one job an HTTP proxy can't do in the classic setup. SOCKS5 can, through UDP ASSOCIATE. But RFC 1928 lets the relay silently drop datagrams it won't forward, and RFC 8828 (the WebRTC IP handling spec) notes that most SOCKS proxies don't support UDP at all. Check that both your app and your provider support it before you buy.
There is a newer standard, RFC 9298 (2022), that lets HTTP proxies carry UDP the way CONNECT carries TCP. Good to know, but treat provider support for it as something to ask about, not assume.
How do you use each one with curl?
These commands are straight from curl's documentation, with placeholder hosts. Replace USER, PASS, the host and the port with your provider's details.
Three mistakes that break these commands:
- Leaving out the port. curl's man page says a proxy without a port is assumed to be on 1080, even for HTTP proxies. If your HTTP proxy listens on 8080, say so.
- Pointing http:// at a SOCKS port. With no scheme, or http://, curl treats the proxy as HTTP. A SOCKS port needs socks5:// or socks5h:// in front.
- Special characters in the password. curl URL-decodes credentials in the proxy string, so an @ in the password must be written as %40.
For Python Requests, the same rules apply. Install the extra with pip install "requests[socks]", then pass socks5h:// URLs:
SOCKS5 or HTTP proxy: which should you use?

Ask one question first: is it only web traffic?
Pick an HTTP proxy if:
- You're browsing, scraping or calling APIs over HTTP and HTTPS.
- You use Chrome with a username and password.
- The tool only asks for an HTTP proxy, like n8n's HTTP Request node.
Pick SOCKS5 if:
- The app isn't a web client: Telegram, an SSH tunnel, an email client, a database tool or a custom TCP app.
- You need UDP, and your provider confirms UDP ASSOCIATE support.
- You want explicit control over DNS, using socks5h.
Skip the protocol debate if your real need is encryption or hiding all of your device's traffic. Neither protocol does that. A VPN does.
Many proxy plans list both HTTP and SOCKS5 support, so this often changes which port you type in, not what you buy. The IP type and the session type (rotating vs sticky) matter far more to whether your target lets you in.
Frequently asked questions
If you're choosing a provider next, look at the IP pool, the session options and the price per GB before the protocol list. Most of the providers I've compared list both HTTP and SOCKS5, and the comparison shows which ones are worth paying for.


