Repository navigation
v0.11.3 — Resilient Public IP Discovery
Resilient Public IP Discovery
Multi-Server STUN Fallback
- Public IP discovery now tries multiple STUN servers in sequence for resilience
- Server list: Google (primary + backup) and Cloudflare on different ports
- Improves success rate in restrictive network environments
DNS-Based Fallback via Akamai whoami
- NEW: If all STUN servers fail, falls back to DNS TXT query to
whoami.ds.akahelp.net - DNS queries work in captive portal environments where STUN/UDP may be blocked
- Parses the
ipfield from Akamai's response to extract public IPv4
Unified getPublicIPv4() Function
- Tiered discovery: STUN (fast, ~10-50ms) → DNS (reliable, ~50-100ms)
- Both
Segmentation.swiftandTraceroute.swiftnow use the unified approach - New error type
PublicIPErrorprovides details when all methods fail
Why This Matters
- Hotel/corporate networks often block non-standard UDP ports (STUN)
- Captive portals must allow DNS for the portal itself to function
- This change significantly improves public IP detection in edge cases
Full Changelog: v0.11.2...v0.11.3
What's Changed
- feat(probe): modernize TCP/UDP probes with DispatchSource I/O (v0.11.2) by @dweekly in #11
- feat(stun): resilient public IP discovery with DNS fallback (v0.11.3) by @dweekly in #12
Full Changelog: v0.11.1...v0.11.3