Networking and developer tooling notes
Concepts
4 min read

HTTP vs SOCKS5 Proxy: Protocol Differences and Use Cases

HTTP proxies understand web requests and tunnel HTTPS through CONNECT. SOCKS5 proxies are protocol-agnostic and relay any TCP traffic, with UDP optional on the server side. Neither encrypts the hop to the proxy.

Editorial team

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: CONNECT for TCP, BIND for incoming connections, and UDP ASSOCIATE for 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.

AspectHTTP proxySOCKS5 proxy
Understands the application protocolYes, HTTP onlyNo, relays bytes
HTTPS handlingCONNECT tunnelPlain TCP relay
Non-web TCP (SSH, mail, databases)Only if the client can tunnel through CONNECTNatural fit
UDPNot supportedDefined by the protocol; depends on the server
AuthenticationBasic or other HTTP schemesUsername and password (RFC 1929)
Hostname lookupDone by the proxyClient'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.

References

HTTP proxy
SOCKS5
Proxy protocols
curl

FAQ

Is SOCKS5 faster or more secure than an HTTP proxy?
Not inherently. Both only relay traffic, and neither encrypts the connection between you and the proxy. Security of HTTPS pages comes from TLS running end to end between you and the website, which works through either proxy type. The real differences are what the proxy understands, how UDP is treated, and where hostnames are resolved.
What does the h in socks5h mean?
It stands for hostname. With socks5h, curl hands the domain name to the proxy and lets the proxy resolve it. With plain socks5, curl resolves the name locally and sends only the IP address. Use socks5h when the name should be resolved on the proxy side or when you do not want local DNS queries for the sites you visit.
Can a SOCKS5 proxy carry UDP traffic?
The SOCKS5 protocol defines a UDP ASSOCIATE command, but it is optional for a server to implement. An HTTP proxy cannot carry UDP at all. Before relying on a SOCKS5 proxy for UDP-based software, confirm that the specific service supports it. AnboVPN's HTTP/SOCKS5 proxy does not support SOCKS5 UDP.
Can I use the same username and password for HTTP and SOCKS5?
It depends on the provider. With AnboVPN's HTTP/SOCKS5 proxy, one IP is reachable over both protocols with a single set of credentials, so you can choose whichever your software supports. Other services may issue separate credentials or ports per protocol, so check the details your provider gives you.

Related posts

Getting Started

How Much VPN Data Do You Need? A Practical Way to Estimate It

Measure what your devices actually transfer in a normal week, convert video bitrate with GB per hour = Mbps x 0.45, then add a margin of 15 to 20 percent. Only traffic routed through the VPN counts, so routing choices matter as much as habits.

Data plan
Traffic estimate
Bitrate
Troubleshooting

Why Does My VPN Keep Disconnecting? A Troubleshooting Checklist

VPN drops almost always trace back to a short list: the network underneath changing or going idle, a NAT or firewall closing the flow, an MTU mismatch, power saving, conflicting software, or an exhausted account. Test them in that order.

VPN troubleshooting
NAT timeout
MTU
Troubleshooting

How to Read traceroute and mtr Reports: Loss, Latency, Hops

traceroute and mtr list the routers between you and a destination using packets with increasing TTL. Trust only loss that continues to the last hop and latency jumps that stay high from one hop onward. Loss on a single middle hop is usually ICMP rate limiting.

traceroute
mtr
Packet loss
Concepts

Split Tunneling and Smart Routing: Send Only Some Traffic via VPN

Split tunneling sends only selected traffic, by app, address or domain, through the VPN or proxy and lets the rest use your normal connection. It keeps local devices and bulk downloads off the tunnel, but you must verify what each side really does.

Split tunneling
Smart routing
Routing table