From c90a5d58876fb28319238e5b35eaaef3f73c89f8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 18 Nov 2026 14:05:09 +0100 Subject: [PATCH] Added destination type loading --- RNS/Reticulum.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 2fe39a43..77ae994e 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -900,6 +900,28 @@ class Reticulum: except Exception as e: RNS.log(f"Error while loading blocked IP list: {e}", RNS.LOG_ERROR) + if os.path.isfile(Reticulum.configdir+"/known_destination_types"): + try: + with open(Reticulum.configdir+"/known_destination_types", "r") as f: + dst_types = f.read().strip().splitlines() + for line in dst_types: + dst_type = line.strip() + if dst_type.startswith("#"): continue + RNS.Transport.destination_type_map[RNS.Destination.name_hash(dst_type)] = dst_type + + except Exception as e: RNS.log(f"Error while loading known destination types list: {e}", RNS.LOG_ERROR) + + if os.path.isfile(Reticulum.configdir+"/flagged_destination_types"): + try: + with open(Reticulum.configdir+"/flagged_destination_types", "r") as f: + dst_types = f.read().strip().splitlines() + for line in dst_types: + dst_type = line.strip() + if dst_type.startswith("#"): continue + RNS.Transport.flagged_type_map[RNS.Destination.name_hash(dst_type)] = dst_type + + except Exception as e: RNS.log(f"Error while loading flagged destination types list: {e}", RNS.LOG_ERROR) + dql = RNS.Reticulum.default_data_queue_length() or RNS.Transport.INBOUND_DA_QUEUE_LENGTH BackboneInterface.BackboneInterface.DP_IC_HIGH_WM = max(4, int((BackboneInterface.BackboneInterface.DP_IC_HIGH_WM_PCT/100.0) * dql)) BackboneInterface.BackboneInterface.DP_IC_MID_WM = max(2, int((BackboneInterface.BackboneInterface.DP_IC_MID_WM_PCT/100.0) * dql)) @@ -2020,7 +2042,8 @@ class Reticulum: "via": RNS.Transport.path_table[dst_hash][1], "hops": path_hops, "expires": RNS.Transport.path_table[dst_hash][3], "value": dst_value, "used": RNS.Transport.path_table[dst_hash][7], "lr_cost": lr_cost, - "interface": str(RNS.Transport.path_table[dst_hash][5]) } + "interface": str(RNS.Transport.path_table[dst_hash][5]), + "interface_hash": RNS.Transport.path_table[dst_hash][5].get_hash() } path_table.append(entry) return path_table