Skip to content

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: proxy

Addresses 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 ​

ProtocolKindinboundoutboundTransportMuxUDPWorks withDescription
anytlsTLSyesyes——UoTsing-boxAnyTLS: TLS with padding against length analysis
blockroute——————Refusing a connection: the route action to: block, not an outbound
directproxyyesyes——yes—A direct connection / an inbound with a fixed destination address
httpproxyyesyes———sing-boxHTTP proxy (CONNECT and plain requests)
mixedlocalyes———yes—HTTP and SOCKS on one port
hysteriaQUICyesyesQUIC—yessing-boxHysteria v1 over QUIC
hysteria2QUICyesyesQUIC—yessing-box, Hysteria 2Hysteria 2 over QUIC
mtprotoproxyyes————TelegramThe Telegram proxy (MTProxy) behind fake TLS
shadowsocksproxyyesyesv2ray-pluginsing-muxyessing-box, XrayShadowsocks AEAD and 2022
shadowtlsTLSyesyes———sing-boxShadowTLS v1–v3: a handshake with a real site
socksproxyyesyes——yessing-boxSOCKS4/4a/5
redirectlocalyes—————Linux transparent proxy for TCP via redirect/SO_ORIGINAL_DST
tproxylocalyes———yes—Linux TPROXY transparent proxy, auto_nft
tunlocalyes———yes—A TUN device with auto_route and auto_redirect
trojanTLSyesyesallsing-muxyessing-box, XrayTrojan over TLS
tuicQUICyesyesQUIC—yessing-box, TUIC v5TUIC v5 over QUIC
vlessTLSyesyesallsing-mux, mux.coolXUDPsing-box, XrayVLESS: Vision, REALITY, XUDP, mux, VLESS Encryption
wireguardUDPendpointendpoint——yessing-box, WireGuardWireGuard: 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:port is in the protocol block; socket settings (interface, fwmark, tcp, udp) are the listener block, listen.md.
  • An outbound's dial parameters are the dial block.
  • network (for the protocols that have it) is tcp, udp or a list; both by default.
  • The users field of inbounds: each user may have a name, which labels the log and the statistics; without a name the user is denoted by a number.
  • Deprecated sing-box fields (sniff, domain_strategy on inbounds, see listen.md; override_* on the direct outbound) are rejected at load time.

GPL-3.0-or-later