Skip to main content

Crate public_stun

Crate public_stun 

Source
Expand description

A list of public STUN servers in crate form.

Based on the public STUN server list maintained by pradt2.

§Usage

The crate supports to ways to get the list of STUN servers:

Packaged servers:

// The list is packaged with the crate and may be outdated.
let servers = public_stun::packaged::list_servers();

Fetched servers:

// The list is fetched from the source repository and is always up to date.
let servers = public_stun::fetched::list_servers().await.unwrap();

Modules§

fetchedfetched
Module containing the fetched (on-demand) version of the server list.
packagedpackaged
Module containing the packaged version of the server list.

Structs§

Server
The hostname and port of a STUN server.

Enums§

Capability
The required capabilities of a STUN server.
InvalidFormat
The error returned when parsing a Server from a str.

Type Aliases§

Capabilities
A set of Capabilitys.