mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-09 23:20:26 +03:00
Add -publickey
command line switch (#1096)
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
0346af46da
commit
49c424ef21
@ -48,8 +48,9 @@ func main() {
|
|||||||
autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)")
|
autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)")
|
||||||
ver := flag.Bool("version", false, "prints the version of this build")
|
ver := flag.Bool("version", false, "prints the version of this build")
|
||||||
logto := flag.String("logto", "stdout", "file path to log to, \"syslog\" or \"stdout\"")
|
logto := flag.String("logto", "stdout", "file path to log to, \"syslog\" or \"stdout\"")
|
||||||
getaddr := flag.Bool("address", false, "returns the IPv6 address as derived from the supplied configuration")
|
getaddr := flag.Bool("address", false, "use in combination with either -useconf or -useconffile, outputs your IPv6 address")
|
||||||
getsnet := flag.Bool("subnet", false, "returns the IPv6 subnet as derived from the supplied configuration")
|
getsnet := flag.Bool("subnet", false, "use in combination with either -useconf or -useconffile, outputs your IPv6 subnet")
|
||||||
|
getpkey := flag.Bool("publickey", false, "use in combination with either -useconf or -useconffile, outputs your public key")
|
||||||
loglevel := flag.String("loglevel", "info", "loglevel to enable")
|
loglevel := flag.String("loglevel", "info", "loglevel to enable")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@ -155,6 +156,10 @@ func main() {
|
|||||||
fmt.Println(ipnet.String())
|
fmt.Println(ipnet.String())
|
||||||
return
|
return
|
||||||
|
|
||||||
|
case *getpkey:
|
||||||
|
fmt.Println(hex.EncodeToString(publicKey))
|
||||||
|
return
|
||||||
|
|
||||||
case *normaliseconf:
|
case *normaliseconf:
|
||||||
cfg.AdminListen = ""
|
cfg.AdminListen = ""
|
||||||
var bs []byte
|
var bs []byte
|
||||||
|
Loading…
Reference in New Issue
Block a user