ipn: add auth key
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>reviewable/pr277/r1
parent
3f087466f5
commit
1747d099e9
|
@ -90,6 +90,9 @@ type Options struct {
|
||||||
// - StateKey!="" && Prefs!=nil: like the previous case, but do
|
// - StateKey!="" && Prefs!=nil: like the previous case, but do
|
||||||
// an initial overwrite of backend state with Prefs.
|
// an initial overwrite of backend state with Prefs.
|
||||||
StateKey StateKey
|
StateKey StateKey
|
||||||
|
// AuthKey is an optional node auth key used to authorize a
|
||||||
|
// new node key without user interaction.
|
||||||
|
AuthKey string
|
||||||
Prefs *Prefs
|
Prefs *Prefs
|
||||||
// LegacyConfigPath optionally specifies the old-style relaynode
|
// LegacyConfigPath optionally specifies the old-style relaynode
|
||||||
// relay.conf location. If both LegacyConfigPath and StateKey are
|
// relay.conf location. If both LegacyConfigPath and StateKey are
|
||||||
|
|
|
@ -220,6 +220,7 @@ func (b *LocalBackend) Start(opts Options) error {
|
||||||
Logf: logger.WithPrefix(b.logf, "control: "),
|
Logf: logger.WithPrefix(b.logf, "control: "),
|
||||||
Persist: *persist,
|
Persist: *persist,
|
||||||
ServerURL: b.serverURL,
|
ServerURL: b.serverURL,
|
||||||
|
AuthKey: opts.AuthKey,
|
||||||
Hostinfo: hi,
|
Hostinfo: hi,
|
||||||
KeepAlive: true,
|
KeepAlive: true,
|
||||||
NewDecompressor: b.newDecompressor,
|
NewDecompressor: b.newDecompressor,
|
||||||
|
|
Loading…
Reference in New Issue