mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 14:46:05 -04:00
Preliminary I2P Interface support
This commit is contained in:
parent
07a65609b4
commit
fa82989a2e
11 changed files with 1247 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue