lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.71k stars 2.09k forks source link

Proposal: support generic proxies next to Tor #6845

Open dsbaars opened 2 years ago

dsbaars commented 2 years ago

Currently, LND allows for Tor connectivity by connecting to the Tor socks proxy and/or Control port. No other proxies are currently supported, but this would be beneficial to users since it could provide a way to allow for clearnet, i2p and other connectivity like cjdns.

Implementation idea

I have never written in go myself before, but it looks like the code from the tor package can be used as a basis for SOCKS5 proxies. It think it is good to start refactoring to a generic proxy package and let the tor package build upon that (which is already suggested in the comments in the source files).

Considerations

nullcount commented 2 years ago

This is incredibly important IMO. I'm hearing from many node operators who are choosing to abandon Tor-only in favor of a clearnet IPv4 or VPN due to negative effects of Tor network congestion affecting their ability to route payments. At a time when online privacy is under attack, any effort to decrease reliance on Tor should be a priority.

fvdpol commented 2 years ago

Great proposal/feature request. Looks like PR #5651 is trying to achieve very similar objectives.

guggero commented 2 years ago

While I think adding other proxy/connection types is a good idea in general, just adding generic support for proxies in lnd doesn't mean they can be used for p2p connections (at least not end to end) automatically. For the wider network to understand I2P for example, the spec also needs to be adjusted.

kroese commented 1 year ago

Duplicate of https://github.com/lightningnetwork/lnd/issues/6595