diff --git a/ipn/backend.go b/ipn/backend.go index f47477207..00ef9e306 100644 --- a/ipn/backend.go +++ b/ipn/backend.go @@ -90,7 +90,10 @@ type Options struct { // - StateKey!="" && Prefs!=nil: like the previous case, but do // an initial overwrite of backend state with Prefs. StateKey StateKey - Prefs *Prefs + // AuthKey is an optional node auth key used to authorize a + // new node key without user interaction. + AuthKey string + Prefs *Prefs // LegacyConfigPath optionally specifies the old-style relaynode // relay.conf location. If both LegacyConfigPath and StateKey are // specified and the requested state doesn't exist in the backend diff --git a/ipn/local.go b/ipn/local.go index d20d771c9..1168505f7 100644 --- a/ipn/local.go +++ b/ipn/local.go @@ -220,6 +220,7 @@ func (b *LocalBackend) Start(opts Options) error { Logf: logger.WithPrefix(b.logf, "control: "), Persist: *persist, ServerURL: b.serverURL, + AuthKey: opts.AuthKey, Hostinfo: hi, KeepAlive: true, NewDecompressor: b.newDecompressor,