diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-04 13:44:12 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-04 13:44:12 +0200 |
| commit | 8288714853952aca6b3511268b9d772f1b7f489f (patch) | |
| tree | f2a2b82bbf915a8e12853f6f85f3a930a0632d0a /packages/meshbay-node/src/meshbay_node/config.py | |
| parent | d85dbf5c0be71d870cc9b60510a2d43a9efc9f69 (diff) | |
| download | meshbay-8288714853952aca6b3511268b9d772f1b7f489f.tar.gz | |
fix(node): make ice_interfaces match adapters on Windows (W9)
`ice_interfaces` compared the operator's entry against ifaddr's
`adapter.name` only -- the kernel name on Linux (`wlp3s0f0`), but the adapter
GUID on Windows (`{846EE342-...}`). A setting written on Linux, or copied
into a Windows node's node.toml, matched no adapter at all.
The failure was silent and total rather than partial: aioice binds one socket
per host address, so an empty list means no sockets, no host candidates, and
an SDP offering only a reflexive address. The settings field is free text
with no picker, and on Windows the operator sees neither the GUID nor the
description -- `ipconfig` shows the connection name -- so an entry now
matches the adapter name, the device description, or one of the adapter's own
IPv4 addresses, case-insensitively. An address is the one identifier visible
on every platform.
A filter that matches nothing now falls back to the unfiltered list with a
warning. Losing the 5 s timeout saving is a regression; being silently
unconnectable is a defect.
Also fixes IPv4/IPv6 discrimination in the same loop: the two were told apart
by falling through to an `elif` that index-probed `ip.ip[0]` and `ip.ip[2]`,
which on an IPv4 str yields characters that compared unequal by luck rather
than by design. Now discriminated by isinstance.
WINDOWS-PORT.md claimed Transport had "no platform dependency"; it does.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtfG7z6wHWj8RKHCvxQtY1
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/config.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/config.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/config.py b/packages/meshbay-node/src/meshbay_node/config.py index 7be68a4..a5220cd 100644 --- a/packages/meshbay-node/src/meshbay_node/config.py +++ b/packages/meshbay-node/src/meshbay_node/config.py @@ -66,8 +66,12 @@ transcode_incompatible_video = true # ICE candidate gathering. By default, virtual/VPN interfaces (Tailscale, # libvirt, Docker) are auto-excluded — a STUN request that can't reach the # server holds the WebRTC answer for 5 seconds. Set this to restrict -# gathering to specific interfaces (by OS adapter name). -# ice_interfaces = ["wlp0s20f3", "eth0"] +# gathering to specific interfaces. An entry matches the OS adapter name, the +# device description, or one of the adapter's own IPv4 addresses, so a Windows +# host can be named by description or address rather than by its GUID. An +# entry that matches nothing is ignored with a warning rather than leaving the +# node with no candidates at all. +# ice_interfaces = ["wlp0s20f3", "eth0", "192.168.1.22"] # STUN servers for WebRTC ICE candidate gathering (NAT traversal). By default # four public servers are used; set this to override. Every server in the list |