16

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)?

Alexis
  • 1,080
  • 3
  • 21
  • 44

4 Answers4

14

They are both proxy protocols for layer 4, but...

  1. SOCKS can handle TCP and UDP
    HTTP CONNECT can handle only TCP

  2. SOCKS are not encrypted (note: authentication ≠ encryption)
    HTTP CONNECT can use TLS

  3. SOCKS are dedicated service
    HTTP CONNECT can be cloaked in normal HTTP service

Sista Fiolen
  • 621
  • 7
  • 9
9

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).

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121
5

Here's a comparison of them by three factors:

Factors SOCKS proxy HTTP proxy
Security SOCKS proxies do not have standard tunnel encryption. HTTP proxies can add a layer of security between the client and the server and can detect and deny suspicious data packets or spyware.
Functionality SOCKS proxies do not directly use the HTTP protocol. It is commonly used for more general purposes such as content streaming and P2P file sharing.

Since SOCKS proxies are protocol-agnostic, unlike HTTP proxies, they do not directly interpret or manipulate proxied traffic

SOCKS proxies are more flexible to deploy as they are not bound to specific network protocols. They are great for accessing connections that are behind a firewall.
HTTP proxies handle HTTP(S) traffic which is often used for retrieving information via web browsers. However, they can be configured for different use cases.


HTTP proxies can interpret network traffic between web servers and clients. Thus, they can be set up to filter content or cache web data.
Performance SOCKS proxies offer great speeds, making them ideal for downloading or transferring data via the internet.


Some rare software clients or very specialized systems may only support SOCKS.
Private HTTP proxies deliver decent load speeds and are better suited for managing more requests per second.
Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
3

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.

Kal
  • 371
  • 2
  • 7