Shadowsocks
Shadowsocks 是一种基于 SOCKS5 的加密拆分代理。Surfboard 支持标准的 Shadowsocks 协议以及 simple-obfs 等常用扩展。
协议标准
- https://github.com/shadowsocks/shadowsocks-org/wiki/Protocol
- https://github.com/shadowsocks/simple-obfs
示例
# 带有 HTTP 混淆的标准 Shadowsocks 代理配置
ProxySS = ss, 1.2.3.4, 8000, encrypt-method=chacha20-ietf-poly1305, password=abcd1234, udp-relay=false, obfs=http, obfs-host=www.example.com, obfs-uri=/
# 使用 base64 编码密码的 Shadowsocks 2022 代理配置
ProxySS2022 = ss, 1.2.3.4, 8000, encrypt-method=2022-blake3-aes-256-gcm, password=YmFzZTY0LWVuY29kZWQtcGFzc3dvcmQtMzItYnl0ZXM=
格式
{proxy name} = {protocol}, {server}, {port}, {encrypt method}, {password}, {udp-relay}, {obfs}, {obfs host}, {obfs uri}
参数
| 名称 | 值 | 是否必填 | 备注 |
|---|---|---|---|
| proxy name | - | 是 | |
| protocol | ss shadowsocks custom | 是 | |
| server | - | 是 | 支持域名和 IP 格式。 |
| port | 0-65535 | 是 | |
| encrypt method | 2022-blake3-aes-128-gcm 2022-blake3-aes-256-gcm aes-128-gcm aes-192-gcm aes-256-gcm chacha20-ietf-poly1305 xchacha20-ietf-poly1305 rc4 rc4-md5 aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr bf-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb salsa20 chacha20 chacha20-ietf | 是 | 对于 Shadowsocks 2022 方法 (2022-blake3-aes-128-gcm 和 2022-blake3-aes-256-gcm),password 字段必须是长度正确的 base64 编码字符串:- 2022-blake3-aes-128-gcm: 16 字节(base64 为 24 个字符) - 2022-blake3-aes-256-gcm: 32 字节(base64 为 44 个字符) |
| password | - | 是 | 对于 2022 方法,这必须是一个 base64 编码的字符串。 |
| udp-relay | true false | 否 | 默认值: false。 |
| obfs | tls http | 否 | |
| obfs host | - | 默认值: cloudfront.net。仅在指定了 obfs 时适用。 | |
| obfs uri | - | 默认值: /。仅在 obfs 为 http 时适用。 |