feat(stun): STUN server deduplication and concurrent multi-provider resolution - #82
Merged
Conversation
dweekly
force-pushed
the
feat/seed-public-ip
branch
2 times, most recently
from
September 3, 2026 00:24
9515dec to
cc67069
Compare
dweekly
force-pushed
the
feat/stun-redundancy
branch
from
September 3, 2026 00:24
278e712 to
26e8d53
Compare
dweekly
force-pushed
the
feat/seed-public-ip
branch
from
September 3, 2026 01:44
cc67069 to
5244313
Compare
dweekly
force-pushed
the
feat/stun-redundancy
branch
from
September 3, 2026 01:44
26e8d53 to
c43e3d7
Compare
dweekly
force-pushed
the
feat/seed-public-ip
branch
from
September 3, 2026 01:50
5244313 to
deb2c3a
Compare
dweekly
force-pushed
the
feat/stun-redundancy
branch
from
September 3, 2026 01:50
c43e3d7 to
f392faa
Compare
dweekly
force-pushed
the
feat/stun-redundancy
branch
from
September 3, 2026 23:59
f392faa to
2d36e42
Compare
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.
Summary
Addresses Item 2 of ROADMAP.md ("STUN server list provides no actual redundancy"):
stun1.l.google.com(which resolves to the exact same IP asstun.l.google.com, providing zero IP-level failover while multiplying DNS stall costs). The server list now contains distinct independent providers on distinct networks: Google (stun.l.google.com:19302) and Cloudflare (stun.cloudflare.com:3478).DispatchQueue.concurrentPerformand thread-safe collection. If one provider's DNS query stalls (e.g. against an unresponsive or slow resolver), the other provider's resolution completes in parallel rather than paying consecutive 30-second serial timeouts.stunGetPublicIPoverload operating on pre-resolvedsockaddr_storage, preserving zero DNS delay between retries.Stacked on top of #81 (
feat/seed-public-ip).Testing
STUNTests.swift:testSTUNServerList: Verifies multi-provider presence (Google + Cloudflare) and asserts no duplicate hostnames exist.testResolveSTUNServer: Verifies resolution succeeds for valid targets and fails cleanly for invalid hosts.swift format lint --strict.--warnings-as-errors.