# SOCKS proxy

> A SOCKS proxy relays network connections at a lower level than an HTTP proxy, so it can carry almost any kind of traffic, not just web requests. SOCKS5 is the current version.

URL: https://residentialips.org/glossary/socks-proxy/  
Updated: 2026-11-28  
Publisher: ResidentialIPs Editorial Team

Also known as: SOCKS4, SOCKS4a, SOCKS server

## Key takeaways

- SOCKS works below HTTP: it relays raw TCP connections (and UDP in SOCKS5).
- It does not read or change application data such as HTTP headers.
- SOCKS4 is outdated; SOCKS4a added remote DNS; SOCKS5 added authentication, UDP and IPv6.
- Use SOCKS for non-web applications or when you want the client fully in control of what is sent.
- The traditional port is 1080.

## What is a SOCKS proxy?

SOCKS (short for “sockets”) is a protocol that lets a client ask a proxy to open a network connection on its behalf. After a short handshake, the proxy simply relays bytes. Because it does not care what those bytes are, SOCKS can carry web traffic, email, file transfer, SSH, game traffic or any custom TCP protocol. SOCKS5 can also relay UDP datagrams.

## SOCKS4, SOCKS4a and SOCKS5

|  | SOCKS4 | SOCKS4a | [SOCKS5](https://residentialips.org/glossary/socks5/) |
| --- | --- | --- | --- |
| TCP | Yes | Yes | Yes |
| UDP | No | No | Yes |
| IPv6 | No | No | Yes |
| Remote DNS (send hostname) | No | Yes | Yes |
| Authentication | User ID string only | User ID string only | Username/password, GSS-API |
| Status | Obsolete | Obsolete | Current standard (RFC 1928) |

Almost every provider today offers SOCKS5 only.

## SOCKS vs HTTP proxies

An [HTTP proxy](https://residentialips.org/glossary/http-proxy/) understands web requests and can cache, filter or rewrite plain HTTP. A SOCKS proxy never touches the content, which has two consequences: it is more flexible, and it will not accidentally add headers that reveal you. With HTTPS sites, the practical difference is small because HTTP proxies tunnel HTTPS anyway.

## When to choose SOCKS

- Desktop or server applications that are not browsers.
- Tools that need UDP, such as some VoIP and game clients (SOCKS5 only).
- When you want DNS resolution to happen at the proxy to avoid a DNS leak.
- SSH dynamic port forwarding (`ssh -D 1080`), which creates a local SOCKS proxy.

## What happens during a SOCKS connection

A SOCKS proxy works below the application layer. Your program opens a connection to the proxy, tells it which host and port to reach, and from then on the proxy just passes bytes in both directions. It does not understand or change what you send, which is why one SOCKS proxy can carry web traffic, email, file transfers or game data.

| Version | Authentication | Domain names | UDP | IPv6 |
| --- | --- | --- | --- | --- |
| SOCKS4 | User ID only | No | No | No |
| SOCKS4a | User ID only | Yes, resolved by the proxy | No | No |
| [SOCKS5](https://residentialips.org/glossary/socks5/) | None, username and password, or GSSAPI | Yes | Yes | Yes |

SOCKS4 and 4a are mostly historical. Every commercial provider today means SOCKS5 when it says SOCKS.

## Using SOCKS with common tools

```
# curl, letting the proxy resolve DNS (note the h)
curl --proxy socks5h://USER:PASS@proxy.example:1080 https://api.ipify.org

# SSH dynamic port forwarding creates a local SOCKS proxy
ssh -D 1080 user@your-server
```

The SSH example is a handy trick: it turns any server you can log into into a private SOCKS5 proxy on your own machine, with the traffic encrypted between you and the server.

## Where SOCKS falls short

SOCKS does not encrypt anything by itself, and browsers do not support SOCKS passwords natively. Some commercial residential networks also limit SOCKS to TCP. If your tool only speaks HTTP proxy, or you need features like header control, an [HTTP proxy](https://residentialips.org/glossary/http-proxy/) is simpler.

## SOCKS support in common software

| Software | SOCKS support |
| --- | --- |
| curl | SOCKS4, SOCKS4a, SOCKS5 and remote DNS (`socks5h`) |
| Firefox | SOCKS4 and SOCKS5 in network settings, with an option to proxy DNS |
| Chrome | SOCKS5 via command-line flag or system settings, no password support |
| Python requests | SOCKS5 with the `requests[socks]` extra |
| SSH | Creates a local SOCKS5 proxy with `-D` |
| Telegram and many messengers | Built-in SOCKS5 settings |

## SOCKS vs a VPN

Both can carry any kind of traffic, but they work differently. A SOCKS proxy is set per application, does not encrypt traffic and needs each program to support it. A VPN works at the operating system level, encrypts everything to the VPN server and needs no per-app setup. SOCKS is lighter and more flexible when only some applications should use another IP; a VPN is simpler when everything should.

## Choosing between SOCKS4 and SOCKS5 today

There is rarely a reason to choose SOCKS4. It lacks authentication, IPv6 and UDP. Some old tools and scanners still default to it, so check the setting if a SOCKS connection fails with a commercial provider.

## Frequently asked questions

### What does SOCKS stand for?

It is short for “sockets”, the programming interface for network connections. It is not an acronym in the usual sense.

### Is SOCKS faster than HTTP proxies?

The protocol overhead is similar. Speed depends far more on the proxy server and the network than on the protocol.

### Does a SOCKS proxy encrypt traffic?

No. SOCKS relays traffic as is. Use HTTPS or another encrypted protocol inside the connection.

### What port does a SOCKS proxy use?

Port 1080 is the traditional default, but commercial providers often use other ports. Use whatever port your provider lists.

### Can I use a SOCKS proxy on my phone?

Android supports proxies per Wi-Fi network for HTTP, and some apps accept SOCKS settings directly. On iOS, SOCKS usually requires a configuration profile or a third-party app.

## Sources and further reading

- [RFC 1928: SOCKS Protocol Version 5 (IETF)](https://www.rfc-editor.org/rfc/rfc1928)
- [RFC 1929: Username/Password Authentication for SOCKS V5 (IETF)](https://www.rfc-editor.org/rfc/rfc1929)
