Shadowsocks, the Encrypted Proxy Built to Beat China's Firewall

Of 543 consumer VPNs in our data, 116 say they do not offer it. Below: the services that rank highest for it.

52consumer VPNs offer it
375do not say

Shadowsocks is a free, open-source encrypted proxy with an MIT licence, created in China in 2012 to survive the Great Firewall. A local client exposes a SOCKS5-style port on your device, encrypts the destination together with the payload, and a remote server decrypts it and relays the traffic onward.

A proxy written to get past the Great Firewall

A Chinese programmer known as clowwindy published the code in April 2012. Cheap resellers and one-click install scripts spread it to non-technical users. In August 2015 clowwindy wrote on GitHub that police had visited him and asked him to stop and delete the code; the original repository was emptied, and other developers kept the project going. The ShadowsocksR fork promised extra obfuscation but is abandoned.

The path of a request from ss-local to ss-remote

On the device, ss-local behaves like an ordinary SOCKS5 server: apps hand it connections, it encrypts the target address plus the payload and forwards the result to ss-remote. The first packet should carry the address together with some data, so no tiny tell-tale packet goes out alone. The remote side decrypts, reads the address, opens its own connection and encrypts replies back.

Both ends share one secret set in advance. No key exchange means no forward secrecy: whoever records your traffic and later learns the key can decrypt the recordings.

From stream ciphers to AEAD and Shadowsocks 2022

The oldest edition used stream ciphers, which encrypt without integrity checks. In February 2020 researcher Zhiniang Peng showed that a server running them can be abused as a decryption oracle, letting an attacker read recorded sessions without the password. They are deprecated.

AEAD ciphers, adopted in 2017, authenticate every chunk. The usual choices are chacha20-ietf-poly1305 and aes-256-gcm, but they still take a plain password and ship no replay protection. The Shadowsocks 2022 specification fixes both. It demands a random fixed-length base64 key instead of a password (16 bytes for 2022-blake3-aes-128-gcm, 32 for 2022-blake3-aes-256-gcm), gives every session a random salt, rejects anything more than 30 seconds off the clock, and remembers all incoming salts for 60 seconds.

How censors learned to recognise random-looking traffic

The IMC 2020 study explains the blocking waves reported since May 2019: the Great Firewall first flags a server from the length and entropy of its first data packet, where high-entropy openings were far more likely to be followed up. Then come active probes: replays of a recorded first packet plus random probes of different lengths. The researchers logged 51,837 probes over about four months, coming from thousands of IP addresses that appeared to be centrally controlled; some replays arrived within a second, others were held for weeks. A server without a replay filter answers a replay like a real client.

Signal What the censor checks What helps
First packet length and entropy of the opening bytes a plugin that shapes traffic like TLS
Replayed packets does the server answer a copy salt memory and the timestamp check
Random probes timing and closing behaviour probe-resistant server builds
Fully encrypted traffic crude real-time rules on the first packet traffic shaped like TLS

From November 2021 the firewall also blocked "fully encrypted" traffic in real time by rough rules on the first packet, which hits Shadowsocks, VMess and obfs4 alike.

Plugins and Outline

simple-obfs and v2ray-plugin

The SIP003 plugin interface changes what traffic looks like on the wire. simple-obfs wraps the stream in fake HTTP or TLS, an old and unmaintained trick. v2ray-plugin carries it over WebSocket inside real TLS, so a CDN can take the front position. The price: one more program on each end plus some speed.

Outline, Shadowsocks without the command line

Outline, an open-source tool from Jigsaw (part of Google), builds on Shadowsocks: Outline Manager deploys a server on a cloud machine you rent and hands out access keys, while Outline Client consumes them; the owner can set data limits per key. It uses AEAD ciphers only, added replay protection after the 2020 research, and has audits by Radically Open Security and Cure53. Watch out for fake "Outline" services with their own access keys.

Shadowsocks or a VPN

A VPN creates a virtual network interface and moves all system traffic through a tunnel with its own handshake. Shadowsocks proxies only the connections of apps that use its local port, though many clients offer a "VPN mode" that captures everything, so leak protection and a kill switch depend on the client. The protocol was designed to stay reachable under censorship, and whoever runs the server can see which sites you connect to. If you want it shipped as a ready service, see VPN services and apps that support Shadowsocks: of 377 services ranked, 33 list it, 102 say they do not offer it, and 242 publish nothing about it at all.

Questions people ask about Shadowsocks

Is Shadowsocks the same as SOCKS5?

Plain SOCKS5 sends traffic unencrypted. Shadowsocks speaks SOCKS5 only inside your device.

Can my ISP see that I use Shadowsocks?

Your provider notices a connection to a server and unreadable bytes; a filtering ISP can still guess from the first packet.

Is ShadowsocksR a newer version?

No, just an abandoned fork from around 2015.

The short version

Run the 2022 edition with a random base64 key rather than a password. Where probing runs hot, add a plugin, and keep a second protocol ready for the day the server gets flagged.