From f8b72d2b5b22f1a8d780ad133ab9a4f93230c50f Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 9 Apr 2020 17:16:57 +1000 Subject: [PATCH] cmd/tailscale: add up --authkey flag Signed-off-by: David Crawshaw --- cmd/tailscale/tailscale.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tailscale/tailscale.go b/cmd/tailscale/tailscale.go index 57f7cbdf7..f17798bd0 100644 --- a/cmd/tailscale/tailscale.go +++ b/cmd/tailscale/tailscale.go @@ -51,6 +51,7 @@ func main() { upf.BoolVar(&upArgs.noSingleRoutes, "no-single-routes", false, "don't install routes to single nodes") upf.BoolVar(&upArgs.noPacketFilter, "no-packet-filter", false, "disable packet filter") upf.StringVar(&upArgs.advertiseRoutes, "advertise-routes", "", "routes to advertise to other nodes (comma-separated, e.g. 10.0.0.0/8,192.168.0.0/24)") + upf.StringVar(&upArgs.authKey, "authkey", "", "node authorization key") upCmd := &ffcli.Command{ Name: "up", ShortUsage: "up [flags]", @@ -100,6 +101,7 @@ var upArgs struct { noSingleRoutes bool noPacketFilter bool advertiseRoutes string + authKey string } func runUp(ctx context.Context, args []string) error { @@ -135,6 +137,7 @@ func runUp(ctx context.Context, args []string) error { bc.SetPrefs(prefs) opts := ipn.Options{ StateKey: globalStateKey, + AuthKey: upArgs.authKey, Notify: func(n ipn.Notify) { if n.ErrMessage != nil { log.Fatalf("backend error: %v\n", *n.ErrMessage)