summaryrefslogtreecommitdiffhomepage
path: root/ipn/serve.go
diff options
context:
space:
mode:
authorMarwan Sulaiman <marwan@tailscale.com>2023-09-05 13:51:52 -0400
committerMarwan Sulaiman <marwan@tailscale.com>2023-09-05 13:51:52 -0400
commitce16658ac0e032e9524bac8f5fc926b11f82a7a7 (patch)
tree7ccf2dd7c97b1d5996c4ca709818edc529b34f81 /ipn/serve.go
parenta4aa6507fa3afa586dc3cbbf85f2cae852622b9e (diff)
downloadtailscale-marwan/postmem.tar.xz
tailscale-marwan/postmem.zip
ipn, ipn/ipnlocal: add Foreground field for ServeConfigmarwan/postmem
This PR adds a new field to the serve config that can be used to identify which serves are in "foreground mode" and then can also be used to ensure they do not get persisted to disk so that if Tailscaled gets ungracefully shutdown, the reloaded ServeConfig will not have those ports opened. Updates #8489 Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
Diffstat (limited to 'ipn/serve.go')
-rw-r--r--ipn/serve.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipn/serve.go b/ipn/serve.go
index 11df99726..a3c708ed9 100644
--- a/ipn/serve.go
+++ b/ipn/serve.go
@@ -37,6 +37,11 @@ type ServeConfig struct {
// AllowFunnel is the set of SNI:port values for which funnel
// traffic is allowed, from trusted ingress peers.
AllowFunnel map[HostPort]bool `json:",omitempty"`
+
+ // Foreground is a map of an IPN Bus session id to a
+ // foreground serve config. Note that only TCP and Web
+ // are used inside the Foreground map.
+ Foreground map[string]*ServeConfig `json:",omitempty"`
}
// HostPort is an SNI name and port number, joined by a colon.