Skip to content

Tun server

A layer-3 TUN interface. Routing traffic into it is configured by the OS.

Fields

tag

  • Type: string
  • Required: yes

default-outbound

  • Type: string (optional)
  • Required: no

name

  • Type: string (optional)
  • Required: no

Leave unset to let the OS choose a name (utunN on macOS).

ipv4

  • Type: Ipv4Net
  • Required: no
  • Default: 172.19.0.1/30

ipv6

  • Type: Ipv6Net (optional)
  • Required: no
  • Default: fdfe:dcba:9876::1/126

IPv6 interface address and prefix. Set to null to disable IPv6; omitting this field enables IPv6 with the default address.

mtu

  • Type: u16
  • Required: no
  • Default: 1500

max-sessions

  • Type: usize
  • Required: no
  • Default: 1024

Shared limit for TCP connections and UDP client sessions.

idle-timeout

  • Type: u64
  • Required: no
  • Default: 300

Shared idle timeout in seconds, used when a protocol-specific setting is omitted.

tcp-idle-timeout

  • Type: u64 (optional)
  • Required: no

TCP socket timeout in seconds, managed by smoltcp. Set to 0 to disable. Defaults to idle-timeout when omitted.

udp-idle-timeout

  • Type: u64 (optional)
  • Required: no

UDP session inactivity timeout in seconds, refreshed by either direction. Defaults to idle-timeout when omitted.