Skip to main content

NodeConfig

Struct NodeConfig 

Source
pub struct NodeConfig {
Show 51 fields pub transport_enabled: bool, pub static_transport_identity: bool, pub local_hops_delta: bool, pub identity: Option<Identity>, pub interfaces: Vec<InterfaceConfig>, pub share_instance: bool, pub instance_name: String, pub shared_instance_port: u16, pub rpc_port: u16, pub cache_dir: Option<PathBuf>, pub ratchet_store: Option<Arc<dyn RatchetStore>>, pub ratchet_expiry: Duration, pub management: ManagementConfig, pub probe_port: Option<u16>, pub probe_addrs: Vec<SocketAddr>, pub probe_protocol: ProbeProtocol, pub direct_connect_policy: HolePunchPolicy, pub direct_connect_allow_private_endpoints: bool, pub device: Option<String>, pub underlay_mark: Option<u32>, pub hooks: Vec<ParsedHook>, pub discover_interfaces: bool, pub autoconnect_interface_mode: Option<u8>, pub autoconnect_interface_gravity: i64, pub autoconnect_announces_to_internal: bool, pub autoconnect_unverified_implementations: bool, pub discovery_required_value: Option<StampCost>, pub respond_to_probes: bool, pub prefer_shorter_path: bool, pub max_paths_per_destination: usize, pub packet_hashlist_max_entries: usize, pub packet_hashlist_allocation: PacketHashlistAllocation, pub max_discovery_pr_tags: usize, pub max_path_destinations: usize, pub max_tunnel_destinations_total: usize, pub known_destinations_ttl: Duration, pub known_destinations_max_entries: usize, pub announce_table_ttl: Duration, pub announce_table_max_bytes: usize, pub driver_event_queue_capacity: usize, pub interface_writer_queue_capacity: usize, pub announce_rate_defaults: AnnounceRateDefaults, pub ingress_control_defaults: IngressControlConfig, pub backbone_peer_pool: Option<BackbonePeerPoolSettings>, pub announce_sig_cache_enabled: bool, pub announce_sig_cache_max_entries: usize, pub announce_sig_cache_ttl: Duration, pub registry: Option<InterfaceRegistry>, pub panic_on_interface_error: bool, pub link_proof_verify_threads: ProofVerifyThreads, pub stamps: StampsSection,
}
Expand description

Top-level node configuration.

Fields§

§transport_enabled: bool§static_transport_identity: bool§local_hops_delta: bool§identity: Option<Identity>§interfaces: Vec<InterfaceConfig>

Interface configurations (parsed via registry factories).

§share_instance: bool

Enable shared instance server for local clients (rns-ctl, etc.)

§instance_name: String

Instance name for Unix socket namespace (default: “default”).

§shared_instance_port: u16

Shared instance port for local client connections (default 37428).

§rpc_port: u16

RPC control port (default 37429). Only used when share_instance is true.

§cache_dir: Option<PathBuf>

Cache directory for announce cache. If None, announce caching is disabled.

§ratchet_store: Option<Arc<dyn RatchetStore>>

Store for received ratchets. If None, received ratchets are not persisted or used.

§ratchet_expiry: Duration

TTL for received ratchets.

§management: ManagementConfig

Remote management configuration.

§probe_port: Option<u16>

Port to run the STUN probe server on (for facilitator nodes).

§probe_addrs: Vec<SocketAddr>

Addresses of STUN/RNSP probe servers (tried sequentially with failover).

§probe_protocol: ProbeProtocol

Protocol for endpoint discovery: “rnsp” (default) or “stun”.

§direct_connect_policy: HolePunchPolicy

Policy for incoming direct-connect proposals.

§direct_connect_allow_private_endpoints: bool

Accept direct-connect endpoints in private, shared, link-local, and unique-local ranges (LAN-only deployments).

§device: Option<String>

Network interface to bind outbound sockets to (e.g. “usb0”).

§underlay_mark: Option<u32>

Linux SO_MARK value applied to Reticulum IP underlay sockets.

§hooks: Vec<ParsedHook>

Hook configurations loaded from the config file.

§discover_interfaces: bool

Enable interface discovery.

§autoconnect_interface_mode: Option<u8>

Mode assigned to auto-connected discovered interfaces, when configured.

§autoconnect_interface_gravity: i64

Gravity assigned to auto-connected discovered interfaces.

§autoconnect_announces_to_internal: bool

Allow auto-connected interfaces to propagate announces to internal interfaces.

§autoconnect_unverified_implementations: bool

Allow auto-connecting discovered interfaces from unverified implementations.

§discovery_required_value: Option<StampCost>

Minimum stamp value for accepting discovered interfaces (default: 16).

§respond_to_probes: bool

Respond to probe packets with automatic proof (like Python’s respond_to_probes).

§prefer_shorter_path: bool

Accept an announce with strictly fewer hops even when the random_blob is a duplicate of the existing path entry. Default false preserves Python-compatible anti-replay behaviour.

§max_paths_per_destination: usize

Maximum number of alternative paths stored per destination. Default 1 (single path, backward-compatible).

§packet_hashlist_max_entries: usize

Maximum number of packet hashes retained for duplicate suppression.

§packet_hashlist_allocation: PacketHashlistAllocation

Startup allocation policy for the packet hashlist payload pages.

§max_discovery_pr_tags: usize

Maximum number of discovery path-request tags remembered.

§max_path_destinations: usize

Maximum number of destination hashes retained in the live path table.

§max_tunnel_destinations_total: usize

Maximum number of retained tunnel-known destinations.

§known_destinations_ttl: Duration

TTL for recalled known destinations without an active path.

§known_destinations_max_entries: usize

Maximum number of recalled known destinations retained.

§announce_table_ttl: Duration

TTL for announce retransmission state.

§announce_table_max_bytes: usize

Maximum retained bytes for announce retransmission state.

§driver_event_queue_capacity: usize

Maximum queued events awaiting driver processing.

§interface_writer_queue_capacity: usize

Maximum queued outbound frames per interface writer worker.

§announce_rate_defaults: AnnounceRateDefaults

Default announce-rate controls applied to interfaces when transport is enabled.

§ingress_control_defaults: IngressControlConfig

Default ingress/egress controls applied to interfaces when transport is enabled.

§backbone_peer_pool: Option<BackbonePeerPoolSettings>

Outbound Backbone peer-pool settings. Disabled when None.

§announce_sig_cache_enabled: bool

Whether the announce signature verification cache is enabled.

§announce_sig_cache_max_entries: usize

Maximum entries in the announce signature verification cache.

§announce_sig_cache_ttl: Duration

TTL for announce signature cache entries.

§registry: Option<InterfaceRegistry>

Custom interface registry. If None, uses InterfaceRegistry::with_builtins().

§panic_on_interface_error: bool

If true, a single interface failing to start will abort the entire node. If false (default), the error is logged and remaining interfaces continue.

§link_proof_verify_threads: ProofVerifyThreads

Threads that verify and sign link packet proofs off the driver thread (Auto: half the CPUs the process may use, from one to four).

§stamps: StampsSection

Stamp generation, enforcement, costs and timeouts: the [stamps] section, which RnsNode::from_config reads from the config file. Upstream’s Reticulum(enable_stamping=True) corresponds to setting stamp_destinations, stamp_prs and stamp_lrs, and enforce_stamps=True to stamps_enforced and lr_stamps_enforced.

Trait Implementations§

Source§

impl Default for NodeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. 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
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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InterfaceConfigData for T
where T: Send + 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.