Tom Proctor 8819cf3ff1 wgengine/magicsock: skip stun4localport if explicitconf endpoints available
When a local port is set, we guess that users may have configured a
static port mapping on their router and add an endpoint that combines
their STUN-discovered IP address with their local port. It's
generally fine if this is invalid, as it simply won't work. However,
when there is explicit static endpoints configuration, there's no
point adding this guessed endpoint, because the user has told us
exactly what port mapping they set up for the client. This reduces
noise/confusion when debugging endpoints for multiple containerized
clients running on the same host, and should also make discovery
very marginally more efficient.

Note, this does not interact with TS_DEBUG_PRETENDPOINTS as that is
a temporary debug setting, and static endpoints configuration is the
only stable way to interact with explicitconf endpoints for now.

Updates #14674, #12578

Change-Id: I4b0788a12e413df0972cde5f102304f88a933df3
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
2025-06-10 10:07:34 +01:00
..
2024-04-16 15:32:38 -07:00