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/cmd/tailscaled
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>
10 months ago
..
childproc
debug.go net/netmon, add: add netmon.State type alias of interfaces.State 2 years ago
depaware.txt cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 10 months ago
deps_test.go ssh,tempfork/gliderlabs/ssh: replace github.com/tailscale/golang-x-crypto/ssh with golang.org/x/crypto/ssh 12 months ago
generate.go
install_darwin.go
install_windows.go
manifest_windows_386.syso
manifest_windows_amd64.syso
manifest_windows_arm64.syso
proxy.go
required_version.go all: switch to and require Go 1.23 1 year ago
sigpipe.go
ssh.go ssh/tailssh: add Plan 9 support for Tailscale SSH 10 months ago
taildrop.go
tailscaled.defaults
tailscaled.go ssh/tailssh: add Plan 9 support for Tailscale SSH 10 months ago
tailscaled.openrc
tailscaled.service cmd/tailscaled: move cleanup to an implicit action during startup 2 years ago
tailscaled_bird.go
tailscaled_notwindows.go
tailscaled_test.go control/controlclient,tempfork/httprec: don't link httptest, test certs for c2n 1 year ago
tailscaled_windows.go cmd/tailscaled,ipn/{auditlog,desktop,ipnext,ipnlocal},tsd: extract LocalBackend extension interfaces and implementation 10 months ago
windows-manifest.xml
with_cli.go