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
James Tucker a96ef432cf control/controlclient,ipn/ipnlocal: replace State enum with boolean flags
Remove the State enum (StateNew, StateNotAuthenticated, etc.) from
controlclient and replace it with two explicit boolean fields:
- LoginFinished: indicates successful authentication
- Synced: indicates we've received at least one netmap

This makes the state more composable and easier to reason about, as
multiple conditions can be true independently rather than being
encoded in a single enum value.

The State enum was originally intended as the state machine for the
whole client, but that abstraction moved to ipn.Backend long ago.
This change continues moving away from the legacy state machine by
representing state as a combination of independent facts.

Also adds test helpers in ipnlocal that check independent, observable
facts (hasValidNetMap, needsLogin, etc.) rather than relying on
derived state enums, making tests more robust.

Updates #12639

Signed-off-by: James Tucker <james@tailscale.com>
3 weeks ago
..
auditlog ipn/ipnext: remove some interface indirection to add hooks 7 months ago
conffile cmd/tailscale/cli,ipn/conffile: add declarative config mode for Services (#17435) 2 months ago
desktop util/syspolicy: finish plumbing policyclient, add feature/syspolicy, move global impl 3 months ago
ipnauth all: use buildfeature constants in a few more places 2 months ago
ipnext ipn/ipnlocal: remove all the weird locking (LockedOnEntry, UnlockEarly, etc) 3 weeks ago
ipnlocal control/controlclient,ipn/ipnlocal: replace State enum with boolean flags 3 weeks ago
ipnserver feature/featuretags, all: add build features, use existing ones in more places 2 months ago
ipnstate cmd/tailscale, ipn/ipnstate, wgengine/magicsock: update ping output for peer relay (#16515) 5 months ago
lapitest various: allow tailscaled shutdown via LocalAPI 2 months ago
localapi ipn/localapi: use constant-time comparison for RequiredPassword (#17906) 3 weeks ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store ipn/store, feature/condregister: permit callers to empty import optonal ipn stores 2 months ago
backend.go ipn: fix the string representation of an empty ipn.Notify 3 months ago
backend_test.go ipn: fix the string representation of an empty ipn.Notify 3 months ago
conf.go ipn: ensure that conffile is source of truth for advertised services. (#15361) 9 months ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 10 months ago
ipn_clone.go ipn: add support for HTTP Redirects (#17594) 1 month ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go ipn: add support for HTTP Redirects (#17594) 1 month ago
prefs.go types/persist: add AttestationKey (#17281) 2 months ago
prefs_test.go Revert "control/controlclient: back out HW key attestation (#17664)" (#17732) 1 month ago
serve.go ipn: add support for HTTP Redirects (#17594) 1 month ago
serve_test.go cmd/tailscale/cli: Add service flag to serve command (#16191) 5 months ago
store.go tailcfg: report StateEncrypted in Hostinfo (#16434) 5 months ago
store_test.go ipn/store: automatically migrate between plaintext and encrypted state (#16318) 5 months ago