I know a socks proxy is a proxy which just relays the traffic to the dst ip:port And a HTTP Proxy which support CONNECT request, it also just relays the traffic to the dest host in the http request header Is there any difference in their functions(efficiency eg)?
They are both proxy protocols for layer 4, but...
SOCKS can handle TCP and UDP
HTTP CONNECT can handle only TCP
SOCKS are not encrypted (note: authentication ≠ encryption)
HTTP CONNECT can use TLS
SOCKS are dedicated service
HTTP CONNECT can be cloaked in normal HTTP service
Both SOCKS and HTTPS proxies use the corresponding protocols (SOCKS and HTTP respectively).
These types of proxies offer almost the same functionality, with the difference that SOCKS proxy sits on a dedicated port and HTTPS proxy can be combined with HTTP proxy or even with an HTTP server (or other hybrid construct).
One more benefit of HTTPS proxy is that some admins block SOCKS proxies and allow HTTP/HTTPS connections, so it becomes possible to bypass NAT/firewall restrictions using HTTPS proxy.
On the other hand, some HTTPS proxies are configured to allow connections to remote HTTP and HTTPS hosts only (i.e. not to custom ports of other protocols).
There's no difference in "efficiency". Once the downstream connection to the destination server is established, they'll behave exactly the same.
A SOCKS proxy is basically a TCP proxy. Any TCP connection can work via a SOCKS proxy. A HTTP proxy proxies HTTP requests. Only HTTP sessions can go over a HTTP proxy.
But there's a problem: In HTTPS, the session is encrypted, so the HTTP proxy won't allow it. Solution: Allow "HTTP CONNECT". This basically makes the HTTP proxy behave as a TCP proxy.
So basically, you can think of the functionality of an HTTP proxy (which supports HTTP CONNECT) as a super-set of the functionality of a SOCKS proxy. It does exactly what a SOCKS proxy does - and a bit more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With