pub struct MeshConfig {
pub mode: MeshMode,
pub passphrase: Option<String>,
pub mesh_id: Option<String>,
pub kdf: MeshKdfConfig,
}Expand description
Private-mesh membership configuration.
All fields are optional; an absent [mesh] section is treated as
mode = "open". When mode = "private", passphrase must be a
non-empty UTF-8 string. The passphrase is stretched once at daemon
startup via Argon2id (see MeshKdfConfig) into a 32-byte master,
then split via HKDF-SHA256 into purpose-bound sub-keys for discovery
encryption and handshake binding.
Fields§
§mode: MeshModeMesh mode. Defaults to MeshMode::Open (open mesh).
passphrase: Option<String>Passphrase used to derive the mesh secret. Required when
mode = "private". Empty string in private mode is rejected at
startup. Ignored entirely when mode = "open".
mesh_id: Option<String>Optional cosmetic mesh label used by the UI / CLI. Also mixed into
the Argon2id salt, so two meshes that happen to share a passphrase
but use different mesh_id values derive distinct secrets and
cannot interconnect. Renaming mesh_id therefore invalidates
every existing peer connection — UI surfaces a warning.
kdf: MeshKdfConfigArgon2id parameters used to stretch the passphrase. The default targets ~100 ms on a desktop. Tunable for embedded targets.
Trait Implementations§
Source§impl Clone for MeshConfig
impl Clone for MeshConfig
Source§fn clone(&self) -> MeshConfig
fn clone(&self) -> MeshConfig
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 MeshConfig
impl Debug for MeshConfig
Source§impl Default for MeshConfig
impl Default for MeshConfig
Source§fn default() -> MeshConfig
fn default() -> MeshConfig
Source§impl<'de> Deserialize<'de> for MeshConfig
impl<'de> Deserialize<'de> for MeshConfig
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>,
Source§impl PartialEq for MeshConfig
impl PartialEq for MeshConfig
Source§fn eq(&self, other: &MeshConfig) -> bool
fn eq(&self, other: &MeshConfig) -> bool
self and other values to be equal, and is used by ==.