Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tor integration #16

Closed
binarybaron opened this issue Aug 9, 2024 · 6 comments · Fixed by #203
Closed

Tor integration #16

binarybaron opened this issue Aug 9, 2024 · 6 comments · Fixed by #203
Labels
enhancement New feature or request

Comments

@binarybaron
Copy link

We need to allow the user to start tor from within the GUI. We previously did this by bundling precompiled tor binaries. We can do better now by using libtor

@binarybaron binarybaron added the enhancement New feature or request label Aug 9, 2024
@binarybaron binarybaron transferred this issue from another repository Aug 17, 2024
@binarybaron
Copy link
Author

binarybaron commented Sep 28, 2024

As far as I see, there are three options for implementing (aside from bundling precompiled tor binaries):

  1. Use libtor. This requires additional build tools to build this project which is always annoying. However, it does have stable support for running onion services which is good. And it won't require a lot of changes. And the C-implementation of Tor is very stable and battle-tested.
  2. Use arti_client (official rust implementation of Tor) to manually start a SOCKS proxy.
  3. Use libp2p-tor which uses arti to create a libp2p transport. The libp2p-tor crate might not have support for running onion services yet. (arti does have semi-stable support for it, see https://gitlab.torproject.org/tpo/core/arti)

@Einliterflasche
Copy link

Using libp2p-tor would be really convenient. However, as mentioned in their docs, the privacy guarantees are easily voided by behaviours like Identify (which we use). We will have to examine carefully whether this actually makes sense

@binarybaron
Copy link
Author

binarybaron commented Oct 24, 2024

I still think it's the best option. The alternative is routing our transport over a proxy which has the same exact issues.

Of course, we cannot with absolute certainty guarantee the same level of security as a sandboxed environemnt (Tails or Whonix).

@Einliterflasche
Copy link

We might also remove or change the Identity behaviour

@binarybaron
Copy link
Author

umgefahren/libp2p-tor#17

@binarybaron
Copy link
Author

#196 added support for dialing over tor using arti_client.

binarybaron added a commit that referenced this issue Dec 3, 2024
This pull requests
- Adds rust native support for the `asb` to listen on an onion service. Previously we were depedent on a seperately running `torc` client. Instead we now use [arti](https://tpo.pages.torproject.net/core/arti/), a rust implementation of the tor protocol.
- Removes the `tor.control_port` and `tor.socks5_port` property from the config of the `asb`
- Adds a new `tor.register_hidden_service` boolean property to the config of the `asb` which when enabled automatically runs a hidden service at startup
- Adds a new `tor.hidden_service_num_intro_points` config property to specify how many introduction points to register the onion service at
- Adds support for the `cli` to dial onion addresses

This is dependent on umgefahren/libp2p-tor#24

Closes #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants