An HTTP proxy understands web requests and reaches HTTPS sites through a CONNECT tunnel, while a SOCKS5 proxy does not care what protocol you speak and simply relays connections for you. For browsers and most developer tools either one works. Pick SOCKS5 for non-web TCP clients, and HTTP when an application only offers an HTTP proxy field. This article reflects the situation as of November 2026.
How does an HTTP proxy work?
An HTTP proxy is a server that speaks HTTP to the client. For a plain http:// URL, the client sends the whole request to the proxy, which forwards it. For HTTPS, the client first asks the proxy to open a raw TCP connection to the destination, then performs TLS through that tunnel, so the proxy cannot read the encrypted content.
That request is the CONNECT method, defined in RFC 9110. A proxy that requires credentials answers with status 407 and the client retries with a Proxy-Authorization header:
CONNECT example.com:443 HTTP/1.1
Host: example.com:443
Proxy-Authorization: Basic dXNlcjpwYXNzd29yZA==
Once the proxy replies with a 2xx status, the connection becomes a plain byte pipe. The proxy knows the destination host and port, but not the page, headers or body inside the TLS session. For plain HTTP, however, the proxy can see and even modify everything, which is why HTTP-aware proxies are used for caching and filtering.
How does a SOCKS5 proxy work?
SOCKS5 (RFC 1928) is a small binary protocol that sits below the application. The client connects, agrees on an authentication method, sends a request with a command and a destination, and the proxy then relays bytes without interpreting them. Because it never parses HTTP, it works for SSH, mail, databases, or any TCP-based protocol.
- Authentication: username and password is defined in RFC 1929; "no authentication" is also allowed by the base protocol.
- Destination types: an IPv4 address, an IPv6 address, or a domain name. Sending a domain name lets the proxy do the DNS lookup.
- Commands:
CONNECTfor TCP,BINDfor incoming connections, andUDP ASSOCIATEfor UDP. The protocol defines UDP support, but whether a given proxy server implements it is up to that server.
Who resolves the domain name: my machine or the proxy?
With an HTTP proxy, the proxy normally resolves the hostname you request. With SOCKS5, it depends on the client: the client can resolve the name itself and send an IP address, or pass the name through and let the proxy resolve it. curl exposes this difference in the URL scheme.
socks5://: curl resolves the hostname locally, then sends the IP to the proxy.socks5h://: curl sends the hostname to the proxy, which resolves it. The "h" stands for hostname.
When a site is only resolvable from the proxy's side, or when you do not want local DNS queries to reveal what you visit, the h variant is the one to use.
How do the two protocols compare side by side?
The main practical differences are what the proxy understands, how UDP is handled, and where DNS happens. The table collects them in one place.
| Aspect | HTTP proxy | SOCKS5 proxy |
|---|---|---|
| Understands the application protocol | Yes, HTTP only | No, relays bytes |
| HTTPS handling | CONNECT tunnel | Plain TCP relay |
| Non-web TCP (SSH, mail, databases) | Only if the client can tunnel through CONNECT | Natural fit |
| UDP | Not supported | Defined by the protocol; depends on the server |
| Authentication | Basic or other HTTP schemes | Username and password (RFC 1929) |
| Hostname lookup | Done by the proxy | Client's choice (local or by the proxy) |
How do I test each one with curl?
Use curl with a placeholder proxy address and compare the verbose output. The -v flag shows the handshake, so you can see whether a CONNECT request is sent and which side resolved the name.
# HTTP proxy
curl -v -x http://user:password@proxy.example.com:8080 https://example.com -o /dev/null
# SOCKS5 proxy, hostname resolved by the proxy
curl -v -x socks5h://user:password@proxy.example.com:1080 https://example.com -o /dev/null
# Set a proxy for the current shell
export https_proxy=http://user:password@proxy.example.com:8080
If a password contains characters such as @ or :, percent-encode them in the URL, or pass credentials separately with --proxy-user. Remember that a proxy setting only matters for programs that actually read it; our earlier article on TUN mode vs system proxy explains which traffic each approach captures.
Does either protocol encrypt my traffic?
No. Neither HTTP nor SOCKS5 encrypts the hop between your machine and the proxy. HTTPS traffic stays encrypted end to end inside the tunnel because TLS runs between you and the website, but plain HTTP traffic and Basic credentials travel in the clear on that first hop unless the proxy itself is reached over TLS.
Which one should I choose?
Choose by what your software supports and what traffic you carry. If the client has a SOCKS field and you want name resolution on the proxy side, use SOCKS5. If it only has an HTTP field, or a corporate tool expects HTTP_PROXY, use HTTP.
- Browsers and fingerprint-style browser profiles: both work; use whichever the profile form offers.
- git, package managers, curl: both work; HTTP is the common default.
- SSH, database clients, chat or mail clients: SOCKS5 is the more natural fit.
- Anything that needs UDP: check that the specific proxy supports UDP before choosing SOCKS5. Do not assume it does. Our article on shared IP vs dedicated IP covers whole-device use as an alternative.
Where AnboVPN fits
AnboVPN's HTTP/SOCKS5 proxy gives you an IP of your own, reachable over both HTTP (including HTTPS tunnels) and SOCKS5 with the same username and password. SOCKS5 UDP is not supported. Authentication is by username and password by default, and you can also add a source IP allowlist so listed sources do not need the password. You can copy the proxy details as IP:port:username:password, one per line, for bulk import into other tools, and reset the password at any time (the old one stops working in about 30 seconds). Usage counts against your data plan, and the proxy stops when the data is used up. See the AnboVPN HTTP/SOCKS5 proxy page.






