Are you an LLM? You can read better optimized documentation at /en\wiki\shadowsocksr.md for this page in Markdown format
ShadowsocksR protocol
ShadowsocksR (SSR for short) is a fork of Shadowsocks developed by @breakwa11. It adds obfuscation, protocol plugins and replay protection on top of the original.
Characteristics
- 🔮 Stronger obfuscation: more powerful traffic obfuscation
- 🛡️ Replay protection: built-in defence against replay attacks
- 🔌 Protocol plugins: supports a range of protocol plugins
- 🎭 Traffic camouflage: can mimic various kinds of network traffic
- 📊 Traffic accounting: includes traffic statistics
Configuration examples
Basic configuration
json
{
"outbounds": [
{
"type": "shadowsocksr",
"tag": "ssr-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-ctr",
"password": "your-password",
"network": "tcp"
}
]
}With a protocol plugin
json
{
"outbounds": [
{
"type": "shadowsocksr",
"tag": "ssr-protocol-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-ctr",
"password": "your-password",
"protocol": "auth_aes128_md5",
"protocol_param": "userID:key",
"network": "tcp"
}
]
}With an obfuscation plugin
json
{
"outbounds": [
{
"type": "shadowsocksr",
"tag": "ssr-obfs-out",
"server": "example.com",
"server_port": 8388,
"method": "aes-128-ctr",
"password": "your-password",
"protocol": "origin",
"obfs": "tls1.2_ticket_auth",
"obfs_param": "www.bing.com",
"network": "tcp"
}
]
}Protocol plugins in detail
auth_aes128_md5
- AES-128-MD5 based authentication
- Provides replay protection
- Low performance overhead
auth_aes128_sha1
- AES-128-SHA1 based authentication
- Stronger than the MD5 variant
- Moderate overhead
auth_chain_a
- Chained authentication
- The strongest option
- Higher overhead
auth_chain_b
- Improved chained authentication
- Balances security and performance
- Recommended
Obfuscation plugins in detail
Basic obfuscation
origin
- No obfuscation
- Best compatibility
- Best performance
plain
- Plain-text obfuscation
- Simple to use
- Limited effect
HTTP obfuscation
http_simple
- Disguises traffic as HTTP requests
- Good for web-facing environments
- Average camouflage
http_post
- Disguises traffic as HTTP POST
- Looks closer to real traffic
- Higher overhead
TLS obfuscation
tls1.2_ticket_auth
- Disguises traffic as TLS
- Excellent camouflage
- Moderate overhead
tls1.2_ticket_fastauth
- Faster TLS obfuscation
- Optimized authentication
- Better performance
Other obfuscation
random_head
- Randomized packet headers
- Simple and effective
- Average compatibility
tlshello
- Disguises traffic as a TLS handshake
- Strong camouflage
- May be caught by advanced inspection
Use cases
- Countering deep packet inspection (DPI)
- Proxying on restricted networks
- Scenarios that need traffic camouflage
- High-security environments
Pros and cons
Pros
- Powerful obfuscation with strong camouflage
- Replay attack protection
- A rich set of protocol plugins
- Traffic characteristics are less obvious
- An active community
Cons
- Configuration is fairly complex
- Fewer clients than the original
- Some plugins may be detected
- Less actively maintained than the original
- The protocol stack is comparatively old
Compared with Shadowsocks
| Feature | Shadowsocks | ShadowsocksR |
|---|---|---|
| Obfuscation | Basic plugins | A full obfuscation system |
| Replay protection | None | Built in |
| Protocol plugins | None | Several available |
| Compatibility | Excellent | Good |
| Performance | Excellent | Good (some plugins add overhead) |
| Configuration complexity | Simple | More complex |
| Maintenance | Active | Relatively inactive |
Performance tuning
Choosing plugins
- Performance first: use origin or plain
- Balanced: use auth_chain_b with tls1.2_ticket_auth
- Security first: use auth_chain_a with heavier obfuscation
- Compatibility first: use origin with light obfuscation
Server side
- Choose a high-performance server
- Optimize network routing
- Configure ports sensibly
- Monitor server load
Security recommendations
- Plugin combinations: pick protocol and obfuscation plugins deliberately
- Rotate regularly: change passwords and plugin parameters periodically
- Multiple servers: spread risk across servers
- Monitor traffic: watch for abnormal traffic patterns
- Stay updated: keep clients and servers up to date
Troubleshooting
Connection problems
- Check the protocol and obfuscation plugin configuration
- Confirm the server supports those plugins
- Verify the password and parameters
- Check firewall rules
Performance problems
- Try different plugin combinations
- Disable plugins you do not need
- Optimize the server configuration
- Check network quality
Detection problems
- Switch to another obfuscation plugin
- Adjust the plugin parameters
- Use heavier obfuscation
- Consider moving to a different protocol