pub struct RelayServerSpec {
pub listen_port: u16,
pub external_addr: String,
pub max_sessions: usize,
pub auth_credential: Option<String>,
}Expand description
Wire form of zlayer_overlay::nat::RelayServerConfig, plus the cluster-wide
shared auth_credential clients use to derive the relay’s BLAKE2b auth
key.
The credential MUST be identical on every node (a client’s
derive_auth_key(credential) must match the server’s), so it cannot be the
node’s per-node WireGuard key. The main daemon populates it with the
cluster-shared HS256 secret (the same value behind cluster_jwt_secret).
Fields§
§listen_port: u16Port the relay server listens on (0 = OS-assigned ephemeral).
external_addr: StringExternal address other nodes use to reach this relay (host:port).
max_sessions: usizeMaximum concurrent relay sessions.
auth_credential: Option<String>Cluster-shared secret used to derive the relay auth key. None when the
daemon could not supply one (the relay still starts but rejects clients
that don’t share the same — empty — credential).
Trait Implementations§
Source§impl Clone for RelayServerSpec
impl Clone for RelayServerSpec
Source§fn clone(&self) -> RelayServerSpec
fn clone(&self) -> RelayServerSpec
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 RelayServerSpec
impl Debug for RelayServerSpec
Source§impl Default for RelayServerSpec
impl Default for RelayServerSpec
Source§fn default() -> RelayServerSpec
fn default() -> RelayServerSpec
Source§impl<'de> Deserialize<'de> for RelayServerSpec
impl<'de> Deserialize<'de> for RelayServerSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RelayServerSpec
Source§impl PartialEq for RelayServerSpec
impl PartialEq for RelayServerSpec
Source§fn eq(&self, other: &RelayServerSpec) -> bool
fn eq(&self, other: &RelayServerSpec) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RelayServerSpec
impl Serialize for RelayServerSpec
impl StructuralPartialEq for RelayServerSpec
Auto Trait Implementations§
impl Freeze for RelayServerSpec
impl RefUnwindSafe for RelayServerSpec
impl Send for RelayServerSpec
impl Sync for RelayServerSpec
impl Unpin for RelayServerSpec
impl UnsafeUnpin for RelayServerSpec
impl UnwindSafe for RelayServerSpec
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§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.