Struct RelayBridgeConfig
pub struct RelayBridgeConfig {Show 19 fields
pub relay_addr: String,
pub relay_host: String,
pub node_id: String,
pub relay_token: Option<String>,
pub local_wss_addr: String,
pub local_enroll_addr: Option<String>,
pub enroll_bridge_ports: Option<BridgePortSet>,
pub signing_key_pkcs8: Vec<u8>,
pub relay_ca_path: Option<String>,
pub relay_insecure: bool,
pub relay_tofu: bool,
pub outer_client_cert: Option<String>,
pub outer_client_key: Option<String>,
pub max_conns: usize,
pub open_burst: u32,
pub open_rate_per_sec: f64,
pub data_dir: PathBuf,
pub node_id_rotation_days: u64,
pub rotation_allowed: bool,
}Expand description
Everything the bridge needs to register with, and verify, a relay.
Fields§
§relay_addr: StringRelay host:port to dial.
relay_host: StringServer name presented for the relay’s outer TLS cert (its SAN).
node_id: StringOpaque node-id this daemon claims (clients dial it).
relay_token: Option<String>Optional shared-secret admission gate.
local_wss_addr: StringLoopback address of the daemon’s own WSS listener (e.g. 127.0.0.1:9781).
local_enroll_addr: Option<String>Optional loopback address of the daemon’s narrow enrollment listener.
enroll_bridge_ports: Option<BridgePortSet>Shared with the enrollment endpoint: the bridge registers each outbound
enroll-dial source port here BEFORE connecting, so the endpoint can
classify those loopback connections as relay-routed (shared-identity
peers) rather than direct clients. See enroll::BridgePortSet.
signing_key_pkcs8: Vec<u8>PKCS#8 of the daemon’s Ed25519 registration key.
relay_ca_path: Option<String>PEM CA to trust for the relay’s outer cert; None uses public roots.
relay_insecure: boolSkip relay outer-cert verification (test only).
relay_tofu: boolOpt-in trust-on-first-use for the relay’s OUTER leaf cert (A2): accept the
first leaf and record its pin to <data_dir>/relay/relay_pin, pinning it
thereafter. Never silently enabled; ignored when a relay CA is configured.
outer_client_cert: Option<String>Outer-mTLS variant: PEM cert/key the daemon presents to the relay on the
OUTER layer (needed when the relay sets outer_client_auth = required).
None presents no outer client cert. Separate from the inner mTLS.
outer_client_key: Option<String>§max_conns: usizeCap on simultaneously-bridged client connections (bridge-side DoS cap).
open_burst: u32Per-node OPEN handshake-rate cap (A6): burst allowance + steady refill
per second. A flood of OPENs beyond this is fast-rejected with Close
BEFORE a loopback mTLS handshake is spun up, so the relay’s caps are not
the only line of defense.
open_rate_per_sec: f64§data_dir: PathBufDaemon data dir; the node-id + rotation-trigger files live under relay/.
node_id_rotation_days: u64Auto-rotate the node-id every N days (0 = never). Only meaningful when the
id is auto-minted (rotation_allowed).
rotation_allowed: boolWhether node-id rotation is permitted: true only when the operator did not
pin [relay].node_id (a pinned id is fixed). Gates both scheduled and
on-demand rotation.
Trait Implementations§
Source§impl Clone for RelayBridgeConfig
impl Clone for RelayBridgeConfig
Source§fn clone(&self) -> RelayBridgeConfig
fn clone(&self) -> RelayBridgeConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RelayBridgeConfig
impl RefUnwindSafe for RelayBridgeConfig
impl Send for RelayBridgeConfig
impl Sync for RelayBridgeConfig
impl Unpin for RelayBridgeConfig
impl UnsafeUnpin for RelayBridgeConfig
impl UnwindSafe for RelayBridgeConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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