summaryrefslogtreecommitdiffhomepage
path: root/ipn
diff options
context:
space:
mode:
authorAdrian Dewhurst <adrian@tailscale.com>2024-09-27 10:08:44 -0400
committerAdrian Dewhurst <adrian@tailscale.com>2024-09-27 10:08:44 -0400
commit230c0eaee6c38cdc9c1c244dca9d819233b802fd (patch)
treeb80ccc91752744f7a61a3e02072ea5fdd50605a7 /ipn
parentaf5a845a8751e1a28496fb62b98fc855c4bfc858 (diff)
downloadtailscale-adrian/vip.tar.xz
tailscale-adrian/vip.zip
wip vipadrian/vip
Change-Id: Ibbd8f5f08d4614d9e92c245b8da25f3f6f19319e
Diffstat (limited to 'ipn')
-rw-r--r--ipn/serve.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/ipn/serve.go b/ipn/serve.go
index 5c0a97ed3..d7c43f193 100644
--- a/ipn/serve.go
+++ b/ipn/serve.go
@@ -24,9 +24,7 @@ func ServeConfigKey(profileID ProfileID) StateKey {
return StateKey("_serve/" + profileID)
}
-// ServeConfig is the JSON type stored in the StateStore for
-// StateKey "_serve/$PROFILE_ID" as returned by ServeConfigKey.
-type ServeConfig struct {
+type ListenerConfig struct {
// TCP are the list of TCP port numbers that tailscaled should handle for
// the Tailscale IP addresses. (not subnet routers, etc)
TCP map[uint16]*TCPPortHandler `json:",omitempty"`
@@ -34,6 +32,14 @@ type ServeConfig struct {
// Web maps from "$SNI_NAME:$PORT" to a set of HTTP handlers
// keyed by mount point ("/", "/foo", etc)
Web map[HostPort]*WebServerConfig `json:",omitempty"`
+}
+
+// ServeConfig is the JSON type stored in the StateStore for
+// StateKey "_serve/$PROFILE_ID" as returned by ServeConfigKey.
+type ServeConfig struct {
+ ListenerConfig // local config
+
+ Services map[string]ListenerConfig `json:",omitempty"` // VIP service config
// AllowFunnel is the set of SNI:port values for which funnel
// traffic is allowed, from trusted ingress peers.