Lnd: [Tor] Need a way for "tor.active=1" to not route clearnet traffic through Tor

Created on 21 May 2019  路  4Comments  路  Source: lightningnetwork/lnd

I want to expose LND as a Tor service and to connect to remote Tor nodes. (inbound and outgoing connection)

I do not care about Tor privacy features, and I do not care about leaks. (See the rational)

The problem is: tor.active=1 will route all lightning traffic through Tor, and this will make clearnet traffic more unreliable.

There should have an option to route through Tor only Tor connections, leaving clearnet connection as is.

feature request networking tor

Most helpful comment

@Roasbeef consider for reopening, this is not a duplicate.
The problem is that if tor.active=1 all outgoing traffic pass through the SOCKS proxy. (even clearnet)

I did a quick poll for turning Tor by default on BTCPay installs. The only reason some people oppose it is because of this. It impacts the stability of the connections on clearnet.

This is not about connecting to different interface with a peer than the original one.

All 4 comments

Duplicate of #2387.

@Roasbeef consider for reopening, this is not a duplicate.
The problem is that if tor.active=1 all outgoing traffic pass through the SOCKS proxy. (even clearnet)

I did a quick poll for turning Tor by default on BTCPay installs. The only reason some people oppose it is because of this. It impacts the stability of the connections on clearnet.

This is not about connecting to different interface with a peer than the original one.

who nees this feature could achieve a part of that with the current version of lnd.
it is possible to receive incoming connections over Tor without enabling Tor in the lnd settings.
this is useful to get Tor inbound connections witout expose the IP address.

in order to achieve this you must configure a Tor hidden service in the torrc file
for example

HiddenServiceDir /var/lib/tor/lnd/
HiddenServicePort 9735 127.0.0.1:9735

in order to advertise the hidden service address put it in the externalip value of lnd settings.
in my example you can find the onion address in the file /var/lib/tor/lnd/hostname

Our current config is:

tor.active=1
tor.socks=tor:9050

    listen=0.0.0.0:9735
externalip=mainnet.demo.btcpayserver.org:9735
alias=mainnet.demo.btcpayserver.org

            bitcoin.active=1
            bitcoin.mainnet=1

externalip=dppqg535s5shy5sjnsmzzrk3cdyshwau5vierujpybybboxxxglfx7id.onion:9735
noseedbackup=1

I don't know if all traffic is routed via Tor or not, but that's what we use.

We want to use

tor.active=1
tor.socks=tor:9050

Because we want to give our users the ability to make channel with other tor hidden services.
We don't want that all LND traffic to use Tor though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joostjager picture joostjager  路  3Comments

danielemiliogarcia picture danielemiliogarcia  路  3Comments

Roasbeef picture Roasbeef  路  3Comments

sunnya97 picture sunnya97  路  3Comments

alec-djinn picture alec-djinn  路  3Comments