server+tor: add support for Tor HASHEDPASSWORD authentication method

This provides users an alternative over the SAFECOOKIE authentication
method, which may not be as useful if users are connecting to a remote
Tor sevrer due to lnd not being able to retrieve the cookie file.
This commit is contained in:
Tomas Carnecky authored and Wilmer Paulino committed 2020-03-10 10:32:44 -07:00
1 parent 42e65d4ae5
commit 018e8b5b97
5 files changed
+147 -84

No files matched your search

+4 -1
View File
@@ -586,7 +586,10 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
// automatically create an onion service, we'll initiate our Tor
// controller and establish a connection to the Tor server.
if cfg.Tor.Active && (cfg.Tor.V2 || cfg.Tor.V3) {
s.torController = tor.NewController(cfg.Tor.Control, cfg.Tor.TargetIPAddress)
s.torController = tor.NewController(
cfg.Tor.Control, cfg.Tor.TargetIPAddress,
cfg.Tor.Password,
)
}
chanGraph := chanDB.ChannelGraph()