aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/daemon.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-29 14:49:11 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-29 14:49:11 +0200
commitbe57cf9c3b499c8e59a94d13059f16f1456fcae1 (patch)
tree674e7d32ea6c1def0a4b86e40bad5eda3ba04c1d /packages/meshbay-node/src/meshbay_node/daemon.py
parentc4813d1aaf1f4fdf3eb9dc07909f324f5745544d (diff)
downloadmeshbay-be57cf9c3b499c8e59a94d13059f16f1456fcae1.tar.gz
perf(node): filter ICE interfaces to eliminate 5s STUN timeout on VPN/virtual adapters
aioice sends STUN binding requests from every IPv4 interface and waits up to 5 seconds for all to complete. On a machine with Tailscale (wt0), the STUN request never gets a response, adding a fixed 5-second penalty to every WebRTC connection — measured at 6 s total (vs 1-2 s without it). Auto-exclude virtual/VPN adapters (tailscale, virbr, docker, veth, podman, cni) and CGNAT-range IPs (100.64.0.0/10). Operator can override with ice_interfaces in node.toml [node] section for explicit control. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/daemon.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py
index 779ad91..c708ec6 100644
--- a/packages/meshbay-node/src/meshbay_node/daemon.py
+++ b/packages/meshbay-node/src/meshbay_node/daemon.py
@@ -454,6 +454,11 @@ class NodeDaemon:
denylist = self._denylist
# 6. WebRTC transport (browser clients)
+ from meshbay_node.transport.ice_filter import install as install_ice_filter
+ install_ice_filter(
+ self._config.node.ice_interfaces or None,
+ )
+
first = next(iter(groups_ctx.values()), None)
if WEBRTC_AVAILABLE:
self._webrtc = WebRTCTransport(