-
Notifications
You must be signed in to change notification settings - Fork 267
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
Support for Tor onion services #736
Conversation
Awesome. Haven't looked at it yet, but it's great to have someone working on this! |
eclair-core/src/main/scala/fr/acinq/eclair/tor/Socks5Connection.scala
Outdated
Show resolved
Hide resolved
Eclair can connect to v2/v3, but will only open a v3 service. Instead of trying our best to be compatible, we just require a minimal version for the tor daemon. The rationale for this change is that it allows for a significant simplification, and is recommended in the Tor documentation: > Since Tor 0.3.2 and Tor Browser 7.5.a5 56-character long v3 onion addresses are supported and should be used instead. source: https://www.torproject.org/docs/tor-onion-service.html.en#four
Instead of doing the error management ourselves, use the let-it-crash principle and let the supervisor handle and log failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed and committed changes on branch tor_hidden_service_pm.
Main changes:
- Removed support for tor v2 hidden services (bcc3d53), because they are not recommended in Tor documentation. I'm curious to hear your rationale for supporting them.
- Replaced
SAFECOOKIE
byPASSWORD
authentication (5e8d573). Implementation is simpler, allows for an easier setup on windows, and makes it possible to have a separate tor server. I'm interested in your thoughts on this.
I noticed that you use java-style exception management in actors, I converted it to something more akka-esque (let it crash + supervision strategy).
Also, please confirm that I can apply the Apache 2 License to your files.
With those changes I think this can be merged quickly.
For example, supported Tor version in Ubuntu 18.04.1 LTS is 0.3.2.10, which is pre-v3. It's even earlier in raspbian. It's always easy to drop v2 support when v3 is enabled in most Linux distributions.
Safe cookie authentication doesn't require any additional configuration on Mac OS X and minimal configuration on Linux (adding
👍
Yes, sure |
Also safe cookie authentication is way more secure, because the secrets are not stored anywhere and the cookie file gets updated all the time. Bitcoin Core is going to use a similar authentication technique for its RPC because of that fact. Another point is that |
Those are very valid points, I added back onion service v2, and support for both I simplified further the code, added licenses and fixed an issue with peer address storage (we need to store onion addresses). Still need to rework the doc. Took the liberty to merge all this on this branch. |
and updated the doc
Previous version made the Client aware of NodeAddress.
No description provided.