multi: Added Tor support
This commit adds Tor support. Users can set the --TorSocks flag to specify which port Tor's SOCKS5 proxy is listening on so that lnd can connect to it. When this flag is set, ALL traffic gets routed over Tor including DNS traffic. Special functions for DNS lookups were added, and since Tor doesn't natively support SRV requests, the proxySRV function routes connects us to a DNS server via Tor and SRV requests can be issued directly to the DNS server. Co-authored-by: MeshCollider <dobsonsa68@gmail.com>
This commit is contained in:
1 parent
18741831dd
commit
e2142c778f
8 files changed
+314
-27
No files matched your search
+2
-1
@@ -589,7 +589,8 @@ func (r *rpcServer) ConnectPeer(ctx context.Context,
|
||||
addr = in.Addr.Host
|
||||
}
|
||||
|
||||
host, err := net.ResolveTCPAddr("tcp", addr)
|
||||
// We use lndResolveTCP here in case we wish to resolve hosts over Tor.
|
||||
host, err := lndResolveTCP("tcp", addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user