pub struct NatConfigSpec {
pub enabled: bool,
pub stun_servers: Vec<String>,
pub turn_servers: Vec<TurnServerSpec>,
pub hole_punch_timeout_secs: u64,
pub stun_refresh_interval_secs: u64,
pub max_candidate_pairs: usize,
pub relay_server: Option<RelayServerSpec>,
}Expand description
Wire form of zlayer_overlay::nat::NatConfig.
Carried in crate::overlayd::OverlaydRequest::SetupGlobalOverlay so the
operator-supplied --stun-server / --turn-server / --relay-server-bind
flags (parsed by the main daemon) actually reach overlayd, which owns the
live NAT orchestrator. Previously only an enabled: bool crossed the wire
and overlayd reconstructed a default NatConfig, silently dropping every
operator override.
Fields§
§enabled: boolWhether NAT traversal is enabled.
stun_servers: Vec<String>STUN servers (host:port) for reflexive-address discovery.
turn_servers: Vec<TurnServerSpec>TURN/relay servers used as the last-resort fallback.
hole_punch_timeout_secs: u64Seconds to attempt hole-punching before falling back to relay.
stun_refresh_interval_secs: u64Seconds between STUN reflexive-address refreshes.
max_candidate_pairs: usizeMaximum candidate pairs to test per peer.
relay_server: Option<RelayServerSpec>When Some, this node should run the built-in relay server.
Trait Implementations§
Source§impl Clone for NatConfigSpec
impl Clone for NatConfigSpec
Source§fn clone(&self) -> NatConfigSpec
fn clone(&self) -> NatConfigSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NatConfigSpec
impl Debug for NatConfigSpec
Source§impl Default for NatConfigSpec
impl Default for NatConfigSpec
Source§fn default() -> NatConfigSpec
fn default() -> NatConfigSpec
Source§impl<'de> Deserialize<'de> for NatConfigSpec
impl<'de> Deserialize<'de> for NatConfigSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NatConfigSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NatConfigSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for NatConfigSpec
Source§impl PartialEq for NatConfigSpec
impl PartialEq for NatConfigSpec
Source§fn eq(&self, other: &NatConfigSpec) -> bool
fn eq(&self, other: &NatConfigSpec) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NatConfigSpec
impl Serialize for NatConfigSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for NatConfigSpec
Auto Trait Implementations§
impl Freeze for NatConfigSpec
impl RefUnwindSafe for NatConfigSpec
impl Send for NatConfigSpec
impl Sync for NatConfigSpec
impl Unpin for NatConfigSpec
impl UnsafeUnpin for NatConfigSpec
impl UnwindSafe for NatConfigSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more