cmd/tailscaled,*: add start of configuration file support

Updates #1412

Co-authored-by: Maisem Ali <maisem@tailscale.com>
Change-Id: I38d559c1784d09fc804f521986c9b4b548718f7d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-10-11 13:55:57 -07:00
committed by Brad Fitzpatrick
parent 71271e41d6
commit 18bd98d35b
16 changed files with 323 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import (
"tailscale.com/control/controlknobs"
"tailscale.com/ipn"
"tailscale.com/ipn/conffile"
"tailscale.com/net/dns"
"tailscale.com/net/netmon"
"tailscale.com/net/tsdial"
@@ -47,6 +48,12 @@ type System struct {
StateStore SubSystem[ipn.StateStore]
Netstack SubSystem[NetstackImpl] // actually a *netstack.Impl
// InitialConfig is initial server config, if any.
// It is nil if the node is not in declarative mode.
// This value is never updated after startup.
// LocalBackend tracks the current config after any reloads.
InitialConfig *conffile.Config
// onlyNetstack is whether the Tun value is a fake TUN device
// and we're using netstack for everything.
onlyNetstack bool