mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-05 20:26:47 +02:00
ipn: add peer relay set flags to ConfigVAlpha config format
Updates #17791 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
parent
9c3a2aa797
commit
d97b9e4796
11
ipn/conf.go
11
ipn/conf.go
@ -50,6 +50,9 @@ type ConfigVAlpha struct {
|
||||
// should advertise amongst its wireguard endpoints.
|
||||
StaticEndpoints []netip.AddrPort `json:",omitempty"`
|
||||
|
||||
RelayServerPort *int `json:",omitzero"` // --relay-server-port
|
||||
RelayServerStaticEndpoints []netip.AddrPort `json:",omitempty"` // --relay-server-static-endpoints
|
||||
|
||||
// TODO(bradfitz,maisem): future something like:
|
||||
// Profile map[string]*Config // keyed by alice@gmail.com, corp.com (TailnetSID)
|
||||
}
|
||||
@ -155,5 +158,13 @@ func (c *ConfigVAlpha) ToPrefs() (MaskedPrefs, error) {
|
||||
if c.AdvertiseServices != nil {
|
||||
mp.AdvertiseServices = c.AdvertiseServices
|
||||
}
|
||||
if mp.RelayServerPort != nil {
|
||||
mp.RelayServerPort = c.RelayServerPort
|
||||
mp.RelayServerPortSet = true
|
||||
}
|
||||
if mp.RelayServerStaticEndpoints != nil {
|
||||
mp.RelayServerStaticEndpoints = c.RelayServerStaticEndpoints
|
||||
mp.RelayServerStaticEndpointsSet = true
|
||||
}
|
||||
return mp, nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user