Reticulum icon indicating copy to clipboard operation
Reticulum copied to clipboard

Tor as a transport

Open darrenmartyn opened this issue 2 years ago • 4 comments

I probably can't implement this immediately, as I am still getting familiar with the software, but I noticed it already supports I2P tunnels as a transport layer.

It probably wouldn't be particularly hard to implement Tor support - it would just be a change to the tcpclient interface implementation to use a SOCKS proxy, and for the tcpserver interface implementation, just spinning up a hidden service (probably using the Stem library) pointing to the tcpserver port (bound to localhost by default in Tor mode?).

Unless I am missing something?

Love the project by the way, I hope at some time to pick up some of the associated hardware.

darrenmartyn avatar Apr 08 '22 21:04 darrenmartyn

Unless I am missing something?

I don't think you are missing anything. Pretty sure right now you could use the existing TCPServer and TCPClient interfaces to tunnel a Reticulum connection through tor, it just requires some manual setup of your tor process.

~~Do you know if there are any python libraries that would provide an easy method of managing tor hidden services?~~ Didn't realize the Stem library you mentioned does exactly this, sorry. Using I2P, you can tunnel normal Reticulum TCP connections, but there's also an API that allows the Reticulum process to manage all the I2P-related things programmatically, and more efficiently that spawning a setting up a TCP interface for every I2P peer.

One other fairly significant option that a tor interface could provide, is the ability for a RNS Instance to easily connect to some public-facing TCPServer, using tor exit nodes.

4c3e avatar Apr 08 '22 23:04 4c3e

Stem and PySocks would probably be the two "new dependancies" added to implement this.

PySocks would allow TCPClient interfaces to connect over a SOCKS proxy to a public facing instance running a TCPServer interface, including ones operating as hidden services.

Stem will allow to programatically control the Tor process, for example, by launching a hidden service.

One other fairly significant option that a tor interface could provide, is the ability for a RNS Instance to easily connect to some public-facing TCPServer, using tor exit nodes.

That is pretty much it. And with hidden service support for TCPServer's, you can have location-hidden RNS Instances behind NAT that offer a "public facing" interface for clients to connect to.

I think I'll try get a draft/test of adding SOCKS support to the TCPClient interface first. Should allow me to get familiar with the codebase.

darrenmartyn avatar Apr 09 '22 10:04 darrenmartyn

That sounds like a good approach. Let me know if you bump into any problems or have questions along the way, I will try my best to be helpful :)

markqvist avatar Apr 09 '22 14:04 markqvist

why not https://freenetproject.org/ it is better because use similar messages system.

srem1 avatar Feb 09 '23 17:02 srem1