scherzma / Skunk

P2P Tor Chat App
GNU General Public License v3.0
4 stars 0 forks source link

Integration of Tor for Enhanced Privacy and Anonymity #21

Closed JavaHammes closed 4 months ago

JavaHammes commented 4 months ago

This pull request marks a significant enhancement to our project by integrating Tor, leveraging the cretz/bine and ipsn/go-libtor library. This integration allows our peers to route their traffic through the Tor network, effectively turning each peer into a hidden service within this network. One of the key advantages of using ipsn/go-libtor is its ability to statically link Tor to our project, which simplifies deployment by eliminating the need for users to install Tor separately.

Usage Example:

To start a Tor process and manage a hidden service, the following code snippet demonstrates the basic operations:

conf := &tor.TorConfig{}
torInstance, _ := tor.NewTor(conf)
torInstance.StartTor()
onion, _ := torInstance.StartHiddenService()
torInstance.StopTor()

The tor.TorConfig struct has been set up to allow detailed configuration of the Tor instance, including:

Traffic Routing Options:

Peers can now route their traffic in multiple ways:

Limitations:

This implementation currently restricts our program to only operate on Linux-based systems due to dependencies in go-libtor.

For more information on go-libtor, please refer to go-libtor documentation.

Closes #14