1
1
mirror of https://github.com/bumi/lntip synced 2026-02-17 14:37:50 +00:00

Make Tor executable configurable

It seems the `tor` executable is not in the $PATH on heroku and thus needs to be configurable.
This commit is contained in:
2021-10-28 15:11:10 +02:00
parent 36d4dec5fd
commit 324d5b3b43
3 changed files with 8 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ type LNDoptions struct {
CertHex string
MacaroonFile string
MacaroonHex string
TorExePath string // used when connecting through tor to LND
}
type LNDclient struct {
@@ -138,7 +139,7 @@ func NewLNDclient(lndOptions LNDoptions) (LNDclient, error) {
if strings.Contains(lndOptions.Address, ".onion") {
// Start Tor
t, err := tor.Start(nil, nil)
t, err := tor.Start(nil, &tor.StartConf{ExePath: lndOptions.TorExePath})
if err != nil {
return result, err
}