You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn
Nick Khyl 7aef4fd44d ipn/ipn{local,server}: extract logic that determines the "best" Tailscale profile to use
In this PR, we further refactor LocalBackend and Unattended Mode to extract the logic that determines
which profile should be used at the time of the check, such as when a LocalAPI client connects or disconnects.
We then update (*LocalBackend).switchProfileLockedOnEntry to to switch to the profile returned by
(*LocalBackend).resolveBestProfileLocked() rather than to the caller-specified specified profile, and rename it
to switchToBestProfileLockedOnEntry.

This is done in preparation for updating (*LocalBackend).getBackgroundProfileIDLocked to support Always-On
mode by determining which profile to use based on which users, if any, are currently logged in and have an active
foreground desktop session.

Updates #14823
Updates tailscale/corp#26247

Signed-off-by: Nick Khyl <nickk@tailscale.com>
12 months ago
..
conffile ipn/conffile: don't depend on hujson on iOS/Android 1 year ago
desktop ipn/desktop: add a new package for managing desktop sessions on Windows 12 months ago
ipnauth ipn/ipnauth: implement WindowsActor 12 months ago
ipnlocal ipn/ipn{local,server}: extract logic that determines the "best" Tailscale profile to use 12 months ago
ipnserver ipn/ipn{local,server}: extract logic that determines the "best" Tailscale profile to use 12 months ago
ipnstate types/netmap,*: pass around UserProfiles as views (pointers) instead 12 months ago
localapi ipn/{ipnserver,localapi},tsnet: use ipnauth.Self as the actor in tsnet localapi handlers 12 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store kube/{kubeapi,kubeclient},ipn/store/kubestore,cmd/{containerboot,k8s-operator}: emit kube store Events (#14112) 1 year ago
backend.go ipn: declare NotifyWatchOpt consts without using iota 1 year ago
conf.go ipn/conf.go: add VIPServices to tailscaled configfile (#14345) 1 year ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 1 year ago
ipn_clone.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 1 year ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 1 year ago
prefs.go cmd/tailscale,ipn,tailcfg: add `tailscale advertise` subcommand behind envknob (#13734) 1 year ago
prefs_test.go types/persist: remove Persist.LegacyFrontendPrivateMachineKey 1 year ago
serve.go tailcfg: add ServiceName 1 year ago
serve_test.go ipn: [serve] warn that foreground funnel won't work if shields are up (#14685) 1 year ago
store.go ipn: add comment about thread-safety to StateStore 2 years ago
store_test.go ipn: avoid useless no-op WriteState calls 3 years ago