pub struct NodeConfig {Show 34 fields
pub transport_enabled: 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 management: ManagementConfig,
pub probe_port: Option<u16>,
pub probe_addrs: Vec<SocketAddr>,
pub probe_protocol: ProbeProtocol,
pub device: Option<String>,
pub hooks: Vec<ParsedHook>,
pub discover_interfaces: bool,
pub discovery_required_value: Option<u8>,
pub respond_to_probes: bool,
pub prefer_shorter_path: bool,
pub max_paths_per_destination: usize,
pub packet_hashlist_max_entries: usize,
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_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,
}Expand description
Top-level node configuration.
Fields§
§transport_enabled: bool§identity: Option<Identity>§interfaces: Vec<InterfaceConfig>Interface configurations (parsed via registry factories).
Enable shared instance server for local clients (rns-ctl, etc.)
instance_name: StringInstance name for Unix socket namespace (default: “default”).
Shared instance port for local client connections (default 37428).
rpc_port: u16RPC 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.
management: ManagementConfigRemote 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: ProbeProtocolProtocol for endpoint discovery: “rnsp” (default) or “stun”.
device: Option<String>Network interface to bind outbound sockets to (e.g. “usb0”).
hooks: Vec<ParsedHook>Hook configurations loaded from the config file.
discover_interfaces: boolEnable interface discovery.
discovery_required_value: Option<u8>Minimum stamp value for accepting discovered interfaces (default: 14).
respond_to_probes: boolRespond to probe packets with automatic proof (like Python’s respond_to_probes).
prefer_shorter_path: boolAccept 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: usizeMaximum number of alternative paths stored per destination. Default 1 (single path, backward-compatible).
packet_hashlist_max_entries: usizeMaximum number of packet hashes retained for duplicate suppression.
Maximum number of discovery path-request tags remembered.
max_path_destinations: usizeMaximum number of destination hashes retained in the live path table.
max_tunnel_destinations_total: usizeMaximum number of retained tunnel-known destinations.
known_destinations_ttl: DurationTTL for recalled known destinations without an active path.
known_destinations_max_entries: usizeMaximum number of recalled known destinations retained.
announce_table_ttl: DurationTTL for announce retransmission state.
announce_table_max_bytes: usizeMaximum retained bytes for announce retransmission state.
driver_event_queue_capacity: usizeMaximum queued events awaiting driver processing.
interface_writer_queue_capacity: usizeMaximum queued outbound frames per interface writer worker.
announce_sig_cache_enabled: boolWhether the announce signature verification cache is enabled.
announce_sig_cache_max_entries: usizeMaximum entries in the announce signature verification cache.
announce_sig_cache_ttl: DurationTTL for announce signature cache entries.
registry: Option<InterfaceRegistry>Custom interface registry. If None, uses InterfaceRegistry::with_builtins().
panic_on_interface_error: boolIf true, a single interface failing to start will abort the entire node. If false (default), the error is logged and remaining interfaces continue.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeConfig
impl !RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl !Sync for NodeConfig
impl Unpin for NodeConfig
impl UnsafeUnpin for NodeConfig
impl !UnwindSafe for NodeConfig
Blanket Implementations§
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
Source§impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
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