Skip to main content

RelayBridgeConfig

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: String

Relay host:port to dial.

§relay_host: String

Server name presented for the relay’s outer TLS cert (its SAN).

§node_id: String

Opaque node-id this daemon claims (clients dial it).

§relay_token: Option<String>

Optional shared-secret admission gate.

§local_wss_addr: String

Loopback 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: bool

Skip relay outer-cert verification (test only).

§relay_tofu: bool

Opt-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: usize

Cap on simultaneously-bridged client connections (bridge-side DoS cap).

§open_burst: u32

Per-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: PathBuf

Daemon data dir; the node-id + rotation-trigger files live under relay/.

§node_id_rotation_days: u64

Auto-rotate the node-id every N days (0 = never). Only meaningful when the id is auto-minted (rotation_allowed).

§rotation_allowed: bool

Whether 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

Source§

fn clone(&self) -> RelayBridgeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more