Proxies
Rotating Residential Proxies
from $2.42
ISP Proxies (Static Residential)
from $4.00
Rotating Datacenter Proxies
from $1.21
Rotating Mobile Proxies
from $4.84
Locations
Learn

What is a SOCKS5 proxy?

Last updated

Short answer

A SOCKS5 proxy relays network connections between your application and a destination without reading or changing the traffic. Unlike an HTTP proxy, it works with any TCP-based protocol, and supports username and password authentication and UDP where the provider enables it. Use SOCKS5 for non-web traffic or tools that prefer it.

How does a SOCKS5 proxy work?

SOCKS5 is defined in RFC 1928. A connection goes through four steps:

  1. Greeting. Your application connects to the proxy and lists the login methods it supports.
  2. Authentication. The proxy picks a method, for example username and password (RFC 1929), and checks your credentials.
  3. Connect request. Your application sends the destination as an IP address or a host name and port.
  4. Relay. The proxy connects to the destination and passes bytes in both directions until either side closes the connection.

The proxy never reads or rewrites what passes through, which is why SOCKS5 works with almost any protocol that runs over TCP.

SOCKS5 vs HTTP proxies

SOCKS5 proxyHTTP proxy
Traffic it carriesAny TCP protocol, and UDP where enabledHTTP, plus HTTPS through a CONNECT tunnel
Reads your trafficNoCan read plain HTTP; HTTPS stays encrypted
Changes headersNeverMay add headers to plain HTTP requests
DNS lookupsOn your machine, or at the proxy with socks5hAt the proxy
Typical useNon-web traffic and tools with SOCKS supportWeb scraping, browsers and HTTP libraries

For websites, both work. Most scraping libraries support HTTP proxies first, so use HTTP unless you need what only SOCKS5 offers.

SOCKS4 vs SOCKS5

SOCKS4 handles TCP only and has no password login. SOCKS4a added host names. SOCKS5 adds username and password authentication, UDP, IPv6 and host names, so it has replaced SOCKS4 almost everywhere.

socks5 vs socks5h

Both schemes use the same protocol. The difference is where the host name is resolved:

  • socks5://: your machine looks up the IP address, then asks the proxy to connect to it. The DNS query leaves from your network.
  • socks5h://: your machine sends the host name, and the proxy resolves it. The lookup happens in the proxy's location.

Use socks5h when you want location-accurate DNS and no lookups from your own network.

When should you use SOCKS5?

  • Non-HTTP traffic, such as custom TCP protocols, on the ports the network allows.
  • Applications with built-in SOCKS support but no HTTP proxy setting.
  • Clean tunnelling, when you do not want any proxy to touch HTTP headers.

How to use SOCKS5 with FuseProxy

Every FuseProxy plan supports HTTP, HTTPS, SOCKS5. Point your client at the SOCKS5 port with your credentials:

curl -x "socks5h://USERNAME:PASSWORD@HOST:PORT" https://api.ipify.org

Protocols has Python and Node.js examples and the port for each protocol. SOCKS5 proxies covers plans and pricing.

FAQ

Questions, answered

Is SOCKS5 faster than an HTTP proxy?
Slightly, in some cases. A SOCKS5 proxy only relays bytes and never parses HTTP, so there is a little less work per request. In practice, the speed of the proxy IP and the distance to the destination matter far more than the protocol.
Is a SOCKS5 proxy secure?
SOCKS5 does not encrypt anything. It changes the IP address the destination sees, but the connection to the proxy, including the username and password, is not encrypted. Use HTTPS or another encrypted protocol to the destination to protect your data.
Does a SOCKS5 proxy hide my IP address?
Yes, from the destination. The website or service sees the proxy's IP address instead of yours. Use the socks5h scheme so that DNS lookups also go through the proxy rather than leaving from your own network.
What is the difference between SOCKS5 and a VPN?
A VPN encrypts all traffic from your device through a tunnel. A SOCKS5 proxy handles only the applications you configure to use it and adds no encryption. Proxies are usually used by software, such as scrapers and testing tools, while VPNs protect a person's whole device.

Start with the proxies you need

Create an account, top up and connect in minutes. Every price is on the pricing page.