Skip to content

udp_over_tcp ​

sing-box UDP-over-TCP (UoT): UDP packets travel inside a TCP connection to the server, through the special destination address sp.v2.udp-over-tcp.arpa. It is needed when the server or the path to it does not let UDP through. The server must understand UoT (sing-box, ours).

The field is written in the protocol block of an outbound. It works for socks and shadowsocks. For shadowsocks with UoT the mux block has no effect, as in sing-box.

The presence of the field enables UoT: udp_over_tcp: {} is version 2; enabled is not written.

FieldTypeDefaultMeaning
version1 or 22The UoT protocol version; versions above 2 are an error

The incoming side of UoT is understood by the socks, mixed and shadowsocks inbounds: a connection to sp.v2.udp-over-tcp.arpa (or sp.udp-over-tcp.arpa for version 1) becomes a UDP session.

Example ​

yaml
outbounds:
  socks-uot:
    socks:
      server: 192.0.2.10:1080
      udp_over_tcp:
        version: 2
route:
  final:
    outbound: socks-uot

GPL-3.0-or-later