Added IPv6 support to BackboneInterface

This commit is contained in:
Mark Qvist 2025-04-09 14:23:39 +02:00
parent b58cb3c0ed
commit 628c4984a3
3 changed files with 49 additions and 18 deletions

View file

@ -672,8 +672,15 @@ class Reticulum:
interface = AutoInterface.AutoInterface(RNS.Transport, interface_config)
interface_post_init(interface)
if c["type"] == "BackboneInterface" or c["type"] == "BackboneClientInterface":
if "port" in c: c["listen_port"] = c["port"]
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 c["type"] == "BackboneInterface":
interface = BackboneInterface.BackboneInterface(RNS.Transport, interface_config)
if "target_host" in c: interface = BackboneInterface.BackboneClientInterface(RNS.Transport, interface_config)
else: interface = BackboneInterface.BackboneInterface(RNS.Transport, interface_config)
interface_post_init(interface)
if c["type"] == "BackboneClientInterface":
@ -1195,10 +1202,6 @@ class Reticulum:
rpc_connection.send({"get": "next_hop", "destination_hash": destination})
response = rpc_connection.recv()
# TODO: Remove this debugging function
# if not response:
# response = RNS.Transport.next_hop(destination)
return response
else: