Skip to content

ShadowsocksR — mihomo

mihomo includes a ShadowsocksR client outbound. Outbound only; no SSR inbound type exists.

Outbound

Entry under proxies: with type: ssr. Embeds BasicOption.

FieldTypeDefaultAllowed valuesDescription
namestring(required)<string>Unique proxy name.
serverstring(required)<host>Upstream server hostname or IP.
portint(required)<port>Upstream server port.
passwordstring(required)<string>Server password.
cipherstring(required)aes-256-cfb | aes-128-ctr | chacha20-ietf | rc4-md5 | <other SSR ciphers>SSR cipher. mihomo's name for `method`.
obfsstring(required)plain | http_simple | http_post | random_head | tls1.2_ticket_authObfuscation plugin.
obfs-paramstring(unset)<string>Obfs parameter (Host header for HTTP-style obfs).
protocolstring(required)origin | auth_aes128_md5 | auth_aes128_sha1 | auth_sha1_v4 | auth_chain_a | auth_chain_bProtocol-layer plugin.
protocol-paramstring(unset)<string>Protocol-layer parameter.
udpboolfalsetrue | falseAllow UDP packets to be relayed through this outbound.

Source: adapter/outbound/shadowsocksr.go:28-40 · pinned at v1.19.27 (5184081)

Examples

Plain SSR with chained auth:

yaml
proxies:
  - name: ssr-server
    type: ssr
    server: example.com
    port: 443
    password: <password>
    cipher: aes-256-cfb
    obfs: http_simple
    obfs-param: www.bing.com
    protocol: auth_chain_a
    protocol-param: "32"
    udp: true

TLS-ticket obfs:

yaml
proxies:
  - name: ssr-tls
    type: ssr
    server: example.com
    port: 443
    password: <password>
    cipher: chacha20-ietf
    obfs: tls1.2_ticket_auth
    obfs-param: www.bing.com
    protocol: auth_chain_b
    udp: true

Notes

  • SSR is legacy. Prefer the Shadowsocks AEAD / 2022 ciphers for new deployments — they have better forward secrecy and no known DPI distinguishers.
  • obfs and protocol are required fields in the YAML — even if you want the plain pass-through behavior, set them explicitly to plain and origin.
  • UDP relay (udp: true) interoperates with the original ShadowsocksR reference implementation but not with the libev fork that drops UDP-over-protocol-plugin combinations.

Cross-core notes

  • Xray-core does not support SSR. See SSR — Xray-core.
  • sing-box uses method (not cipher) and snake_case for the parameter fields (obfs_param, protocol_param). See SSR — sing-box.

Source: adapter/outbound/shadowsocksr.go:28-40 · v1.19.27 (5184081)

Core Tutorial by Argsment