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.
1. Recommended Dual-Stack & QoS Template
Section titled “1. Recommended Dual-Stack & QoS Template”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 = truetunnel_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 = truepublic_key = "REPLACE_WITH_SITE_B_PUBLIC_KEY"
[peer.ipv6]enabled = truetunnel_address = "2001:db8:1::2/128"
[frp]server_addr = "relay.example.com"server_port = 7000token = "REPLACE_WITH_FRP_TOKEN"shared_secret = "REPLACE_WITH_SHARED_SECRET"tls = truetransport_protocol = "quic"
[wireguard]mode = "auto"private_key = "REPLACE_WITH_SITE_A_PRIVATE_KEY"
[forwarding]authorize_enable = truemode = "nftables"
[p2p]prefer_family = "ipv4"listen_port = 51821family_standby = true
[p2p.qos]enabled = trueprobe_interval = "1s"probe_timeout = "2s"rtt_ratio_threshold = 1.3rtt_min_diff = "15ms"loss_diff_threshold = 0.05switchback_holddown = "30s"Architectural Principles
Section titled “Architectural Principles”- 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 = truepromotes the pre-established IPv6 direct channel instantly without tear-down.
- When set to
- STCP Relay Ultimate Safeguard:
- Regardless of dual-stack direct reachability, setting
allow_relay = trueguarantees that if bidirectional P2P connectivity fails completely, encrypted payload traffic gracefully diverts through theserver_addrrelay without dropping user sessions.
- Regardless of dual-stack direct reachability, setting