English
Protocols
An inbound accepts connections, an outbound sends them. Inside an inbound or outbound, the protocol name is the key of its block (there is no type field). The shared blocks (tls, transport, dial, mux, reload) go with it. How the inbounds and outbounds sections, groups and routing work is in the configuration.
yaml
inbounds:
local: # the inbound's name (tag)
mixed: # the protocol
listen: 127.0.0.1:1080
outbounds:
proxy: # the outbound's name
shadowsocks: # the protocol
server: ss.example.com:8388
method: 2022-blake3-aes-128-gcm
password: 8JCsPssfgS8tiRwiMlhARg==
route:
final:
outbound: proxyAddresses are written as one string: listen: host:port for an inbound, server: host:port for an outbound ([2001:db8::1]:443 for IPv6). Separate listen_port/server_port fields are an error.
List
| Protocol | Kind | inbound | outbound | Transport | Mux | UDP | Works with | Description |
|---|---|---|---|---|---|---|---|---|
anytls | TLS | yes | yes | — | — | UoT | sing-box | AnyTLS: TLS with padding against length analysis |
block | route | — | — | — | — | — | — | Refusing a connection: the route action to: block, not an outbound |
direct | proxy | yes | yes | — | — | yes | — | A direct connection / an inbound with a fixed destination address |
http | proxy | yes | yes | — | — | — | sing-box | HTTP proxy (CONNECT and plain requests) |
mixed | local | yes | — | — | — | yes | — | HTTP and SOCKS on one port |
hysteria | QUIC | yes | yes | QUIC | — | yes | sing-box | Hysteria v1 over QUIC |
hysteria2 | QUIC | yes | yes | QUIC | — | yes | sing-box, Hysteria 2 | Hysteria 2 over QUIC |
mtproto | proxy | yes | — | — | — | — | Telegram | The Telegram proxy (MTProxy) behind fake TLS |
shadowsocks | proxy | yes | yes | v2ray-plugin | sing-mux | yes | sing-box, Xray | Shadowsocks AEAD and 2022 |
shadowtls | TLS | yes | yes | — | — | — | sing-box | ShadowTLS v1–v3: a handshake with a real site |
socks | proxy | yes | yes | — | — | yes | sing-box | SOCKS4/4a/5 |
redirect | local | yes | — | — | — | — | — | Linux transparent proxy for TCP via redirect/SO_ORIGINAL_DST |
tproxy | local | yes | — | — | — | yes | — | Linux TPROXY transparent proxy, auto_nft |
tun | local | yes | — | — | — | yes | — | A TUN device with auto_route and auto_redirect |
trojan | TLS | yes | yes | all | sing-mux | yes | sing-box, Xray | Trojan over TLS |
tuic | QUIC | yes | yes | QUIC | — | yes | sing-box, TUIC v5 | TUIC v5 over QUIC |
vless | TLS | yes | yes | all | sing-mux, mux.cool | XUDP | sing-box, Xray | VLESS: Vision, REALITY, XUDP, mux, VLESS Encryption |
wireguard | UDP | endpoint | endpoint | — | — | yes | sing-box, WireGuard | WireGuard: the endpoints section, both inbound and outbound |
Kind: what the protocol runs over or what it is for (local means for the local machine or router only). Transport: the transports it runs over (all five: ws, grpc, http, httpupgrade, xhttp), its own QUIC, or Shadowsocks' v2ray-plugin. Mux: the mux block (sing-mux) and VLESS's mux.cool. UDP: UoT is UDP over a TCP stream; shadowtls wraps another protocol, which carries UDP if it can. Works with: what an ours side of the protocol talks to on the other end.
There are no vmess, naive, ssh, tor or selector/urltest protocols (for choosing there are groups).
Common to all
- An inbound's address
listen: host:portis in the protocol block; socket settings (interface,fwmark,tcp,udp) are thelistenerblock, listen.md. - An outbound's dial parameters are the
dialblock. network(for the protocols that have it) istcp,udpor a list; both by default.- The
usersfield of inbounds: each user may have aname, which labels the log and the statistics; without anamethe user is denoted by a number. - Deprecated sing-box fields (
sniff,domain_strategyon inbounds, see listen.md;override_*on thedirectoutbound) are rejected at load time.