Browse Source
feature: add -l flag to use localhost
make_cert_optional
Otto Suess
7 years ago
No known key found for this signature in database
GPG Key ID: 354749C62B4BAC41
3 changed files with
4 additions and
0 deletions
-
README.md
-
config.go
-
zapconnect.go
|
|
@ -21,6 +21,7 @@ zapconnect |
|
|
|
|
|
|
|
``` |
|
|
|
-i, --localip Use local ip instead of public ip. |
|
|
|
-l, --localhost Use 127.0.0.1 for ip. |
|
|
|
-j, --json Display json instead of a QRCode. |
|
|
|
--lnddir= The base directory that contains lnd's data, logs, configuration |
|
|
|
file, etc. |
|
|
|
|
|
@ -31,6 +31,7 @@ var ( |
|
|
|
// loading+parsing process.
|
|
|
|
type config struct { |
|
|
|
LocalIp bool `short:"i" long:"localip" description:"Include local ip in QRCode."` |
|
|
|
Localhost bool `short:"l" long:"localhost" description:"Use 127.0.0.1 for ip."` |
|
|
|
Json bool `short:"j" long:"json" description:"Generate json instead of a QRCode."` |
|
|
|
LndDir string `long:"lnddir" description:"The base directory that contains lnd's data, logs, configuration file, etc."` |
|
|
|
ConfigFile string `long:"C" long:"configfile" description:"Path to configuration file"` |
|
|
|
|
|
@ -82,6 +82,8 @@ func main() { |
|
|
|
ipString := "" |
|
|
|
if loadedConfig.LocalIp { |
|
|
|
ipString = getLocalIP() + ":10009" |
|
|
|
} else if loadedConfig.Localhost { |
|
|
|
ipString = "127.0.0.1:10009" |
|
|
|
} else { |
|
|
|
ipString = getPublicIP() + ":10009" |
|
|
|
} |
|
|
|