01How each one works
An HTTP proxy understands web requests. For an http:// page your client sends it the full request. For an https:// page the client asks it to open a tunnel (the CONNECT method) and then talks to the site through that tunnel with its own encryption, so the proxy only sees the hostname, never the page.
A SOCKS5 proxy does not care what the traffic is. It opens a TCP connection to the host and port you ask for and passes bytes both ways. That makes it usable for things other than the web.
02Side by side
| HTTP(S) | SOCKS5 | |
|---|---|---|
| Web pages, http and https | Yes | Yes |
| Other TCP protocols | Only through CONNECT, if the client supports it | Yes |
| Login with username and password | Yes | Yes |
| Browsers with a proxy login | Yes | Chrome does not support SOCKS5 logins |
| DNS | Resolved by the proxy | By the proxy with socks5h, otherwise by you |
| Support in scraping tools | Everywhere | Most, sometimes with an extra package |
Speed is the same in practice. Both add one hop; the exit IP and the route matter far more than the protocol.
03Which to use
Use HTTP by default. Every tool supports it, browsers accept it with a login, and it carries https:// sites safely. Use SOCKS5 when the tool only speaks SOCKS, or when you are moving something that is not web traffic.
# The same gateway, the same login, either protocol
curl -x "http://USERNAME:PASSWORD@gw.fullstackproxy.com:47631" https://api.ipify.org
curl -x "socks5h://USERNAME:PASSWORD@gw.fullstackproxy.com:47631" https://api.ipify.org