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

View File

@@ -65,7 +65,7 @@ func (src *ServeConfig) Clone() *ServeConfig {
dst := new(ServeConfig)
*dst = *src
if dst.TCP != nil {
dst.TCP = map[int]*TCPPortHandler{}
dst.TCP = map[uint16]*TCPPortHandler{}
for k, v := range src.TCP {
dst.TCP[k] = v.Clone()
}
@@ -87,7 +87,7 @@ func (src *ServeConfig) Clone() *ServeConfig {
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _ServeConfigCloneNeedsRegeneration = ServeConfig(struct {
TCP map[int]*TCPPortHandler
TCP map[uint16]*TCPPortHandler
Web map[HostPort]*WebServerConfig
AllowIngress map[HostPort]bool
}{})