mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 19:01:53 -04:00
Added discovered interface auto-connect criteria constants
This commit is contained in:
parent
fc95caf519
commit
bb1320913a
3 changed files with 14 additions and 0 deletions
|
|
@ -483,6 +483,9 @@ class InterfaceDiscovery():
|
|||
AUTOCONNECT_TYPES = ["BackboneInterface", "TCPServerInterface"]
|
||||
DISCOVERABLE_TYPES = ["BackboneInterface", "TCPServerInterface", "I2PInterface", "RNodeInterface", "WeaveInterface", "KISSInterface"]
|
||||
|
||||
AUTOCONNECT_IMPLS = ["RNS"]
|
||||
AUTOCONNECT_MIN_V = "1.5.2"
|
||||
|
||||
AC_TRANSPORT_MODE = RNS.Interfaces.Interface.Interface.MODE_GATEWAY
|
||||
AC_GRAVITY = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ class Reticulum:
|
|||
Reticulum.__discovery_enabled = False
|
||||
Reticulum.__discover_interfaces = False
|
||||
Reticulum.__autoconnect_discovered_interfaces = False
|
||||
Reticulum.__autoconnect_unverified = False
|
||||
Reticulum.__autoconnect_interface_mode = None
|
||||
Reticulum.__autoconnect_interface_gravity = None
|
||||
Reticulum.__autoconnect_announces_to_internal = None
|
||||
|
|
@ -628,6 +629,10 @@ class Reticulum:
|
|||
v = self.config["reticulum"].as_int(option)
|
||||
if v > 0: Reticulum.__autoconnect_discovered_interfaces = v
|
||||
|
||||
if option == "autoconnect_unverified_implementations":
|
||||
v = self.config["reticulum"].as_bool(option)
|
||||
Reticulum.__autoconnect_unverified = v
|
||||
|
||||
if option == "autoconnect_interface_mode":
|
||||
v = None; dmode = str(self.config["reticulum"]["autoconnect_interface_mode"]).lower()
|
||||
if dmode == "full": v = Interface.Interface.MODE_FULL
|
||||
|
|
@ -2142,6 +2147,10 @@ class Reticulum:
|
|||
def should_autoconnect_discovered_interfaces():
|
||||
return Reticulum.__autoconnect_discovered_interfaces > 0
|
||||
|
||||
@staticmethod
|
||||
def should_autoconnect_unverified_implementations():
|
||||
return Reticulum.__autoconnect_unverified
|
||||
|
||||
@staticmethod
|
||||
def autoconnect_interface_mode():
|
||||
return Reticulum.__autoconnect_interface_mode
|
||||
|
|
|
|||
|
|
@ -1234,6 +1234,8 @@ For more fine-grained control over how discovered interfaces are auto-connected,
|
|||
|
||||
* The ``autoconnect_announces_to_internal`` option allows you to specify that auto-connected interfaces should propagate announces to ``internal`` mode interfaces, even if the auto-connected interface's mode would normally not allow for this.
|
||||
|
||||
* The ``autoconnect_unverified_implementations`` option will allow the interface discovery system to auto-connect to *any* announced interface, even those coming from unverified, experimental or potentially broken implementations. Be very careful with this option.
|
||||
|
||||
Remote Management
|
||||
-----------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue