Skip to content

tuic ​

TUIC v5 over QUIC: the client authenticates with a key derived from its TLS session (UUID and password), then there is a QUIC stream for each TCP connection, and UDP goes as QUIC datagrams or a stream per packet. Compatible with sing-box tuic and the official TUIC v5.

TLS (the tls block) is required on both sides; both sides must set the same ALPN (usually h3). The shared QUIC fields are in quic.md.

Inbound ​

FieldTypeDefaultMeaning
userslist of {name, uuid, password}—Users; uuid is required
congestion_controlcubic, new_reno, bbrcubicCongestion control
auth_timeoutduration3sHow long to wait for the client to authenticate
zero_rtt_handshakeboolfalseAccept 0-RTT (faster, but vulnerable to replay)
heartbeatduration10sThe heartbeat interval

Socket settings are the listener block (the server listens on UDP).

Outbound ​

FieldTypeDefaultMeaning
serverhost:portrequiredThe server address
uuidstringrequiredThe user's UUID
passwordstring—The password
congestion_controlcubic, new_reno, bbrcubicCongestion control
relaynative, quic, streamnativeHow UDP goes: native — QUIC datagrams, quic — a stream per packet (reliable, lossless), stream — UDP-over-TCP over a TUIC stream. The sing-box udp_relay_mode, udp_over_stream are an error with a hint
zero_rtt_handshakeboolfalse0-RTT handshake
heartbeatduration10sThe heartbeat interval
networktcp, udp or a listbothWhat to pass

Blocks: tls (required), dial.

Example ​

yaml
inbounds:
  tuic-in:
    tuic:
      listen: ":8443"
      congestion_control: bbr
      users:
        - name: alice
          uuid: b831381d-6324-4d53-ad4f-8cda48b30811
          password: secret
      tls:
        certificate_path: /etc/ours/cert.pem
        key_path: /etc/ours/key.pem
        alpn: [h3]
outbounds:
  tuic-out:
    tuic:
      server: tuic.example.com:8443
      uuid: b831381d-6324-4d53-ad4f-8cda48b30811
      password: secret
      congestion_control: bbr
      tls:
        sni: tuic.example.com
        alpn: [h3]
      relay: native
route:
  final:
    outbound: tuic-out

GPL-3.0-or-later