Are you an LLM? You can read better optimized documentation at /en\wiki\shadowsocks.md for this page in Markdown format
Shadowsocks protocol
Shadowsocks, created by @clowwindy, is the classic proxy protocol. Its simplicity, efficiency and compatibility have made it one of the most widely used proxy protocols in the world.
Characteristics
- ⚡ Simple and efficient: a lean design with excellent performance
- 🔐 Many ciphers: supports a range of modern encryption algorithms
- 🌍 Great compatibility: clients exist on virtually every platform
- 🚀 Low latency: small overhead means fast responses
- 📱 Cross-platform: works on all mainstream operating systems and devices
Configuration examples
AEAD cipher (recommended)
json
{
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-gcm",
"password": "your-password",
"network": "tcp"
}
]
}AEAD cipher — 2022 edition
json
{
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss-2022-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-256-gcm",
"password": "your-password",
"network": "tcp"
}
]
}UDP support
json
{
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss-udp-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-gcm",
"password": "your-password",
"network": "udp"
}
]
}Load balancing across servers
json
{
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss-1",
"server": "server1.example.com",
"server_port": 8388,
"method": "aes-128-gcm",
"password": "password1"
},
{
"type": "shadowsocks",
"tag": "ss-2",
"server": "server2.example.com",
"server_port": 8388,
"method": "aes-128-gcm",
"password": "password2"
},
{
"type": "urltest",
"tag": "auto",
"outbounds": ["ss-1", "ss-2"],
"url": "http://www.gstatic.com/generate_204",
"interval": 300
}
]
}Choosing a cipher
AEAD ciphers (recommended)
| Cipher | Security | Performance | Recommendation | Note |
|---|---|---|---|---|
| aes-128-gcm | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Best balance, recommended |
| aes-192-gcm | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | Slightly stronger |
| aes-256-gcm | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | Strongest |
| chacha20-ietf-poly1305 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Ideal for mobile devices |
| xchacha20-ietf-poly1305 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | Very strong |
2022 ciphers
| Cipher | Key length | Salt length | Recommendation | Note |
|---|---|---|---|---|
| 2022-blake3-aes-128-gcm | 128 bits | 16 bytes | ⭐⭐⭐⭐⭐ | The modern standard, recommended |
| 2022-blake3-aes-192-gcm | 192 bits | 16 bytes | ⭐⭐⭐⭐ | A balanced choice |
| 2022-blake3-aes-256-gcm | 256 bits | 16 bytes | ⭐⭐⭐⭐ | High security |
| 2022-blake3-chacha20-ietf-poly1305 | 256 bits | 16 bytes | ⭐⭐⭐⭐⭐ | Ideal for mobile devices |
Legacy ciphers (not recommended)
| Cipher | Security | Status | Note |
|---|---|---|---|
| aes-128-ctr | ⭐⭐⭐ | Deprecated | Insecure, do not use |
| aes-192-ctr | ⭐⭐⭐ | Deprecated | Insecure, do not use |
| aes-256-ctr | ⭐⭐⭐ | Deprecated | Insecure, do not use |
| aes-128-cfb | ⭐⭐ | Deprecated | Known security issues |
| aes-192-cfb | ⭐⭐ | Deprecated | Known security issues |
| aes-256-cfb | ⭐⭐ | Deprecated | Known security issues |
Advanced configuration
Plugin support
json
{
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss-obfs-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-gcm",
"password": "your-password",
"plugin": "obfs-local",
"plugin_opts": "obfs=tls;obfs-host=www.bing.com"
}
]
}Load balancing
json
{
"outbounds": [
{
"type": "urltest",
"tag": "auto",
"outbounds": ["ss-1", "ss-2", "ss-3"],
"url": "http://www.gstatic.com/generate_204",
"interval": 300
}
]
}Round-robin group
json
{
"outbounds": [
{
"type": "loadbalance",
"tag": "loadbalance-out",
"outbounds": ["ss-1", "ss-2"],
"strategy": "round-robin"
}
]
}Use cases
- Everyday internet access
- Mobile device proxying
- Cross-platform use
- Scenarios that need something simple and stable
Pros and cons
Pros
- A simple protocol that is easy to configure
- Excellent performance and low latency
- The best compatibility, with plenty of clients
- A mature ecosystem with strong community support
- Plugin support for extra capabilities
Cons
- Traffic characteristics are fairly obvious
- May be identified on restricted networks
- No built-in anti-detection
- Usually needs an obfuscation plugin alongside it
Performance tuning
Server side
- Pick uncommon ports: avoid well-known port numbers
- Enable BBR: better TCP performance
- Deploy multiple ports: spread the load
- Use quality routes: keep network quality high
Client side
- Choose a cipher that suits the device: match CPU capability
- Enable UDP: better DNS and gaming experience
- Configure routing rules: keep domestic traffic off the proxy
- Optimize DNS: use a fast DNS resolver
Security recommendations
- Strong passwords: use complex passwords and rotate them
- AEAD ciphers: avoid deprecated legacy ciphers
- Obfuscation plugins: enable them on restricted networks
- Port strategy: avoid default ports
- Access control: enforce IP allowlists
Common issues
Connection failures
- Check the password and cipher
- Confirm the server address and port
- Verify firewall settings
- Check the network connection state
Slow speeds
- Try a different cipher
- Check server load
- Tune local network settings
- Use load balancing
DNS resolution issues
- Configure a reliable DNS server
- Avoid your ISP's DNS resolver
- Consider DoH/DoT