Repository navigation
fix(nat): gate endpoint evidence on external probe - #30
Open
hoshiizumiya wants to merge 2 commits into
Open
hoshiizumiya wants to merge 2 commits into
hoshiizumiya wants to merge 2 commits into
Conversation
hoshiizumiya
marked this pull request as ready for review
October 3, 2026 10:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Observed behavior
The NATMap port-test path used the local bound UDP port as the traversal server's external probe target. That is only correct when the NAT preserves the port. The mapping snapshot also had no state that distinguished a STUN observation from independently verified reachability.
Change
announce_port, trackers, DHT, firewall authorization or automatic start behavior.30981bef.Why this matters
A STUN response describes the mapping toward one STUN server; it does not prove that another Internet endpoint can reach it. Conversely, asking an external server to probe the private/local port can produce the wrong result whenever the NAT rewrites the port. This change creates a trustworthy gate for later endpoint advertisement without advertising anything yet.
Validation
dcc03e50.tests=4,failures=0,skipped=0; the productionudp_mappingtest actually executed the new evidence gate and stale-generation checks./proc.This PR remains intentionally draft. It does not modify
master, the merged PR #26 branch, or packaging configuration;AppxBundle=Neverremains unchanged.