跳转至
编辑此页

Shadowsocks 出站(type: ss)

支持经典 AEAD 加密、Shadowsocks 2022 BLAKE3 加密,以及 obfs、v2ray-plugin 和 shadow-tls v3 插件。

  • 编译特性:shadowsocks(默认 standard 构建已启用)。
  • connect-via / dialer-proxy:支持 TCP 与 UDP。

字段

YAML 键名 类型 必填 默认值 说明
name、server、port、connect-via(dialer-proxy) 通用字段 是(connect-via 可选) — 标准出站选项。
cipher string 是 — 加密算法(见下方支持列表)。
password string 是 — 密码或 SS2022 Base64 PSK。
udp bool 否 true 是否启用 UDP 转发。
plugin string 否 无 可选 "obfs"、"v2ray-plugin" 或 "shadow-tls";设置时必须提供 plugin-opts。
plugin-opts map 设置 plugin 时必填 无 插件专属参数(见下文)。

支持的加密方式

ClashRS 精确支持以下 8 种加密方式:

  • aes-128-gcm
  • aes-256-gcm
  • chacha20-ietf-poly1305
  • xchacha20-ietf-poly1305
  • 2022-blake3-aes-128-gcm
  • 2022-blake3-aes-256-gcm
  • 2022-blake3-chacha20-ietf-poly1305
  • rc4-md5

插件配置

plugin-opts 键名 类型 必填 默认值 说明
password string 是 — ShadowTLS v3 密码。
host string 否 "bing.com" TLS 握手 SNI 主机名。
strict bool 否 true 是否开启严格模式。
proxies:
  - name: ss-shadowtls
    type: ss
    server: proxy.example.com
    port: 443
    cipher: 2022-blake3-aes-128-gcm
    password: "BASE64_PSK"
    udp: true
    plugin: shadow-tls
    plugin-opts:
      host: www.example.org
      password: "shadowtls-password"
      strict: true
plugin-opts 键名 类型 必填 默认值 说明
mode string 是 — 仅支持 "websocket"。
host string 否 "bing.com" WebSocket Host 头与 TLS SNI。
path string 否 ""(发包自动转为 "/") WebSocket 路径。
tls bool 否 false 是否启用 TLS。
port u16 否 tls 为 true 时 443,否则 80 仅用于 WebSocket Upgrade Host 头。
skip-cert-verify bool 否 false 是否跳过证书校验。
headers map 否 {} 附加请求头(未包含 Host 时自动补全)。
mux bool 否 false 设为 true 会直接报错(不支持 mux)。
proxies:
  - name: ss-v2ray-ws
    type: ss
    server: proxy.example.com
    port: 443
    cipher: aes-256-gcm
    password: "password"
    plugin: v2ray-plugin
    plugin-opts:
      mode: websocket
      tls: true
      host: ws.example.com
      path: /ws

启动时会输出弃用警告。

plugin-opts 键名 类型 必填 默认值 说明
mode "http" | "tls" 是 — 混淆模式。
host string 否 "bing.com" 伪装的 HTTP / TLS 主机名。
proxies:
  - name: ss-obfs
    type: ss
    server: proxy.example.com
    port: 8388
    cipher: aes-256-gcm
    password: "password"
    plugin: obfs
    plugin-opts:
      mode: tls
      host: www.example.com