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 4941cd7c73 cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation
In this PR, we refactor the LocalBackend extension system, moving from direct callbacks to a more organized extension host model.

Specifically, we:
- Extract interface and callback types used by packages extending LocalBackend functionality into a new ipn/ipnext package.
- Define ipnext.Host as a new interface that bridges extensions with LocalBackend.
  It enables extensions to register callbacks and interact with LocalBackend in a concurrency-safe, well-defined, and controlled way.
- Move existing callback registration and invocation code from ipnlocal.LocalBackend into a new type called ipnlocal.ExtensionHost,
  implementing ipnext.Host.
- Improve docs for existing types and methods while adding docs for the new interfaces.
- Add test coverage for both the extracted and the new code.
- Remove ipn/desktop.SessionManager from tsd.System since ipn/desktop is now self-contained.
- Update existing extensions (e.g., ipn/auditlog and ipn/desktop) to use the new interfaces where appropriate.

We're not introducing new callback and hook types (e.g., for ipn.Prefs changes) just yet, nor are we enhancing current callbacks,
such as by improving conflict resolution when more than one extension tries to influence profile selection via a background profile resolver.
These further improvements will be submitted separately.

Updates #12614
Updates tailscale/corp#27645
Updates tailscale/corp#26435
Updates tailscale/corp#18342

Signed-off-by: Nick Khyl <nickk@tailscale.com>
9 months ago
..
auditlog cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 9 months ago
conffile ipn/conffile: don't depend on hujson on iOS/Android 1 year ago
desktop cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 9 months ago
ipnauth control/controlclient, ipn: add client audit logging (#14950) 10 months ago
ipnext cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 9 months ago
ipnlocal cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 9 months ago
ipnserver ipn/ipnserver: treat all plan9 safesocket connections as permitted 10 months ago
ipnstate Revert "ipn/ipnstate: add home DERP to tailscale status JSON" 9 months ago
localapi ipn/{ipnserver,localapi},tsnet: use ipnauth.Self as the actor in tsnet localapi handlers 11 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store ipn/store/kubestore: skip cache for the write replica in cert share mode (#15417) 10 months ago
backend.go ipn: declare NotifyWatchOpt consts without using iota 1 year ago
conf.go ipn: ensure that conffile is source of truth for advertised services. (#15361) 10 months ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 12 months ago
ipn_clone.go cmd/tailscale,ipn: add relay-server-port "tailscale set" flag and Prefs field (#15594) 9 months ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go cmd/tailscale,ipn: add relay-server-port "tailscale set" flag and Prefs field (#15594) 9 months ago
prefs.go ipn, ipn/ipnlocal: reduce coupling between LocalBackend/profileManager and the Windows-specific "current user" model 9 months ago
prefs_test.go cmd/tailscale,ipn: add relay-server-port "tailscale set" flag and Prefs field (#15594) 9 months ago
serve.go tailcfg: add ServiceName 12 months 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 2 years ago