Preliminary I2P Interface support

This commit is contained in:
Mark Qvist 2022-02-23 17:40:31 +01:00
parent 07a65609b4
commit fa82989a2e
11 changed files with 1247 additions and 1 deletions

View file

@ -6,6 +6,7 @@ if get_platform() == "android":
from .Interfaces import AutoInterface
from .Interfaces import TCPInterface
from .Interfaces import UDPInterface
from .Interfaces import I2PInterface
else:
from .Interfaces import *
@ -396,6 +397,24 @@ class Reticulum:
RNS.Transport.interfaces.append(interface)
if c["type"] == "I2PInterface":
i2p_peers = c.as_list("peers") if "peers" in c else None
interface = I2PInterface.I2PInterface(
RNS.Transport,
name,
Reticulum.storagepath,
i2p_peers
)
if "outgoing" in c and c.as_bool("outgoing") == True:
interface.OUT = True
else:
interface.OUT = False
RNS.Transport.interfaces.append(interface)
if c["type"] == "SerialInterface":
port = c["port"] if "port" in c else None
speed = int(c["speed"]) if "speed" in c else 9600