#include <config.h>
Public Types | |
| enum class | Security { Noise , Plaintext } |
| Secure channel to use for peer connections. More... | |
Public Attributes | |
| uint16_t | listen_port = 0 |
| Listen port for inbound peers. | |
| bool | enable_listen = true |
| std::string | bind_address = "" |
| Interface to bind the listener to. | |
| size_t | reactor_threads = 1 |
| Number of reactor threads. | |
| size_t | max_peers = 0 |
| Maximum number of established peers. | |
| Security | security = Security::Noise |
| std::string | protocol_name = "librats" |
| Application protocol identity. | |
| std::string | protocol_version = "1.0" |
| std::string | data_dir = "" |
| Directory for persistent state. | |
| bool | enable_network_monitor = true |
| Watch the host for network configuration changes (interface up/down, IP add/remove, route flip, wake-from-sleep) and publish NetworkChanged on the node's EventBus so subsystems can renew port mappings, re-run STUN and re-announce. | |
|
strong |
| std::string librats::NodeConfig::bind_address = "" |
Interface to bind the listener to.
The address family is derived from it:
| std::string librats::NodeConfig::data_dir = "" |
| bool librats::NodeConfig::enable_network_monitor = true |
Watch the host for network configuration changes (interface up/down, IP add/remove, route flip, wake-from-sleep) and publish NetworkChanged on the node's EventBus so subsystems can renew port mappings, re-run STUN and re-announce.
Costs one mostly-idle monitor thread. See node/host_events.h.
| uint16_t librats::NodeConfig::listen_port = 0 |
| size_t librats::NodeConfig::max_peers = 0 |
Maximum number of established peers.
0 means unlimited. The limit guards inbound connections (a flood is refused at accept, before any handshake); outbound dials we initiate are always honored. Runtime-adjustable via Node::set_max_peers().
| std::string librats::NodeConfig::protocol_name = "librats" |
Application protocol identity.
Bound into the Noise handshake prologue, so two nodes whose (name, version) differ cannot complete a handshake — a cheap, cryptographically-enforced way to keep separate apps from cross- connecting. Both peers must match exactly. (No effect under Plaintext.)
Definition at line 47 of file config.h.
Referenced by librats::Node::protocol_name().
| std::string librats::NodeConfig::protocol_version = "1.0" |
Definition at line 48 of file config.h.
Referenced by librats::Node::protocol_version().
| size_t librats::NodeConfig::reactor_threads = 1 |
| Security librats::NodeConfig::security = Security::Noise |