Expand description
Wire-safe NAT-traversal DTOs shared across the daemon / overlayd boundary.
The live NAT-traversal types (NatConfig, Candidate, RelayServerConfig,
…) live in zlayer-overlay behind its nat cargo feature. They cannot be
referenced from zlayer-types (a leaf crate that must not depend on
zlayer-overlay, and must compile with NAT disabled), so this module
mirrors the subset that crosses the overlayd IPC channel as plain,
always-available, serde-friendly structs.
The conversion NatConfigSpec ⇄ zlayer_overlay::NatConfig is performed in
the crates that already depend on zlayer-overlay (the agent shim and the
overlayd server) — never here — so the leaf-crate dependency rule holds.
Every field is #[serde(default)] so an older daemon/overlayd that omits the
nat object (or any sub-field) deserializes cleanly: a missing object means
“no explicit NAT config supplied” and overlayd falls back to its built-in
NatConfig::default().
Structs§
- NatCandidate
Wire - Wire form of a single
zlayer_overlay::nat::Candidate. - NatConfig
Spec - Wire form of
zlayer_overlay::nat::NatConfig. - Relay
Server Spec - Wire form of
zlayer_overlay::nat::RelayServerConfig, plus the cluster-wide sharedauth_credentialclients use to derive the relay’sBLAKE2bauth key. - Turn
Server Spec - Wire form of
zlayer_overlay::nat::TurnServerConfig.