RNS::Rnsd
Constants
EXAMPLE_RNS_CONFIG = "# This is an example Reticulum config file.\n# You should probably edit it to include any additional,\n# interfaces and settings you might need.\n\n[reticulum]\n\n# If you enable Transport, your system will route traffic\n# for other peers, pass announces and serve path requests.\n# This should be done for systems that are suited to act\n# as transport nodes, ie. if they are stationary and\n# always-on. This directive is optional and can be removed\n# for brevity.\n\nenable_transport = No\n\n\n# By default, the first program to launch the Reticulum\n# Network Stack will create a shared instance, that other\n# programs can communicate with. Only the shared instance\n# opens all the configured interfaces directly, and other\n# local programs communicate with the shared instance over\n# a local socket. This is completely transparent to the\n# user, and should generally be turned on. This directive\n# is optional and can be removed for brevity.\n\nshare_instance = Yes\n\n\n# If you want to run multiple *different* shared instances\n# on the same system, you will need to specify different\n# instance names for each. On platforms supporting domain\n# sockets, this can be done with the instance_name option:\n\ninstance_name = default\n\n# Some platforms don't support domain sockets, and if that\n# is the case, you can isolate different instances by\n# specifying a unique set of ports for each:\n\n# shared_instance_port = 37428\n# instance_control_port = 37429\n\n\n# If you want to explicitly use TCP for shared instance\n# communication, instead of domain sockets, this is also\n# possible, by using the following option:\n\n# shared_instance_type = tcp\n\n\n# On systems where running instances may not have access\n# to the same shared Reticulum configuration directory,\n# it is still possible to allow full interactivity for\n# running instances, by manually specifying a shared RPC\n# key. In almost all cases, this option is not needed, but\n# it can be useful on operating systems such as Android.\n# The key must be specified as bytes in hexadecimal.\n\n# rpc_key = e5c032d3ec4e64a6aca9927ba8ab73336780f6d71790\n\n\n# It is possible to allow remote management of Reticulum\n# systems using the various built-in utilities, such as\n# rnstatus and rnpath. You will need to specify one or\n# more Reticulum Identity hashes for authenticating the\n# queries from client programs. For this purpose, you can\n# use existing identity files, or generate new ones with\n# the rnid utility.\n\n# enable_remote_management = yes\n# remote_management_allowed = 9fb6d773498fb3feda407ed8ef2c3229, 2d882c5586e548d79b5af27bca1776dc\n\n\n# For easier management, discovery and configuration of\n# networks with many individual transport instances,\n# you can specify a network identity to be used across\n# a set of instances. If sending interface discovery\n# announces, these will all be signed by the specified\n# network identity, and other nodes discovering your\n# interfaces will be able to identify that they belong\n# to the same network, even though they exist on different\n# transport nodes.\n\n# network_identity = ~/.reticulum/storage/identity/network\n\n\n# You can configure whether Reticulum should discover\n# available interfaces from other Transport Instances over\n# the network. If this option is enabled, Reticulum will\n# collect interface information discovered from the network.\n\n# discover_interfaces = No\n\n\n# If you only want to discover interfaces from specific\n# networks, you can provide a list of network identities\n# from which to discover interfaces. If this option is not\n# provided, interfaces will be discovered from all transport\n# instances on all connected networks.\n\n# interface_discovery_sources = 78616ff7c4b8d3886d67d494b440f333, cb127015e13aa6ea1e0a606cdc9123d0\n\n\n# It is possible to automatically bring up and connect new\n# interfaces discovered over the network. This option is\n# disabled by default, but allows you to specify a maximum\n# number of discovered interfaces to automatically connect.\n# Additionally, if this option is enabled, Reticulum will\n# also try to autoconnect available auto-discovered inter-\n# faces on startup, up to the maximum number specified.\n\n# autoconnect_discovered_interfaces = 0\n\n\n# To prevent interface discovery spamming, a valid crypto-\n# graphic stamp is required per announced interface. You\n# can configure the minimum required value to accept as\n# valid for discovered interfaces.\n\n# required_discovery_value = 14\n\n\n# You can configure Reticulum to panic and forcibly close\n# if an unrecoverable interface error occurs, such as the\n# hardware device for an interface disappearing. This is\n# an optional directive, and can be left out for brevity.\n# This behaviour is disabled by default.\n\n# panic_on_interface_error = No\n\n\n# When Transport is enabled, it is possible to allow the\n# Transport Instance to respond to probe requests from\n# the rnprobe utility. This can be a useful tool to test\n# connectivity. When this option is enabled, the probe\n# destination will be generated from the Identity of the\n# Transport Instance, and printed to the log at startup.\n# Optional, and disabled by default.\n\n# respond_to_probes = No\n\n\n# You can publish your local list of blackholed identities\n# for other transport instances to use for automatic,\n# network-wide blackhole management.\n\n# publish_blackhole = No\n\n# List of remote transport identities from which to auto-\n# matically source lists of blackholed identities.\n#\n# If you're connecting to a large external network, you\n# can use one or more external blackhole list to block\n# spammy and excessive announces onto your network. This\n# funtionality is especially useful if you're hosting public\n# entrypoints or gateways. The list source below provides a\n# functional example, but better, more timely maintained\n# lists probably exist in the community.\n\n# blackhole_sources = 521c87a83afb8f29e4455e77930b973b\n\n\n[logging]\n# Valid log levels are 0 through 7:\n# 0: Log only critical information\n# 1: Log errors and lower log levels\n# 2: Log warnings and lower log levels\n# 3: Log notices and lower log levels\n# 4: Log info and lower (this is the default)\n# 5: Verbose logging\n# 6: Debug logging\n# 7: Extreme logging\n\nloglevel = 4\n\n\n# The interfaces section defines the physical and virtual\n# interfaces Reticulum will use to communicate on. This\n# section will contain examples for a variety of interface\n# types. You can modify these or use them as a basis for\n# your own config, or simply remove the unused ones.\n\n[interfaces]\n\n # This interface enables communication with other\n # link-local Reticulum nodes over UDP. It does not\n # need any functional IP infrastructure like routers\n # or DHCP servers, but will require that at least link-\n # local IPv6 is enabled in your operating system, which\n # should be enabled by default in almost any OS. See\n # the Reticulum Manual for more configuration options.\n\n [[Default Interface]]\n type = AutoInterface\n enabled = yes\n\n\n # The following example enables communication with other\n # local Reticulum peers using UDP broadcasts.\n\n [[UDP Interface]]\n type = UDPInterface\n enabled = no\n listen_ip = 0.0.0.0\n listen_port = 4242\n forward_ip = 255.255.255.255\n forward_port = 4242\n\n # The above configuration will allow communication\n # within the local broadcast domains of all local\n # IP interfaces.\n\n # Instead of specifying listen_ip, listen_port,\n # forward_ip and forward_port, you can also bind\n # to a specific network device like below.\n\n # device = eth0\n # port = 4242\n\n # Assuming the eth0 device has the address\n # 10.55.0.72/24, the above configuration would\n # be equivalent to the following manual setup.\n # Note that we are both listening and forwarding to\n # the broadcast address of the network segments.\n\n # listen_ip = 10.55.0.255\n # listen_port = 4242\n # forward_ip = 10.55.0.255\n # forward_port = 4242\n\n # You can of course also communicate only with\n # a single IP address\n\n # listen_ip = 10.55.0.15\n # listen_port = 4242\n # forward_ip = 10.55.0.16\n # forward_port = 4242\n\n\n # This example demonstrates a TCP server interface.\n # It will listen for incoming connections on the\n # specified IP address and port number.\n\n [[TCP Server Interface]]\n type = TCPServerInterface\n enabled = no\n\n # This configuration will listen on all IP\n # interfaces on port 4242\n\n listen_ip = 0.0.0.0\n listen_port = 4242\n\n # Alternatively you can bind to a specific IP\n\n # listen_ip = 10.0.0.88\n # listen_port = 4242\n\n # Or a specific network device\n\n # device = eth0\n # port = 4242\n\n\n # To connect to a TCP server interface, you would\n # naturally use the TCP client interface. Here's\n # an example. The target_host can either be an IP\n # address or a hostname\n\n [[TCP Client Interface]]\n type = TCPClientInterface\n enabled = no\n target_host = 127.0.0.1\n target_port = 4242\n\n\n # This example shows how to make your Reticulum\n # instance available over I2P, and connect to\n # another I2P peer. Please be aware that you\n # must have an I2P router running on your system\n # with the SAMv3 API enabled for this to work.\n\n [[I2P]]\n type = I2PInterface\n enabled = no\n connectable = yes\n peers = ykzlw5ujbaqc2xkec4cpvgyxj257wcrmmgkuxqmqcur7cq3w3lha.b32.i2p\n\n\n # Here's an example of how to add a LoRa interface\n # using the RNode LoRa transceiver.\n\n [[RNode LoRa Interface]]\n type = RNodeInterface\n\n # Enable interface if you want use it!\n enabled = no\n\n # Serial port for the device\n port = /dev/ttyUSB0\n\n # It is also possible to use BLE devices\n # instead of wired serial ports. The\n # target RNode must be paired with the\n # host device before connecting. BLE\n # devices can be connected by name,\n # BLE MAC address or by any available.\n\n # Connect to specific device by name\n # port = ble://RNode 3B87\n\n # Or by BLE MAC address\n # port = ble://F4:12:73:29:4E:89\n\n # Or connect to the first available,\n # paired device\n # port = ble://\n\n # Set frequency to 867.2 MHz\n frequency = 867200000\n\n # Set LoRa bandwidth to 125 KHz\n bandwidth = 125000\n\n # Set TX power to 7 dBm (5 mW)\n txpower = 7\n\n # Select spreading factor 8. Valid\n # range is 7 through 12, with 7\n # being the fastest and 12 having\n # the longest range.\n spreadingfactor = 8\n\n # Select coding rate 5. Valid range\n # is 5 throough 8, with 5 being the\n # fastest, and 8 the longest range.\n codingrate = 5\n\n # You can configure the RNode to send\n # out identification on the channel with\n # a set interval by configuring the\n # following two parameters. The trans-\n # ceiver will only ID if the set\n # interval has elapsed since it's last\n # actual transmission. The interval is\n # configured in seconds.\n # This option is commented out and not\n # used by default.\n # id_callsign = MYCALL-0\n # id_interval = 600\n\n # For certain homebrew RNode interfaces\n # with low amounts of RAM, using packet\n # flow control can be useful. By default\n # it is disabled.\n flow_control = False\n\n\n # An example KISS modem interface. Useful for running\n # Reticulum over packet radio hardware.\n\n [[Packet Radio KISS Interface]]\n type = KISSInterface\n\n # Enable interface if you want use it!\n enabled = no\n\n # Serial port for the device\n port = /dev/ttyUSB1\n\n # Set the serial baud-rate and other\n # configuration parameters.\n speed = 115200\n databits = 8\n parity = none\n stopbits = 1\n\n # Set the modem preamble. A 150ms\n # preamble should be a reasonable\n # default, but may need to be\n # increased for radios with slow-\n # opening squelch and long TX/RX\n # turnaround\n preamble = 150\n\n # Set the modem TX tail. In most\n # cases this should be kept as low\n # as possible to not waste airtime.\n txtail = 10\n\n # Configure CDMA parameters. These\n # settings are reasonable defaults.\n persistence = 200\n slottime = 20\n\n # You can configure the interface to send\n # out identification on the channel with\n # a set interval by configuring the\n # following two parameters. The KISS\n # interface will only ID if the set\n # interval has elapsed since it's last\n # actual transmission. The interval is\n # configured in seconds.\n # This option is commented out and not\n # used by default.\n # id_callsign = MYCALL-0\n # id_interval = 600\n\n # Whether to use KISS flow-control.\n # This is useful for modems that have\n # a small internal packet buffer, but\n # support packet flow control instead.\n flow_control = false\n\n\n # If you're using Reticulum on amateur radio spectrum,\n # you might want to use the AX.25 KISS interface. This\n # way, Reticulum will automatically encapsulate it's\n # traffic in AX.25 and also identify your stations\n # transmissions with your callsign and SSID.\n #\n # Only do this if you really need to! Reticulum doesn't\n # need the AX.25 layer for anything, and it incurs extra\n # overhead on every packet to encapsulate in AX.25.\n #\n # A more efficient way is to use the plain KISS interface\n # with the beaconing functionality described above.\n\n [[Packet Radio AX.25 KISS Interface]]\n type = AX25KISSInterface\n\n # Set the station callsign and SSID\n callsign = NO1CLL\n ssid = 0\n\n # Enable interface if you want use it!\n enabled = no\n\n # Serial port for the device\n port = /dev/ttyUSB2\n\n # Set the serial baud-rate and other\n # configuration parameters.\n speed = 115200\n databits = 8\n parity = none\n stopbits = 1\n\n # Whether to use KISS flow-control.\n # This is useful for modems with a\n # small internal packet buffer.\n flow_control = false\n\n # Set the modem preamble. A 150ms\n # preamble should be a reasonable\n # default, but may need to be\n # increased for radios with slow-\n # opening squelch and long TX/RX\n # turnaround\n preamble = 150\n\n # Set the modem TX tail. In most\n # cases this should be kept as low\n # as possible to not waste airtime.\n txtail = 10\n\n # Configure CDMA parameters. These\n # settings are reasonable defaults.\n persistence = 200\n slottime = 20\n"
Class methods
Compute target verbosity from parsed args. Returns nil in service mode (Python sets targetverbosity = None).
Parse command-line arguments matching Python argparse behavior. Supports: --config PATH, -v (repeatable), -q (repeatable), -s/--service, -i/--interactive, --exampleconfig, --version