question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add Tor support: onion listeners

See original GitHub issue

My plan here is to add a --tor flag, which will:

  • use Tor for all connections to the Rendezvous Server (txtorcon will be asked to create a new Tor instance)
  • for Transit, ask txtorcon to create an ephemeral Hidden Service, and use tor:XYZ.onion:PORT as the “direct hint”, instead of scanning and revealing local IP addresses
  • continue to advertise the Relay Server as the “relay hints”
  • use Tor to connect to the Relay Server, if a direct connection doesn’t succeed

If both sides are using --tor, they should be able to connect with the HS “direct hints”. But if only one side is using Tor, the other won’t be able to use the HS, so they must fall back to the relay.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
meejahcommented, Jun 3, 2016

I have tested it, and Tor support works.

0reactions
warnercommented, Jul 27, 2016

reminder to myself: meejah says the best API in txtorcon-0.15.0 for this is probably:

TCPHiddenServiceEndpoint.system_tor(
  reactor, 
  UNIXEndpoint(reactor, "/var/run/tor/control"),
  public_port=RELAY_PORT,
  hidden_service_dir="/tmp/foo",
)

Also, assuming that a side which doesn’t use --tor isn’t capable of using tor hints, we’ve got nine cases to deal with:

(Receiver Abilities)
(Sender Abilities) rx=public-IP rx=private-IP rx=tor
tx=public-IP direct direct direct (torified)
tx=private-IP direct relay relay (torified)
tx=tor direct (torified) relay (torified) HS

If the non---tor side is able to use Tor (but we only spin up the HS if we’re restricting ourselves to --tor), it looks like:

(Receiver Abilities)
(Sender Abilities) rx=public-IP (+tor) rx=private-IP (+tor) rx=tor
tx=public-IP (+tor) direct direct direct (torified)
tx=private-IP (+tor) direct relay HS
tx=tor direct (torified) HS HS

If we decided to aggressively spin up the hidden service any time we can, even if we have no idea if the other side can use it, we could flip that middle private+private case to HS. But that doesn’t feel like a win… I suspect the number of times that will be helpful is fairly small.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connecting To Tor - Tor Project | Support
Try a different port from the one currently in use, such as 9050 or 9150. When all else fails, reinstall the browser. This...
Read more >
Tor Support in Zcash
By creating a Tor Hidden Service, you can help promote privacy for Zcash users by advertising your node's .onion address to other Tor...
Read more >
lnd/configuring_tor.md at master · lightningnetwork/lnd - GitHub
In order to listen for inbound connections through Tor, an onion service must be created. There are two types of onion services: v2...
Read more >
Tor Onion v3 Hidden Service - JamieWeb
Compile Tor with ./configure followed by make. On a fresh Ubuntu Server 16.04 system, you'll need to install gcc, libevent-dev, libssl-dev and make....
Read more >
How to Host Your Own Tor Hidden Service with a Custom ...
How To: Host Your Own Tor Hidden Service with a Custom Onion Address · Step 1Understand How the Tor Network Works · Step...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found