Skip to main content

Module stun

Module stun 

Source
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§

StunProvider
STUN provider for IP detection

Functions§

default_providers
Get default STUN providers
provider_names
List all available STUN provider names