Skip to content

Add Tor support for outbound connections#177

Merged
benthecarman merged 1 commit intolightningdevkit:mainfrom
Anyitechs:add-TorSupport
Apr 2, 2026
Merged

Add Tor support for outbound connections#177
benthecarman merged 1 commit intolightningdevkit:mainfrom
Anyitechs:add-TorSupport

Conversation

@Anyitechs
Copy link
Copy Markdown
Contributor

This allows us to add Tor support for outbound connections via SOCKS as introduced in lightningdevkit/ldk-node#778.

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented Mar 30, 2026

👋 Thanks for assigning @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

client_trusts_lsp = true

[tor]
proxy_address = "vww6ybal4bd7szmgncyruucpgfkqahzddi37ktce36gpflljhvevubid.onion:9735"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proxy address will look like 127.0.0.1:9050. Can we use that here and below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I missed the part of the docs that says "The proxy address must not itself be an onion address."


if let Some(tor_config) = config_file.tor_config {
let tor_config = ldk_node::config::TorConfig { proxy_address: tor_config.proxy_address };
let _ = builder.set_tor_config(tor_config);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to handle this error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Anyitechs
Copy link
Copy Markdown
Contributor Author

Addressed comments and rebased to fix conflicts.

@Anyitechs Anyitechs requested a review from benthecarman March 31, 2026 22:36
@ldk-reviews-bot
Copy link
Copy Markdown

🔔 1st Reminder

Hey @benthecarman! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me!

Image

@benthecarman benthecarman merged commit cbffa3a into lightningdevkit:main Apr 2, 2026
7 checks passed
@benthecarman
Copy link
Copy Markdown
Collaborator

benthecarman commented Apr 2, 2026

Exposed my mainnet ldk-server on tor if someone wants to try and connect 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants