Expand description
STUN protocol implementation for public IP detection
Implements a minimal RFC 5389 STUN client for detecting public IP addresses.
§Limitations
- No retransmission: RFC 5389 §7.2.1 recommends retransmitting requests with exponential backoff (RTO ≥ 500 ms). This implementation sends a single binding request; packet loss is handled by the resolver’s fallback strategy.
§Security
Transaction IDs are generated with getrandom (OS-level CSPRNG),
per RFC 8489 requirements.
Structs§
- Stun
Provider - STUN provider for IP detection
Functions§
- default_
providers - Get default STUN providers
- provider_
names - List all available STUN provider names