diff options
Diffstat (limited to 'net-p2p/reticulum/files')
-rw-r--r-- | net-p2p/reticulum/files/config.sample | 57 | ||||
-rw-r--r-- | net-p2p/reticulum/files/patch-RNS_Reticulum.py | 55 | ||||
-rw-r--r-- | net-p2p/reticulum/files/patch-RNS_Utilities_rnsd.py | 6 |
3 files changed, 80 insertions, 38 deletions
diff --git a/net-p2p/reticulum/files/config.sample b/net-p2p/reticulum/files/config.sample index cc9dc03ac02e..2cb199d49829 100644 --- a/net-p2p/reticulum/files/config.sample +++ b/net-p2p/reticulum/files/config.sample @@ -4,7 +4,7 @@ [reticulum] -# Define the DB directory +# Define database directory dbdir = "/var/db/reticulum" # If you enable Transport, your system will route traffic @@ -31,12 +31,24 @@ share_instance = Yes # If you want to run multiple *different* shared instances # on the same system, you will need to specify different -# shared instance ports for each. The defaults are given -# below, and again, these options can be left out if you -# don't need them. +# instance names for each. On platforms supporting domain +# sockets, this can be done with the instance_name option: -shared_instance_port = 37428 -instance_control_port = 37429 +instance_name = default + +# Some platforms don't support domain sockets, and if that +# is the case, you can isolate different instances by +# specifying a unique set of ports for each: + +# shared_instance_port = 37428 +# instance_control_port = 37429 + + +# If you want to explicitly use TCP for shared instance +# communication, instead of domain sockets, this is also +# possible, by using the following option: + +# shared_instance_type = tcp # On systems where running instances may not have access @@ -50,13 +62,25 @@ instance_control_port = 37429 # rpc_key = e5c032d3ec4e64a6aca9927ba8ab73336780f6d71790 +# It is possible to allow remote management of Reticulum +# systems using the various built-in utilities, such as +# rnstatus and rnpath. You will need to specify one or +# more Reticulum Identity hashes for authenticating the +# queries from client programs. For this purpose, you can +# use existing identity files, or generate new ones with +# the rnid utility. + +# enable_remote_management = yes +# remote_management_allowed = 9fb6d773498fb3feda407ed8ef2c3229, 2d882c5586e548d79b5af27bca1776dc + + # You can configure Reticulum to panic and forcibly close # if an unrecoverable interface error occurs, such as the # hardware device for an interface disappearing. This is # an optional directive, and can be left out for brevity. # This behaviour is disabled by default. -panic_on_interface_error = No +# panic_on_interface_error = No # When Transport is enabled, it is possible to allow the @@ -67,7 +91,7 @@ panic_on_interface_error = No # Transport Instance, and printed to the log at startup. # Optional, and disabled by default. -respond_to_probes = No +# respond_to_probes = No [logging] @@ -209,6 +233,23 @@ loglevel = 4 # Serial port for the device port = /dev/ttyUSB0 + # It is also possible to use BLE devices + # instead of wired serial ports. The + # target RNode must be paired with the + # host device before connecting. BLE + # devices can be connected by name, + # BLE MAC address or by any available. + + # Connect to specific device by name + # port = ble://RNode 3B87 + + # Or by BLE MAC address + # port = ble://F4:12:73:29:4E:89 + + # Or connect to the first available, + # paired device + # port = ble:// + # Set frequency to 867.2 MHz frequency = 867200000 diff --git a/net-p2p/reticulum/files/patch-RNS_Reticulum.py b/net-p2p/reticulum/files/patch-RNS_Reticulum.py index 6ddf70beb844..9b9049e157a7 100644 --- a/net-p2p/reticulum/files/patch-RNS_Reticulum.py +++ b/net-p2p/reticulum/files/patch-RNS_Reticulum.py @@ -1,6 +1,6 @@ ---- RNS/Reticulum.py.orig 2022-11-03 16:31:20 UTC +--- RNS/Reticulum.py.orig 2025-05-15 20:24:33 UTC +++ RNS/Reticulum.py -@@ -141,6 +141,7 @@ class Reticulum: +@@ -165,6 +165,7 @@ class Reticulum: # named ".reticulum" inside the current users home directory userdir = os.path.expanduser("~") configdir = None @@ -8,30 +8,33 @@ configpath = "" storagepath = "" cachepath = "" -@@ -181,7 +182,9 @@ class Reticulum: +@@ -231,8 +232,11 @@ class Reticulum: if configdir != None: Reticulum.configdir = configdir else: - if os.path.isdir("/etc/reticulum") and os.path.isfile("/etc/reticulum/config"): + if os.path.isdir("/usr/local/etc/reticulum") and os.path.isfile("/usr/local/etc/reticulum/config"): -+ Reticulum.configdir = "/usr/local/etc/reticulum" -+ elif os.path.isdir("/etc/reticulum") and os.path.isfile("/etc/reticulum/config"): Reticulum.configdir = "/etc/reticulum" ++ Reticulum.interfacepath = Reticulum.configdir+"interfaces" ++ elif os.path.isdir("/etc/reticulum") and os.path.isfile("/etc/reticulum/config"): ++ Reticulum.configdir = "/etc/reticulum" elif os.path.isdir(Reticulum.userdir+"/.config/reticulum") and os.path.isfile(Reticulum.userdir+"/.config/reticulum/config"): Reticulum.configdir = Reticulum.userdir+"/.config/reticulum" -@@ -193,10 +196,7 @@ class Reticulum: - RNS.logfile = Reticulum.configdir+"/logfile" + else: +@@ -246,11 +250,8 @@ class Reticulum: + RNS.logcall = logdest Reticulum.configpath = Reticulum.configdir+"/config" - Reticulum.storagepath = Reticulum.configdir+"/storage" - Reticulum.cachepath = Reticulum.configdir+"/storage/cache" - Reticulum.resourcepath = Reticulum.configdir+"/storage/resources" - Reticulum.identitypath = Reticulum.configdir+"/storage/identities" + Reticulum.interfacepath = Reticulum.configdir+"/interfaces" + Reticulum.dbdir = Reticulum.configdir Reticulum.__transport_enabled = False - Reticulum.__use_implicit_proof = True -@@ -226,18 +226,6 @@ class Reticulum: + Reticulum.__link_mtu_discovery = Reticulum.LINK_MTU_DISCOVERY +@@ -291,21 +292,6 @@ class Reticulum: self.last_data_persist = time.time() self.last_cache_clean = 0 @@ -41,25 +44,19 @@ - if not os.path.isdir(Reticulum.cachepath): - os.makedirs(Reticulum.cachepath) - +- if not os.path.isdir(os.path.join(Reticulum.cachepath, "announces")): +- os.makedirs(os.path.join(Reticulum.cachepath, "announces")) +- - if not os.path.isdir(Reticulum.resourcepath): - os.makedirs(Reticulum.resourcepath) - - if not os.path.isdir(Reticulum.identitypath): - os.makedirs(Reticulum.identitypath) - - if os.path.isfile(self.configpath): - try: - self.config = ConfigObj(self.configpath) -@@ -253,7 +241,7 @@ class Reticulum: - - self.__apply_config() - RNS.log("Configuration loaded from "+self.configpath, RNS.LOG_VERBOSE) -- -+ - RNS.Identity.load_known_destinations() + if not os.path.isdir(Reticulum.interfacepath): + os.makedirs(Reticulum.interfacepath) - RNS.Transport.start(self) -@@ -345,6 +333,9 @@ class Reticulum: +@@ -450,6 +436,9 @@ class Reticulum: if "reticulum" in self.config: for option in self.config["reticulum"]: value = self.config["reticulum"][option] @@ -69,21 +66,25 @@ if option == "share_instance": value = self.config["reticulum"].as_bool(option) self.share_instance = value -@@ -369,6 +360,23 @@ class Reticulum: - if v == False: - Reticulum.__use_implicit_proof = False +@@ -531,6 +520,27 @@ class Reticulum: + if self.local_socket_path == None and self.use_af_unix: + self.local_socket_path = "default" ++ + Reticulum.storagepath = Reticulum.dbdir+"/storage" + Reticulum.cachepath = Reticulum.dbdir+"/storage/cache" + Reticulum.resourcepath = Reticulum.dbdir+"/storage/resources" + Reticulum.identitypath = Reticulum.dbdir+"/storage/identities" -+ ++ + if not os.path.isdir(Reticulum.storagepath): + os.makedirs(Reticulum.storagepath) + + if not os.path.isdir(Reticulum.cachepath): + os.makedirs(Reticulum.cachepath) + ++ if not os.path.isdir(os.path.join(Reticulum.cachepath, "announces")): ++ os.makedirs(os.path.join(Reticulum.cachepath, "announces")) ++ + if not os.path.isdir(Reticulum.resourcepath): + os.makedirs(Reticulum.resourcepath) + @@ -93,12 +94,12 @@ self.__start_local_interface() if self.is_shared_instance or self.is_standalone_instance: -@@ -1275,6 +1283,9 @@ __default_rns_config__ = '''# This is the default Reti +@@ -1360,6 +1370,9 @@ __default_rns_config__ = '''# This is the default Reti [reticulum] + -+# Define the DB directory ++# Define database directory +dbdir = "/var/db/reticulum" # If you enable Transport, your system will route traffic diff --git a/net-p2p/reticulum/files/patch-RNS_Utilities_rnsd.py b/net-p2p/reticulum/files/patch-RNS_Utilities_rnsd.py index 33f61985b665..2f737441e71a 100644 --- a/net-p2p/reticulum/files/patch-RNS_Utilities_rnsd.py +++ b/net-p2p/reticulum/files/patch-RNS_Utilities_rnsd.py @@ -1,10 +1,10 @@ ---- RNS/Utilities/rnsd.py.orig 2023-02-23 17:25:44 UTC +--- RNS/Utilities/rnsd.py.orig 2025-05-15 20:24:33 UTC +++ RNS/Utilities/rnsd.py -@@ -80,6 +80,9 @@ __example_rns_config__ = '''# This is an example Retic +@@ -93,6 +93,9 @@ __example_rns_config__ = '''# This is an example Retic [reticulum] -+# Define the DB directory ++# Define database directory +dbdir = "/var/db/reticulum" + # If you enable Transport, your system will route traffic |