Skip to content

Dual-Stack & QoS Configuration

Applicable version: technical preview (v0.5.1). This configuration illustrates dual-stack direct connectivity with active IPv6 fallback and intelligent QoS latency probing over an established frps underlay.


schema_version = 1
[site]
id = "site-a"
networks = ["198.51.100.0/24"]
tunnel_address = "198.51.100.1/32"
role = "proxy"
allow_relay = true
[site.ipv6]
enabled = true
tunnel_address = "2001:db8:1::1/128"
[peer]
id = "site-b"
networks = ["198.51.200.0/24"]
tunnel_address = "198.51.100.2/32"
role = "visitor"
allow_relay = true
public_key = "REPLACE_WITH_SITE_B_PUBLIC_KEY"
[peer.ipv6]
enabled = true
tunnel_address = "2001:db8:1::2/128"
[frp]
server_addr = "relay.example.com"
server_port = 7000
token = "REPLACE_WITH_FRP_TOKEN"
shared_secret = "REPLACE_WITH_SHARED_SECRET"
tls = true
transport_protocol = "quic"
[wireguard]
mode = "auto"
private_key = "REPLACE_WITH_SITE_A_PRIVATE_KEY"
[forwarding]
authorize_enable = true
mode = "nftables"
[p2p]
prefer_family = "ipv4"
listen_port = 51821
family_standby = true
[p2p.qos]
enabled = true
probe_interval = "1s"
probe_timeout = "2s"
rtt_ratio_threshold = 1.3
rtt_min_diff = "15ms"
loss_diff_threshold = 0.05
switchback_holddown = "30s"

  • Address Family Preference (prefer_family):
    • When set to ipv4, the hole-punching state machine prioritizes establishing IPv4 direct channels as the primary transport path.
    • If IPv4 connectivity experiences severe carrier degradation or NAT filtering, enabling family_standby = true promotes the pre-established IPv6 direct channel instantly without tear-down.
  • STCP Relay Ultimate Safeguard:
    • Regardless of dual-stack direct reachability, setting allow_relay = true guarantees that if bidirectional P2P connectivity fails completely, encrypted payload traffic gracefully diverts through the server_addr relay without dropping user sessions.