mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-12 03:28:11 -07:00
Added recursive_prs interface option
This commit is contained in:
@@ -106,6 +106,7 @@ class Interface:
|
|||||||
self.discoverable = False
|
self.discoverable = False
|
||||||
self.last_discovery_announce = 0
|
self.last_discovery_announce = 0
|
||||||
self.bootstrap_only = False
|
self.bootstrap_only = False
|
||||||
|
self.recursive_prs = False
|
||||||
self.parent_interface = None
|
self.parent_interface = None
|
||||||
self.spawned_interfaces = None
|
self.spawned_interfaces = None
|
||||||
self.tunnel_id = None
|
self.tunnel_id = None
|
||||||
|
|||||||
+7
-1
@@ -806,6 +806,9 @@ class Reticulum:
|
|||||||
bootstrap_only = False
|
bootstrap_only = False
|
||||||
if "bootstrap_only" in c: bootstrap_only = c.as_bool("bootstrap_only")
|
if "bootstrap_only" in c: bootstrap_only = c.as_bool("bootstrap_only")
|
||||||
|
|
||||||
|
recursive_prs = False
|
||||||
|
if "recursive_prs" in c: recursive_prs = c.as_bool("recursive_prs")
|
||||||
|
|
||||||
ignore_config_warnings = False
|
ignore_config_warnings = False
|
||||||
if "ignore_config_warnings" in c: ignore_config_warnings = c.as_bool("ignore_config_warnings")
|
if "ignore_config_warnings" in c: ignore_config_warnings = c.as_bool("ignore_config_warnings")
|
||||||
|
|
||||||
@@ -886,6 +889,7 @@ class Reticulum:
|
|||||||
interface.discovery_bandwidth = discovery_bandwidth
|
interface.discovery_bandwidth = discovery_bandwidth
|
||||||
interface.discovery_modulation = discovery_modulation
|
interface.discovery_modulation = discovery_modulation
|
||||||
|
|
||||||
|
interface.recursive_prs = recursive_prs
|
||||||
interface.announce_rate_target = announce_rate_target
|
interface.announce_rate_target = announce_rate_target
|
||||||
interface.announce_rate_grace = announce_rate_grace
|
interface.announce_rate_grace = announce_rate_grace
|
||||||
interface.announce_rate_penalty = announce_rate_penalty
|
interface.announce_rate_penalty = announce_rate_penalty
|
||||||
@@ -1044,7 +1048,8 @@ class Reticulum:
|
|||||||
RNS.panic()
|
RNS.panic()
|
||||||
|
|
||||||
def _add_interface(self, interface, mode = None, configured_bitrate=None, ifac_size=None, ifac_netname=None, ifac_netkey=None,
|
def _add_interface(self, interface, mode = None, configured_bitrate=None, ifac_size=None, ifac_netname=None, ifac_netkey=None,
|
||||||
announce_cap=None, announce_rate_target=None, announce_rate_grace=None, announce_rate_penalty=None, bootstrap_only=False):
|
announce_cap=None, announce_rate_target=None, announce_rate_grace=None, announce_rate_penalty=None,
|
||||||
|
bootstrap_only=False, recursive_prs=False):
|
||||||
if not self.is_connected_to_shared_instance:
|
if not self.is_connected_to_shared_instance:
|
||||||
if interface != None and issubclass(type(interface), RNS.Interfaces.Interface.Interface):
|
if interface != None and issubclass(type(interface), RNS.Interfaces.Interface.Interface):
|
||||||
|
|
||||||
@@ -1059,6 +1064,7 @@ class Reticulum:
|
|||||||
if ifac_size != None: interface.ifac_size = ifac_size
|
if ifac_size != None: interface.ifac_size = ifac_size
|
||||||
else: interface.ifac_size = interface.DEFAULT_IFAC_SIZE
|
else: interface.ifac_size = interface.DEFAULT_IFAC_SIZE
|
||||||
|
|
||||||
|
interface.recursive_prs = recursive_prs
|
||||||
interface.announce_cap = announce_cap if announce_cap != None else Reticulum.ANNOUNCE_CAP/100.0
|
interface.announce_cap = announce_cap if announce_cap != None else Reticulum.ANNOUNCE_CAP/100.0
|
||||||
interface.announce_rate_target = announce_rate_target
|
interface.announce_rate_target = announce_rate_target
|
||||||
interface.announce_rate_grace = announce_rate_grace
|
interface.announce_rate_grace = announce_rate_grace
|
||||||
|
|||||||
+2
-1
@@ -2915,7 +2915,8 @@ class Transport:
|
|||||||
if attached_interface != None:
|
if attached_interface != None:
|
||||||
should_ingress_limit = attached_interface.should_ingress_limit_pr()
|
should_ingress_limit = attached_interface.should_ingress_limit_pr()
|
||||||
if RNS.Reticulum.transport_enabled():
|
if RNS.Reticulum.transport_enabled():
|
||||||
if attached_interface.mode in RNS.Interfaces.Interface.Interface.DISCOVER_PATHS_FOR: should_search_for_unknown = True
|
if attached_interface.recursive_prs: should_search_for_unknown = True
|
||||||
|
elif attached_interface.mode in RNS.Interfaces.Interface.Interface.DISCOVER_PATHS_FOR: should_search_for_unknown = True
|
||||||
|
|
||||||
if RNS.sl(RNS.LOG_DEBUG):
|
if RNS.sl(RNS.LOG_DEBUG):
|
||||||
interface_str = f" on {attached_interface}"
|
interface_str = f" on {attached_interface}"
|
||||||
|
|||||||
@@ -1207,6 +1207,13 @@ These can be used to control various aspects of interface behaviour.
|
|||||||
link or a remote TCP tunnel) solely to discover better local
|
link or a remote TCP tunnel) solely to discover better local
|
||||||
infrastructure, which then supersedes the bootstrap interface.
|
infrastructure, which then supersedes the bootstrap interface.
|
||||||
|
|
||||||
|
|
||||||
|
* | The ``recursive_prs`` option allows you to enable recursive path
|
||||||
|
discovery on an interface regardless of its configured interface
|
||||||
|
mode. When this option is enabled, Reticulum will attempt to
|
||||||
|
recursively discover paths for path requests received on this
|
||||||
|
interface.
|
||||||
|
|
||||||
.. _interfaces-modes:
|
.. _interfaces-modes:
|
||||||
|
|
||||||
Interface Modes
|
Interface Modes
|
||||||
|
|||||||
Reference in New Issue
Block a user