Guide
HTTP vs HTTPS vs SOCKS4 vs SOCKS5
The four proxy types in the lists do different jobs. Pick the wrong one and pages break, DNS leaks or the connection is refused.
At a glance
| HTTP | HTTPS | SOCKS4 | SOCKS5 | |
|---|---|---|---|---|
| Works at | HTTP requests | TCP tunnel via CONNECT | TCP | TCP and UDP |
| Protocols you can send | HTTP only | Anything over TCP (mostly TLS) | Anything over TCP | Anything over TCP or UDP |
| Proxy can read your traffic | Yes, all of it | Only the target host | Only the target IP | Only the target host or IP |
| Hostname resolved by | Proxy | Proxy | You (SOCKS4a: proxy) | Proxy or you, your choice |
| Authentication | Basic | Basic | User ID only | Username/password, GSSAPI |
| IPv6 targets | Yes | Yes | No | Yes |
| Specification | RFC 9110 | RFC 9110 (CONNECT) | De facto, 1992 | RFC 1928 (1996) |
None of the four encrypts anything by itself. When the target is https://, TLS runs between your client and the target and the proxy sees only where you connect to. When the target is plain http://, every proxy type can read and change the traffic.
HTTP
The client sends the full URL to the proxy (GET http://example.com/ HTTP/1.1) and the proxy fetches it. Simple and widely supported, but the proxy sees and can rewrite everything, and it only handles HTTP.
HTTPS
In proxy lists, HTTPS means an HTTP proxy that accepts CONNECT host:443. It opens a raw tunnel and steps aside, so your client speaks TLS directly with the target. This is what browsers and most HTTP libraries use when you set an http:// proxy for https:// URLs.
SOCKS4
A plain TCP relay that does not care what protocol runs inside. Its weak points: no UDP, no IPv6, no real authentication, and in the original version your machine has to resolve the hostname, so the lookup goes to your own DNS resolver.
SOCKS5
The successor adds UDP, IPv6, proper authentication and the option to let the proxy resolve hostnames. Use socks5h:// in curl and Python to make the proxy do the DNS lookup. If your client supports SOCKS5, use it.
Which one to use
- Scraping HTTPS sites: HTTPS or SOCKS5.
- Scraping plain HTTP where you want the proxy to handle the request: HTTP.
- Non-web protocols (SMTP, IRC, game servers, custom TCP): SOCKS5, or SOCKS4 if that is all the client speaks.
- UDP (DNS, QUIC, VoIP): SOCKS5 only.
Lists: HTTP · HTTPS · SOCKS4 · SOCKS5. More background in SOCKS4 vs SOCKS5.