Skip to content
Edit this page

Proxy Protocol Inbounds (Shadowsocks, AnyTLS, Hysteria2)

ClashRS can act as an authenticated proxy server using shadowsocks, anytls, and hysteria2 listeners. All three support multi-user credentials (users) that populate IN-USER routing rules and /user-stats traffic accounting, and support in-place user hot reloads via inbound-providers.

Multi-User Entry Format (InboundUser)

users:
  - name: alice
    password: "user-specific-password"
  - name: bob
    password: "another-password"

The name field is recorded as inbound_user on the session for IN-USER rules and GET /user-stats.


Shadowsocks Inbound (type: shadowsocks)

  • Feature: shadowsocks (enabled in standard / default builds).
  • Transport: TCP + optional UDP (udp defaults to true).

Fields

Key Type Required Default Description
cipher string Yes — Any cipher supported by ClashRS Shadowsocks (see Shadowsocks Outbound).
password string Yes — Single-user password, or the server PSK for Shadowsocks 2022 multi-user EIH.
udp bool No true Enable UDP relay on the listener.
users list[InboundUser] No [] SS2022 multi-user EIH entries (password must be Base64 user key).
listeners:
  - name: ss2022-server
    type: shadowsocks
    listen: 0.0.0.0
    port: 8388
    allow-lan: true
    cipher: 2022-blake3-aes-128-gcm
    password: "BASE64_SERVER_PSK"
    udp: true
    users:
      - name: alice
        password: "BASE64_ALICE_KEY"

AnyTLS Inbound (type: anytls)

  • Feature: Built-in (all platforms).
  • Transport: TCP with TLS; UDP is multiplexed over the same connection via UoT v2.

Fields

Key Type Required Default Description
password string Yes — Single-user plaintext password (active when users is empty).
users list[InboundUser] No [] Multi-user plaintext passwords; when non-empty, replaces password. Duplicate passwords are rejected during validation.
certificate string No Self-signed localhost cert PEM certificate chain file path or inline PEM. Must be paired with private-key.
private-key string No Self-signed localhost key PEM private key file path or inline PEM. Must be paired with certificate.
fallback string No None host:port fallback address for TLS connections that fail password authentication (e.g. a local web server for active-probe camouflage). Unauthenticated connections are dropped when unset.
listeners:
  - name: anytls-server
    type: anytls
    listen: 0.0.0.0
    port: 8443
    allow-lan: true
    password: "default-password"
    certificate: certs/fullchain.pem
    private-key: certs/privkey.pem
    fallback: 127.0.0.1:80
    users:
      - name: alice
        password: "alice-password"

Hysteria2 Inbound (type: hysteria2)

  • Feature: Built-in (all platforms).
  • Transport: QUIC (UDP) with ALPN h3 and HTTP/3 authentication (POST https://hysteria/auth). TCP uses QUIC bidirectional streams; UDP uses QUIC datagrams.

Fields

Key Type Required Default Description
password string Yes — Single-user plaintext password (active when users is empty).
users list[InboundUser] No [] Multi-user list (replaces password when non-empty).
certificate string No Self-signed localhost cert PEM certificate chain path or inline PEM. Must be paired with private-key.
private-key string No Self-signed localhost key PEM private key path or inline PEM. Must be paired with certificate.
listeners:
  - name: hy2-server
    type: hysteria2
    listen: 0.0.0.0
    port: 8443
    allow-lan: true
    password: "default-password"
    certificate: certs/fullchain.pem
    private-key: certs/privkey.pem
    users:
      - name: alice
        password: "alice-hy2-password"