bumi / lnme

Your friendly Bitcoin Lightning ⚡ payment page ⚡
MIT License
165 stars 31 forks source link

Add support to connect to TOR nodes #10

Closed bumi closed 3 years ago

bumi commented 3 years ago

This requires tor to be installed/running on the system

bumi commented 3 years ago

@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 commented 3 years ago
Hi!

Yes, I can test the new TOR code. I will let you know as soon as I finish it.

De: Michael Bumann @.> Enviado: sexta-feira, 27 de agosto de 2021 14:17 Para: bumi/lnme @.> Cc: aplnx @.>; Mention @.> Assunto: Re: [bumi/lnme] Add support to connect to TOR nodes (#10)

@aplnxhttps://github.com/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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bumi/lnme/pull/10#issuecomment-907353245, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALUK7BYK2WOKFE45BMUFDFDT67CDNANCNFSM5C5OXP3Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

aplnx commented 3 years ago

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 commented 3 years ago

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
aplnx commented 3 years ago

@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= 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 commented 3 years ago

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