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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user