ipn/localapi: introduce get/set config for serve (#6243)

Updates tailscale/corp#7515

Signed-off-by: Shayne Sweeney <shayne@tailscale.com>
This commit is contained in:
shayne
2022-11-10 22:58:40 -05:00
committed by GitHub
parent 7b5866ac0a
commit e3a66e4d2f
7 changed files with 112 additions and 10 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ func ServeConfigKey(profileID string) StateKey {
type ServeConfig struct {
// TCP are the list of TCP port numbers that tailscaled should handle for
// the Tailscale IP addresses. (not subnet routers, etc)
TCP map[int]*TCPPortHandler `json:",omitempty"`
TCP map[uint16]*TCPPortHandler `json:",omitempty"`
// Web maps from "$SNI_NAME:$PORT" to a set of HTTP handlers
// keyed by mount point ("/", "/foo", etc)
@@ -84,7 +84,7 @@ type ServeConfig struct {
// AllowIngress is the set of SNI:port values for which ingress
// traffic is allowed, from trusted ingress peers.
AllowIngress map[HostPort]bool
AllowIngress map[HostPort]bool `json:",omitempty"`
}
// HostPort is an SNI name and port number, joined by a colon.