Allow AP mode on Backbone and TCP interfaces

This commit is contained in:
Mark Qvist 2025-04-12 11:01:57 +02:00
parent ea4a525db6
commit d2efd6c3e4

View File

@ -687,9 +687,6 @@ class Reticulum:
if "port" in c: c["target_port"] = c["port"]
if "remote" in c: c["target_host"] = c["remote"]
if "listen_on" in c: c["listen_ip"] = c["listen_on"]
if interface_mode == Interface.Interface.MODE_ACCESS_POINT:
RNS.log(str(c["type"])+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING)
interface_mode = Interface.Interface.MODE_FULL
if c["type"] == "BackboneInterface":
if "target_host" in c: interface = BackboneInterface.BackboneClientInterface(RNS.Transport, interface_config)
@ -705,26 +702,14 @@ class Reticulum:
interface_post_init(interface)
if c["type"] == "TCPServerInterface":
if interface_mode == Interface.Interface.MODE_ACCESS_POINT:
RNS.log(str(c["type"])+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING)
interface_mode = Interface.Interface.MODE_FULL
interface = TCPInterface.TCPServerInterface(RNS.Transport, interface_config)
interface_post_init(interface)
if c["type"] == "TCPClientInterface":
if interface_mode == Interface.Interface.MODE_ACCESS_POINT:
RNS.log(str(c["type"])+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING)
interface_mode = Interface.Interface.MODE_FULL
interface = TCPInterface.TCPClientInterface(RNS.Transport, interface_config)
interface_post_init(interface)
if c["type"] == "I2PInterface":
if interface_mode == Interface.Interface.MODE_ACCESS_POINT:
RNS.log(str(c["type"])+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING)
interface_mode = Interface.Interface.MODE_FULL
interface_config["storagepath"] = Reticulum.storagepath
interface_config["ifac_netname"] = ifac_netname
interface_config["ifac_netkey"] = ifac_netkey