mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 00:51:07 +00:00
ipn, ipn/ipnlocal: add Foreground field to ServeConfig
This PR adds a new field to the ServeConfig which maps WatchIPNBus session ids to foreground serve configs. The PR also adds a DeleteForegroundSession method to ensure the config gets cleaned up on sessions ending. Note this field is not currently used but will be in follow up work. Updates #8489 Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
This commit is contained in:

committed by
Marwan Sulaiman

parent
cb3b281e98
commit
45eeef244e
@@ -37,6 +37,14 @@ 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.
|
||||
//
|
||||
// TODO(marwan-at-work): this is not currently
|
||||
// used. Remove the TODO in the follow up PR.
|
||||
Foreground map[string]*ServeConfig `json:",omitempty"`
|
||||
}
|
||||
|
||||
// HostPort is an SNI name and port number, joined by a colon.
|
||||
|
Reference in New Issue
Block a user