tailscale/cmd/tailscaled
Brad Fitzpatrick f5eac39ea7 feature/acme, ipn/ipnlocal: start moving ACME/cert state into an extension
The ACME serialization mutex (acmeMu) was a package-level global, and
several ACME-related fields lived on LocalBackend even though the
cert code is conditional and not linked into every binary. With
multiple tsnet.Servers in one process (each its own LocalBackend),
a process-wide acmeMu also serialized unrelated backends.

Introduce a new feature/acme extension that owns the per-LocalBackend
ACME/cert state in an ipnlocal.CertState value:

  - acmeMu, renewMu, renewCertAt (previously package globals)
  - pendingACMETLSALPNCerts, pendingCertDomains{,Mu},
    getCertForTest, certRefreshCancel (previously LocalBackend
    fields, only meaningful when ACME was compiled in)

ipnlocal/cert.go now reaches the state through b.certState(), which
is routed by a feature.Hook installed at init by feature/acme. The
CertState type lives in ipnlocal so cert.go can access its fields
directly without a method explosion; the extension in feature/acme
constructs and owns it.

This is a baby step. The end goal is for the entire cert/ACME code
to live in feature/acme, with ipnlocal only retaining whatever thin
hooks the rest of LocalBackend needs to call into it. The current
split (CertState and most of cert.go in ipnlocal, extension wrapper
in feature/acme) is a deliberately temporary middle ground that
keeps this PR small while making the next moves mechanical.

The package is named feature/acme to match the existing HasACME /
ts_omit_acme naming. condregister/maybe_acme.go wires it in for
non-js builds.

Updates #12614
Updates #20248
Updates #20249

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I520909f24ad11a9622ef33c2290fe36ad44d6f71
2026-06-26 09:48:24 -07:00
..
childproc all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tailscaledhooks all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
debug_forcereflect.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
debug.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
depaware-min.txt net/tsdial, ipn/ipnlocal: stop using netmap.NetworkMap in Dialer 2026-06-24 13:14:45 -07:00
depaware-minbox.txt net/tsdial, ipn/ipnlocal: stop using netmap.NetworkMap in Dialer 2026-06-24 13:14:45 -07:00
depaware.txt feature/acme, ipn/ipnlocal: start moving ACME/cert state into an extension 2026-06-26 09:48:24 -07:00
deps_test.go feature/routecheck: add ts_omit_routecheck feature flag (#19638) 2026-05-15 15:50:50 -07:00
flag.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
generate.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
install_darwin.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
install_windows.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
manifest_windows_386.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 2022-11-21 18:15:51 -05:00
manifest_windows_amd64.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 2022-11-21 18:15:51 -05:00
manifest_windows_arm64.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 2022-11-21 18:15:51 -05:00
netstack.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
proxy.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
required_version.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
sigpipe.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ssh.go ipn/ipnlocal, feature/ssh: move SSH code out of LocalBackend to feature 2026-03-10 17:27:17 -07:00
tailscale-online.target cmd/tailscaled/*.{target,unit}: add systemd online target 2026-02-26 18:39:28 -08:00
tailscale-wait-online.service cmd/tailscaled/*.{target,unit}: add systemd online target 2026-02-26 18:39:28 -08:00
tailscaled_bird.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tailscaled_drive.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tailscaled_notwindows.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tailscaled_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
tailscaled_windows.go ipn/desktop: move behind feature/condregister 2026-04-07 11:37:47 -07:00
tailscaled.defaults cmd/tailscaled: rename relaynode reference in defaults file comment 2020-03-13 14:38:04 -07:00
tailscaled.go logpolicy,tsnet: remove syspolicy dependency 2026-06-05 16:21:27 -05:00
tailscaled.openrc tstest/integration/vms: use an in-process logcatcher (#2360) 2021-07-08 14:39:45 -04:00
tailscaled.service cmd/tailscaled: update documentation url 2026-02-09 07:09:11 -05:00
webclient.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
windows-manifest.xml cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 2022-11-21 18:15:51 -05:00
with_cli.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00