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

Add support to connect to TOR nodes #10

Merged
merged 6 commits into from
Sep 7, 2021
Merged

Add support to connect to TOR nodes #10

merged 6 commits into from
Sep 7, 2021

Conversation

bumi
Copy link
Owner

@bumi bumi commented Aug 27, 2021

This requires tor to be installed/running on the system

This requires tor to be installed/running on the system
@bumi bumi mentioned this pull request Aug 27, 2021
@bumi
Copy link
Owner Author

bumi commented Aug 27, 2021

@aplnx I've updated LnMe and some Tor code.
Can you maybe test your setup with this branch? And do you maybe want to post and example on how you run LnMe and your required LND TOR config here?

@aplnx
Copy link

aplnx commented Aug 30, 2021 via email

@aplnx
Copy link

aplnx commented Sep 2, 2021

Hi!

I am sorry for asking that, but what is the git command to get this specific branch?

I was testing things here, but I think I downloaded the wrong version...

@bumi
Copy link
Owner Author

bumi commented Sep 3, 2021

I can send you a binary if you want - what system are you running on?

but I think you can do:

git fetch --all
git checkout -b tor-support origin/tor-support

* master:
  Provide LNURL metadata hash as description_hash in the lightning pr
  Update .lndonate
  Update .lndonate
  Create .lndonate
  Update README.md
  Update README.md
  Update README.md
@aplnx
Copy link

aplnx commented Sep 3, 2021

@bumi Hi, sorry for taking too long. This was not an easy week.

I managed to test Tor support. It is working perfectly!

The config.toml file I used is bellow

disable-website = true
disable-cors = false
request-limit = 5
port = "1323"
static-path = " <1>" # Blank means disabled

lnd-address = "abc...xyz.onion:10009"
lnd-cert-path = "/path_to/tls.cert"
lnd-macaroon-path = "/path_to/invoices.macaroon"

<1>: Check this out. If you do not specify a path here, then the webserver doesn't load the default front page.

Here is my lnd.conf with most important config lines for Tor:

# Your router must support and enable UPnP, otherwise delete this line  
listen=localhost
nat=false
rpclisten=0.0.0.0:10009
restlisten=0.0.0.0:8080

tlsextraip=<node_ip>
tlsextradomain=abc...xyz.onion

[Tor]
tor.active=true
tor.v3=true
tor.streamisolation=true
tor.socks=9050

Garbage issue: I also noticed that whenever you run the server it creates a new directory with a pattern such as 'data-dir-??????', where '?' marks are random numbers. I think this is because of the Tor support and, perhaps, it is a good idea to have a config option to delete this after turning off the webserver.

I hope it helps. Please, let me know if you need anything else.

By the way, is it possible for me to open a branch from your master so you can evaluate what I have done? How can I do that?

@bumi
Copy link
Owner Author

bumi commented Sep 3, 2021

thanks a lot for testing and your feedback! this for sure is helpful for others trying to also use tor.

I create an issue for the tor datadir #12

you can fork this repository (here on github) and then your changes can be followed when you push to your GH repo and you can make a pull request

@bumi bumi merged commit 6569ac0 into master Sep 7, 2021
@bumi bumi deleted the tor-support branch September 7, 2021 23:57
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.

2 participants