Work on I2P Interface

This commit is contained in:
Mark Qvist 2022-02-23 21:29:18 +01:00
parent b62e9af5d4
commit 4b3ead3db2

View File

@ -81,7 +81,6 @@ class I2PController:
RNS.log("Bringing up I2P tunnel to "+str(owner)+" in background, this may take a while...", RNS.LOG_INFO) RNS.log("Bringing up I2P tunnel to "+str(owner)+" in background, this may take a while...", RNS.LOG_INFO)
tunnel = self.i2plib.ClientTunnel(i2p_destination, owner.local_addr, sam_address=self.sam_address) tunnel = self.i2plib.ClientTunnel(i2p_destination, owner.local_addr, sam_address=self.sam_address)
await tunnel.run() await tunnel.run()
tunnel.aclose()
RNS.log(str(owner)+ " tunnel setup complete", RNS.LOG_VERBOSE) RNS.log(str(owner)+ " tunnel setup complete", RNS.LOG_VERBOSE)
asyncio.run_coroutine_threadsafe(tunnel_up(), self.loop) asyncio.run_coroutine_threadsafe(tunnel_up(), self.loop)
@ -118,7 +117,6 @@ class I2PController:
RNS.log(str(owner)+" Bringing up I2P tunnel in background, this may take a while...", RNS.LOG_INFO) RNS.log(str(owner)+" Bringing up I2P tunnel in background, this may take a while...", RNS.LOG_INFO)
tunnel = self.i2plib.ServerTunnel((owner.bind_ip, owner.bind_port), loop=self.loop, destination=i2p_dest, sam_address=self.sam_address) tunnel = self.i2plib.ServerTunnel((owner.bind_ip, owner.bind_port), loop=self.loop, destination=i2p_dest, sam_address=self.sam_address)
await tunnel.run() await tunnel.run()
tunnel.aclose()
RNS.log(str(owner)+ " tunnel setup complete, instance reachable at: "+str(i2p_dest.base32)+".b32.i2p", RNS.LOG_VERBOSE) RNS.log(str(owner)+ " tunnel setup complete, instance reachable at: "+str(i2p_dest.base32)+".b32.i2p", RNS.LOG_VERBOSE)
asyncio.run_coroutine_threadsafe(tunnel_up(), self.loop) asyncio.run_coroutine_threadsafe(tunnel_up(), self.loop)