From 07e6e4271ea3a45e9cd364eb6ec05801a653d9e8 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 30 Aug 2026 22:17:30 +0200 Subject: feat: configurable STUN server fallbacks for WebRTC ICE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WebRTC transport relied on a single Google STUN server — if it was unreachable, ICE gathering waited the full 4s timeout. Now four public servers are used by default (Google ×2, Cloudflare, Mozilla), configurable via node.toml, the Node page UI, and the CLI (meshbay-node stun list|add| remove|reset). Changes are hot-swapped on the live transport. Co-Authored-By: Claude Opus 4.6 --- man/meshbay-node.1 | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'man') diff --git a/man/meshbay-node.1 b/man/meshbay-node.1 index 6f5552e..2ce1b58 100644 --- a/man/meshbay-node.1 +++ b/man/meshbay-node.1 @@ -165,6 +165,26 @@ Display all denied users, groups, and JTIs. Entries survive daemon restarts. Remove entries from the denylist. If an identifier is given, only that entry is removed; otherwise the entire list is cleared. . +.SS STUN servers +.TP +.B stun list +Display the STUN servers currently used for ICE candidate gathering. +. +.TP +\fBstun add\fR \fIurl\fR +Add a STUN server. The URL must start with +.BR stun: , +e.g.\& +.BR stun:stun.example.com:3478 . +. +.TP +\fBstun remove\fR \fIurl\fR +Remove a STUN server from the list. +. +.TP +.B stun reset +Reset the STUN server list to the built\-in defaults (four public servers). +. .SH OPTIONS .TP \fB\-\-config\fR \fIpath\fR @@ -283,6 +303,38 @@ real CPU per concurrent viewer. Set to .B false only when all viewers are known to decode the source codec natively. . +.TP +.B ice_interfaces +Whitelist of network interface names for WebRTC ICE candidate gathering. +When empty (default), virtual and VPN adapters are auto\-excluded: +Tailscale (tailscale*, wt*), libvirt (virbr*), Docker (docker*, veth*, +br\-*), Podman (podman*), and CNI (cni*). CGNAT\-range addresses +(100.64.0.0/10) are also excluded in auto mode. +Set to an explicit list to override auto\-detection: +.RS +.nf +ice_interfaces = ["wlp0s20f3", "eth0"] +.fi +.RE +. +.TP +.B stun_servers +List of STUN server URLs for WebRTC ICE candidate gathering (NAT +traversal). Each entry must start with +.BR stun: . +When empty (default), four public servers are used: +.IR stun.l.google.com:19302 , +.IR stun1.l.google.com:19302 , +.IR stun.cloudflare.com:3478 , +and +.IR stun.services.mozilla.com:3478 . +Set to an explicit list to override: +.RS +.nf +stun_servers = ["stun:stun.l.google.com:19302", "stun:stun.cloudflare.com:3478"] +.fi +.RE +. .SS [[groups]] One or more group sections, each hosting a set of named directories .RI ( roots ). @@ -537,6 +589,15 @@ max_concurrent_streams = 4 transcode_incompatible_video = false .fi .RE +.PP +Override STUN servers (in node.toml): +.PP +.RS +.nf +[node] +stun_servers = ["stun:stun.l.google.com:19302", "stun:stun.cloudflare.com:3478"] +.fi +.RE . .SH SEE ALSO .BR meshbay\-hub (1), -- cgit v1.2.3