-
Notifications
You must be signed in to change notification settings - Fork 20
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
Integrate Tor Connection Options #36
Comments
First of all thanks for the suggestion and the effort put in this issue. The feature is very interesting but I have some doubts about the implementation side. You mentioned the To better frame this proposal, is the proposed code a suggestion or have you tried to run it as well? |
Hi Zoe, You are right, the correct library name is with an underscore and not a hyphen, it is my typo. You are also right about your concerns about its use. The alternative for creating Onion Services would be the other library mentioned: In conclusion, these are only suggestions. If there are no approaches that you evaluate better, I can try to implement and run it. |
It seems the Rust ecosystem is not completely ready for Tor. |
Hi Zoe, |
Enhancement: proposal to introduce Tor connection options and hybrid mode
I would like to suggest an enhancement to support connectivity via Tor. This feature will provide users the ability to connect to peers via clearnet, Tor, or a hybrid system (both) as in
^lnd 0.14.0
.Proposed Changes
Introduce new arguments in the
Args
structure to specify the Tor options updating theLdkUserInfo
structure to include the Tor configuration options.ldk.rs
Update the PeerManager initialization to handle connections via both clearnet and Tor, based on the provided Tor arguments. We will integrate the
tokio-socks
library to support Tor connections via an external Tor proxy and thetor-control
library to use the Tor Control Protocol (TorCP) to create an Onion Service for inbound connections again via the external Tor proxy. I do not consider it feasible at this time to use thearti
library for integrating a Tor proxy directly into the application because it is still an unstable library and not comparable in security to the C implementation of the Tor daemon. Also,arti
is not yet able to give full support to Onion Service, so we would be limited in handling inbound connections.Explanation of changes in
start_ldk
Tor Configuration:
Proxy Handling:
Listeners:
Event Handling:
Testing
To ensure the proper functioning of a minimal implementation:
--tor-active true
and verify it connects via Tor.--tor-active true
--tor-skip-proxy-for-clearnet-targets true
and verify it can connect via both methods.--tor-active
false and verify it connects via clearnet.The text was updated successfully, but these errors were encountered: