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/util
Nick Khyl 892f8a9582 various: allow tailscaled shutdown via LocalAPI
A customer wants to allow their employees to restart tailscaled at will, when access rights and MDM policy allow it,
as a way to fully reset client state and re-create the tunnel in case of connectivity issues.

On Windows, the main tailscaled process runs as a child of a service process. The service restarts the child
when it exits (or crashes) until the service itself is stopped. Regular (non-admin) users can't stop the service,
and allowing them to do so isn't ideal, especially in managed or multi-user environments.

In this PR, we add a LocalAPI endpoint that instructs ipnserver.Server, and by extension the tailscaled process,
to shut down. The service then restarts the child tailscaled. Shutting down tailscaled requires LocalAPI write access
and an enabled policy setting.

Updates tailscale/corp#32674
Updates tailscale/corp#32675

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2 months ago
..
cache util/cache: fix missing interface methods (#11275) 2 years ago
cibuild all: update copyright and license headers 3 years ago
clientmetric util/clientmetric: use counter in aggcounter 10 months ago
cloudenv all: use math/rand/v2 more 2 years ago
cmpver util/cmpver: add Less/LessEq helper funcs 2 years ago
codegen cmd/viewer, types/views: implement support for json/v2 (#16852) 4 months ago
cstruct all: use Go 1.21's binary.NativeEndian 11 months ago
ctxkey all: use reflect.TypeFor now available in Go 1.22 (#11078) 2 years ago
deephash util/deephash: move tests that depend on other tailscale packages to deephash_test 7 months ago
dirwalk all: use tstest.Replace more 3 years ago
dnsname tailcfg: adjust ServiceName.Validate to use vizerror 10 months ago
eventbus util/eventbus: flesh out docs a bit 2 months ago
execqueue control/controlclient,util/execqueue: extract execqueue into a package 2 years ago
expvarx util/expvarx: deflake TestSafeFuncHappyPath with synctest 3 months ago
goroutines ipn/ipnlocal, util/goroutines: track goroutines for tests, shutdown 11 months ago
groupmember util/groupmember: fail earlier if group doesn't exist, use slices.Contains 2 years ago
hashx all: use Go 1.22 range-over-int 2 years ago
httphdr util/httphdr: add new package for parsing HTTP headers (#9797) 2 years ago
httpm util/httpm: don't run test if .git doesn't exist 2 years ago
limiter all: add test for package comments, fix, add comments as needed 1 year ago
lineiter types/result, util/lineiter: add package for a result type, use it 1 year ago
lineread all: update copyright and license headers 3 years ago
linuxfw all: detect JetKVM and specialize a handful of things for it 5 months ago
lru util/slicesx: add MapKeys and MapValues from golang.org/x/exp/maps 11 months ago
mak util/mak: delete long-deprecated, unused, pre-generics NonNil func 7 months ago
multierr all: use Go 1.22 range-over-int 2 years ago
must util/must: add Get2 for functions that return two values 6 months ago
nocasemaps all: use Go 1.22 range-over-int 2 years ago
osdiag all: add test for package comments, fix, add comments as needed 1 year ago
osshare all: add test for package comments, fix, add comments as needed 1 year ago
osuser ssh/tailssh: add Plan 9 support for Tailscale SSH 8 months ago
pidowner types/result, util/lineiter: add package for a result type, use it 1 year ago
pool util/pool: add package for storing and using a pool of items 2 years ago
precompress all: update copyright and license headers 3 years ago
progresstracking ipn/localapi: add support for multipart POST to file-put 2 years ago
prompt util/prompt: make yes/no prompt reusable 5 months ago
quarantine all: update copyright and license headers 3 years ago
race all: use Go 1.22 range-over-int 2 years ago
racebuild all: update copyright and license headers 3 years ago
rands wgengine/magicsock: use math/rands/v2 2 years ago
reload all: use math/rand/v2 more 2 years ago
ringlog util/ringbuffer: rename to ringlog 3 months ago
set util/set: add more functionality to IntSet (#16640) 4 months ago
singleflight util/singleflight: add DoChanContext 2 years ago
slicesx util/slicesx: add AppendNonzero 11 months ago
stringsx util/stringsx: add package for extra string functions, like CompareFold 12 months ago
syspolicy various: allow tailscaled shutdown via LocalAPI 2 months ago
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 3 years ago
systemd util/systemd: don't link systemd-notification package on Android 7 months ago
testenv nettest, *: add option to run HTTP tests with in-memory network 8 months ago
topk all: use Go 1.22 range-over-int 2 years ago
truncate util/truncate: support []byte as well (#11614) 2 years ago
usermetric wgengine/filter: add check for unknown proto 10 months ago
vizerror util/vizerror: add WrapWithMessage 1 year ago
winutil cmd/tailscaled,util/syspolicy/source,util/winutil/gp: disallow acquiring the GP lock during service startup 10 months ago
zstdframe all: use Go 1.22 range-over-int 2 years ago