Skip to content

Commit

Permalink
Add -publickey command line switch (#1096)
Browse files Browse the repository at this point in the history
Co-authored-by: Neil Alexander <[email protected]>
  • Loading branch information
neilalexander and neilalexander authored Nov 4, 2023
1 parent 0346af4 commit 49c424e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/yggdrasil/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ func main() {
autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)")
ver := flag.Bool("version", false, "prints the version of this build")
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")
getsnet := flag.Bool("subnet", false, "returns the IPv6 subnet 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, "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")
flag.Parse()

Expand Down Expand Up @@ -155,6 +156,10 @@ func main() {
fmt.Println(ipnet.String())
return

case *getpkey:
fmt.Println(hex.EncodeToString(publicKey))
return

case *normaliseconf:
cfg.AdminListen = ""
var bs []byte
Expand Down

0 comments on commit 49c424e

Please sign in to comment.