Commit Graph
11764 Commits
Author SHA1 Message Date
chaosinthecrd 1af2fa9eeb cmd/k8s-operator: start ProxyGroup Pods in parallel
With a readiness probe and the default OrderedReady policy, one unready
ProxyGroup Pod stops the rest from starting, so ProxyGroup StatefulSets now
use Parallel. The policy can't change in place, so an existing StatefulSet is
deleted with its Pods orphaned and recreated, adopting them.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-19 13:17:44 +00:00
chaosinthecrd b76d891d98 cmd/k8s-operator,k8s-operator: test proxy liveness and readiness probes
Covers the ProxyClass probe defaults and overrides, the env cases that skip or
move the probes, probes on ProxyGroup proxies, and rejecting probes on the
init container or with an env that leaves the endpoints unreachable.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-19 13:17:44 +00:00
chaosinthecrd 6308edfdce cmd/k8s-operator,k8s-operator: run liveness and readiness probes on ProxyGroups
Proxies now serve /livez and /readyz, but nothing points Kubernetes probes at
them. This adds livenessProbe and readinessProbe fields to the ProxyClass
Tailscale container, each off unless set, with tunable timing (older proxy
images don't serve the endpoints, so a probe would fail against them), and
wires them into ProxyGroup proxies. A ProxyGroup is rejected if its ProxyClass
sets probes but its env would leave the endpoints unreachable, such as
TS_ENABLE_HEALTH_CHECK=false, TS_LOCAL_ADDR_PORT on loopback, or the
deprecated TS_HEALTHCHECK_ADDR_PORT. Probes follow a custom TS_LOCAL_ADDR_PORT
port, and liveness gets a 5s timeout by default, as a restart drops traffic
that a slow tailscaled still carries.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-19 13:17:44 +00:00
chaosinthecrd 6e8f0f40cc cmd/containerboot,kube/{certs,health}: test the /livez and /readyz checks
Covers the Probe handlers and conditions, AllCertsPresent with present,
missing, expired and unreadable certs, and the containerboot checks for
tailscaled failing or timing out, certs for advertised HTTPS-only Services and
a serve config file that doesn't exist.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-19 13:17:44 +00:00
chaosinthecrd b5fa6773ce cmd/containerboot,kube/{certs,health,localclient}: serve /livez and /readyz
Proxies only serve /healthz, which reports whether the node has a tailnet IP,
so it can't back a liveness or readiness probe. When TS_ENABLE_HEALTH_CHECK is
set, containerboot now also serves /livez, which fails only when tailscaled
stops answering LocalAPI, and /readyz, which passes once the node has tailnet
IPs and, with TS_SERVE_CONFIG set, has applied the serve config and has a cert
for each HTTPS-only Tailscale Service it advertises. Certs are checked through
the read-only cert-status endpoint so the probe never triggers issuance. An
expired or unreadable cert counts as present, as failing readiness on it would
stop a StatefulSet rollout before it reaches the replica that renews certs.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-19 13:17:44 +00:00
kari-ts c4d689ce42 util/syspolicy, docs/windows: add HideWindowedUI system policy (#22447)
This device policy hides entry points to the new windowed UI and uses the legacy tray based menu instead

Updates tailscale/corp#50029

Signed-off-by: kari-ts <kari@tailscale.com>
2026-11-18 15:44:49 -08:00
Mario Minardi ed75aa3c1f various: add auth-exchange-attempts flag to up
Add an optional auth-exchange-attempts flag to up that allows for
controlling the number of attempts made on transient errors (e.g, 5XX or
client-side deadline exceeded errors) during OAuth or workload identity
federation auth exchange operations.

This defaults to 1 (e.g., no retries). Specifying a larger number of
attempts enables retrying the auth exchange with exponential backoff
instead of the default of failing after a single try.

Updates https://github.com/tailscale/tailscale/issues/20339

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-11-18 15:15:43 -07:00
Francois Marier 019902a601 tstest/natlab: Fix typo in README sample command
The current command fails with:

    invalid value "15" for flag -timeout: parse error

because the timeout flag wants a time.Duration value.

Updates #cleanup

Change-Id: I645974078ce60c42b9d5d7bd227226de5fff26ad
Signed-off-by: Francois Marier <francois@tailscale.com>
2026-11-18 14:47:44 -07:00
Claus Lensbøl 0ef7c49037 wgengine/magicsock: remove logging from zero discokey to nonzero (#22500)
In 2c7aeadb1d we cleaned up some extra
logs but did not remove all logs of disco keys moving from zero to non
zero keys. Remove more log lines that we do not need to see.

Updates #cleanup

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2026-11-18 16:14:56 -05:00
Dep Updater f3e3699ed9 go.toolchain.rev: bump Go toolchain
* Go toolchain: https://github.com/tailscale/go/compare/1635316a95598e9fe1bff7267604daa94aa1c8ec...ee691292343f9e120054d09de48b27f42af2af6c

Triggered by @bradfitz via the bumpdep workflow.

Updates #18268

Signed-off-by: Dep Updater <noreply+dep-updater@tailscale.com>
2026-11-18 13:13:15 -08:00
Mario Minardi 055a07bf39 .github: stop using direct proxy for webclient prebuilt
Stop using the direct proxy for webclient prebuilt as this is preventing
some packages that are no longer available on GitHub from installing
properly during the build.

Fixes https://github.com/tailscale/tailscale/issues/22488

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-11-18 12:29:54 -07:00
Michael Ben-Ami 6a92f86ace ipn/{ipnext,ipnlocal}: pass only node IDs to the ExtraWireGuardAllowedIPs hook
The hook was given (node ID, node key) pairs, but its result is keyed
by node ID, and its only implementation, conn25, now tracks connector
transit IPs by node ID too. Drop the node key from the sequence.

Updates tailscale/corp#51237

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
2026-11-18 12:34:01 -05:00
Michael Ben-Ami 90feb626cd feature/conn25: key connector transit IPs by node ID, not node key
The client tracked which transit IPs belong to which connector in a
map keyed by the connector's node key. The ExtraWireGuardAllowedIPs
hook's results and the route manager are keyed by node ID, though, and
a node key can rotate while the node ID stays the same, which would
orphan a connector's transit IPs under the stale key.

Key the map by node ID instead, and rename byConnKey and
lookupTransitIPsByConnKey to match. addTransitIPForConnector now
rejects connectors with a zero node ID rather than a zero node key,
since the ID is what the mapping is keyed on.

Updates tailscale/corp#51237

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
2026-11-18 12:34:01 -05:00
Brad Fitzpatrick 1f36d5a89f feature/linuxdnsfight, go.mod: replace gonotify with direct inotify calls
The resolv.conf watcher needs one watch on one directory and a
blocking read. gonotify v3.0.2 has a bug where it loops forever
without advancing when a record's name length runs past the end of a
read. It also never closes its fd on cancel and allocates 32 KB per
Read. Use x/sys/unix directly, return an error on a malformed record,
and stop when the kernel removes the watch.

Fixes #16576

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: If2bc5e94f8aab2922ee9e07b3c2b75a76f4f9236
2026-11-18 09:25:28 -08:00
License Updater cb4e87af79 licenses: update license notices
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2026-11-18 08:28:39 -08:00
Claus Lensbøl f1b5e51369 tstest/natlab/vmtest: make ssh tests run across Linux test matrix (#22491)
Updates #21817

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2026-11-18 11:17:00 -05:00
Jim Wright 9a785b98df tool,release/dist: remove yarn (#22469)
The web client and tsconnect now use tool/pnpm, so nothing uses yarn.
Remove tool/yarn, tool/yarn.rev, the deprecated dist.Build.Yarn field
and yarn from the flake dev shell.

Updates tailscale/corp#51439

Change-Id: Ic27506cc77c1ada96c40a2978903204418d82d3d

Signed-off-by: Jim Wright <jimw@tailscale.com>
2026-11-18 08:03:27 -07:00
Alex Chan 5528c3d1ba ipn: log PostureChecking in Prefs.Pretty
When prefs gets logged, we weren't recording whether the node had enabled
posture checking. Not enabling this is a common cause of device posture
failing, so include it here.

Updates #cleanup

Change-Id: I9e16c9b56ac70f51598172aa717e7e2a33c4fa7c
Signed-off-by: Alex Chan <alexc@tailscale.com>
2026-11-18 14:58:51 +00:00
dependabot[bot] 31854730c0 build(deps): bump minimatch from 3.1.2 to 3.1.5 in /client/web
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.1.2 to 3.1.5.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-18 07:47:08 -07:00
BeckyPauley 53c9d49750 cmd/k8s-operator/e2e: tidy e2e test logging (#22485)
Log which data keys the operator Secret contains when the expected state is
missing.

Discard logs for tsnet.Servers created as part of test setup and during
tests to reduce log noise.

Updates tailscale/corp#34562

Change-Id: I37d730a46304004fb1579350a755bc92cdf46e42

Signed-off-by: Becky Pauley <becky@tailscale.com>
2026-11-18 14:15:42 +00:00
David Bond 87edd6b488 cmd/k8s-operator,k8s-operator: truncate long default egress proxy hostnames (#22081)
An egress Service without the tailscale.com/hostname annotation gets the
default proxy hostname <namespace>-<name>. When that hostname exceeds 63
bytes, the operator rejects the Service. This includes ProxyGroup egress
Services, which do not use the hostname.

For egress Services, shorten a default that is too long to a 54-char
prefix and an 8-char hash. Defaults that fit do not change, so no
existing proxy is renamed. Explicit annotations and ingress hostnames
keep the current validation.

Rename TruncateLabelValue to TruncateWithHash, as it now also truncates
hostnames.

Fixes #22080

Change-Id: Ib1589a5e9c750cd37d0641829a84fabd0c4352a7

Signed-off-by: David Bond <davidsbond93@gmail.com>
2026-11-18 13:17:36 +00:00
David Bond 2a4186eba7 cmd/k8s-operator: raise the egress ProxyGroup port limit to 20000 (#22209)
This commit widens the egress match port range from [10000, 11000) to
[10000, 30000). The old limit of 1000 ports was arbitrary, and users
with many egress Services reach it. The new range ends below the Linux
ephemeral port range, so match ports do not collide with ports that the
proxy itself uses.

The port count also no longer includes the health check port, which
lowered the real limit by one. A new test covers allocation up to the
limit.

Fixes #22195

Change-Id: Ie20feb2744b40dce052d3732f9f486b1bff31b32

Signed-off-by: David Bond <davidsbond93@gmail.com>
2026-11-18 13:17:15 +00:00
Yerassyl Urazalin 5123b036bd feature/linuxdnsfight: watch only the directory, filtered by the kernel
gonotify.NewDirWatcher registers IN_ALL_EVENTS on the directory and
every subdirectory below it, and applies the caller's mask only in
userspace. Watching /etc that way wakes tailscaled for every open or
read of any file under /etc, including /etc/ld.so.cache on each exec.
Under a busy exec or open loop tailscaled used 150-230% CPU.

Use a plain inotify watch on the directory itself with the events we
care about, so the kernel drops everything else. Call cb once at
startup, which NewDirWatcher's synthetic events for existing files
used to do.

Rework TestWatchFile to wait for the startup callback first, so it
still checks that a write triggers one, and add a test that reads and
writes to other files don't.

Fixes #21743
Updates #16576

Change-Id: Idf1b13a6dffde4191ce8744cbb0e24a74b7a5b82
Signed-off-by: Yerassyl Urazalin <erasil.urazalin@gmail.com>
2026-11-18 05:05:42 -08:00
Brad Fitzpatrick 4aebff0a31 tka: test that ValidateDeeplink rejects each missing parameter
The os case failed before the previous commit: a link with no os
parameter and an HMAC over an empty OS name validated successfully.

Change-Id: I087c66749475ac4c60130d700f4dc74dde60987f
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-11-18 10:00:31 +00:00
IgorPolyakov 89b8a8e561 tka: fix OS name validation in signing deeplinks
Updates #cleanup

Signed-off-by: IgorPolyakov <igorpolyakov@protonmail.com>
2026-11-18 10:00:31 +00:00
Dep Updater 075e6403b2 go.mod: bump github.com/tailscale/wireguard-go
* github.com/tailscale/wireguard-go: https://github.com/tailscale/wireguard-go/compare/c90940ef3f06...a1800e9c5305

Triggered by @bradfitz via the bumpdep workflow.

Updates tailscale/wireguard-go#132

Signed-off-by: Dep Updater <noreply+dep-updater@tailscale.com>
2026-11-17 15:52:23 -08:00
Mario Minardi 8a1840ef42 client/web,tool: bump node to 26.x LTS
Bump node to 26.13.1 as this is the new LTS line.

Update @types/node to 26.6.6 to match the node bump.

Fixes https://github.com/tailscale/corp/issues/50402

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-11-17 15:10:47 -07:00
Mazdak Nasab 4f19a4aff8 feature/conn25: reject Magic IPs whose Transit IP isn't in WireGuard yet (#22374)
A Magic IP gets its address assignment when the DNS response is rewritten,
but the Transit IP it maps to only becomes usable later: handleAddressAssignment
registers it with the connector over PeerAPI, and only then does
addTransitIPForConnector put it in byConnKey, where extraWireGuardAllowedIPs
picks it up and hands it to WireGuard as an allowed IP for that peer.

Until then, transitIPForMagicIP would happily return the Transit IP, the
datapath would DNAT to it, and WireGuard would drop the packet because no
peer claims the address. The client application saw a black hole and hung.
That window stays open indefinitely when the registration never lands: a
failed PeerAPI request, a full assignment queue, or a reset that clears
byConnKey.

transitIPForMagicIP now checks that the Transit IP is registered under its
connector's node key, and returns the new ErrTransitIPNotRoutable if it
isn't. The datapath treats that like an unknown Magic IP and injects an
ICMP host unreachable, so the application fails fast instead of hanging.

Fixes https://github.com/tailscale/corp/issues/50405

Change-Id: Id232e27063f27278e65279d9b1adad5d67d3b6ef

Signed-off-by: Mazdak Nasab <mazdak.nasab@gmail.com>
2026-11-17 15:10:44 -07:00
Claus Lensbøl 240424144f .github/workflows: add weekend runner for generated tests (#22179)
Add weekend runner for smoke testing natlab generated tests.

Updates #21817

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2026-11-17 16:26:59 -05:00
Dep Updater a920394089 go.mod: bump gvisor.dev/gvisor
* gvisor.dev/gvisor: https://github.com/google/gvisor/compare/a6f909f08a72...0303b2605d5e

Triggered by @bradfitz via the bumpdep workflow.

Updates #22104

Signed-off-by: Dep Updater <noreply+dep-updater@tailscale.com>
2026-11-17 13:10:30 -08:00
David Anderson ee54083f30 wgengine/magicsock: mirror retried hybrid handshakes over DERP
Updates tailscale/corp#50068

Signed-off-by: David Anderson <danderson@tailscale.com>
Change-Id: I8971ddc5bf80edd1f342cb6bb63cee0b6a6a6964
2026-11-17 13:27:24 -07:00
David Anderson f4336907aa ipn: configure hybrid handshakes for peers that support it
Updates tailscale/corp#50068

Signed-off-by: David Anderson <danderson@tailscale.com>
Change-Id: Ibebab03c31b3fceba83af28d72ddecd26a6a6964
2026-11-17 13:27:24 -07:00
Jim Wright e232b0a131 client/web,release/dist: move web client from yarn to pnpm (#22464)
Import yarn.lock into pnpm with the same supply-chain settings as
cmd/tsconnect, plus overrides replacing yarn resolutions, two narrow
trustPolicyExclude entries for packages published without provenance,
and denied esbuild/@swc/core install scripts.

Switch assets.go, cmd/build-webclient, release/dist and CI to
tool/pnpm. release/dist now looks up pnpm only when building web
client assets; Build.Yarn is deprecated.

Updates tailscale/corp#51439

Change-Id: Ib472fc8439e916bfe41158e3952f9fa8c02f522d

Signed-off-by: Jim Wright <jimw@tailscale.com>
2026-11-17 13:07:03 -07:00
Mike O'DriscollandBrad Fitzpatrick 18d7c08613 derp/xdp: don't write counters back to the per-CPU map on every packet (#22460)
inc_counter looked up the per-CPU counter, incremented it in place,
and then called bpf_map_update_elem to store the same value back. For
a BPF_MAP_TYPE_PERCPU_HASH the pointer returned by the lookup already
is this CPU's slot, so the write-back was redundant, and it is the one
step that takes the hash bucket spinlock. The program runs for every
received packet, not just STUN, and updates two counters each time, so
a busy DERP paid two locked map updates per incoming TCP segment.

Keep the update only for the miss path, which runs once per key.

While here, make inc_counter and handle_counters return void. Neither
caller looked at the result.

TestXDP cleared the counters map before every case, so it only ever
exercised the key insertion path. Add a subtest that runs the same
packet repeatedly without clearing, to cover the in-place increment
of an existing key.

Regenerate the bpf2go outputs with clang 18.1.8 and the bpf2go from
the cilium/ebpf v0.22.0 already in go.mod, which is also why the
generated Go files pick up structs.HostLayout and the object name
constants.

Fixes #22463

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-11-17 15:02:35 -05:00
Nick Khyl 7c6e49dfb3 health: hide warnables while the backend is warming up
Since bfde8079a, the Tracker omits warnables with an unhealthy
dependency from CurrentState and Strings. But that only covered
Warnable.DependsOn. The implicit dependency on the warming-up warnable
was still only advertised via UnhealthyState.DependsOn and left to
clients to enforce. The macOS, iOS and Android clients did; the Windows
clients and the CLI did not, and showed warnings that disappeared once
the backend started.

Enforce it in the Tracker as well, so that all clients behave the same
and do not need to inspect DependsOn.

Updates tailscale/corp#44572
Updates #14796
Updates #14687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2026-11-17 11:30:51 -08:00
Pedro Andrade 153f00f636 tailcfg: add StableVIPServiceID
Add a stable, opaque identifier type for VIP services, like StableNodeID
and StableTailnetID. Unlike a ServiceName, it is not reused when a
service is deleted and recreated, so it can identify a service in
records that outlive it.

Not currently used in the OSS tree; it will be used in PAM use cases
soon.

Updates tailscale/corp#49316

Signed-off-by: Pedro Andrade <pedro@tailscale.com>
2026-11-17 12:08:09 -07:00
Fran Bull f3a3382791 feature/routecheck,ipn,net/routecheck,tailcfg: Probe conn25 connectors
Add conn25 connectors to the targets for routecheck probing. Enables
conn25 clients to use the routecheck report to help decide which
connector to use.

Updates tailscale/corp#47251

Signed-off-by: Fran Bull <fran@tailscale.com>
2026-11-17 10:40:12 -08:00
Jim Wright 9123e6e26c cmd/tsconnect: upgrade tsconnect from yarn to pnpm (#22437)
Import yarn.lock to pnpm-workspace.yaml and pnpm-lock.yaml
Add pnpm tool and update references

Fixes tailscale/corp#51437

Change-Id: Ia25017e7e82cf3af13e04fc3c07b82196f211744

Signed-off-by: Jim Wright <jimw@tailscale.com>
2026-11-17 10:03:01 -07:00
chaosinthecrd 51a970a4e6 cmd/containerboot: add tests for egress resync on FQDN target changes
Adds table tests for shouldResync, covering peer device and Tailscale
Service targets that lose and regain their addresses, a device or
Tailscale Service that failed to resolve at the last sync, a device
replaced by a Tailscale Service, a target removed from the config, a
Service that gains a second host (which must not resync), and a 4via6
route that is withdrawn or advertised.

Updates #21159
Updates #21426

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-17 16:22:01 +00:00
chaosinthecrd 076da81190 cmd/containerboot: resync egress rules when an FQDN target changes
The egress proxy only stored a target FQDN's addresses after a lookup
that returned some, and on a netmap update only compared them with peer
device names. Targets that failed to resolve, had no addresses or were
Tailscale Services were never rechecked, so their rules stayed missing
until a config change or Pod restart.

This fixes this by storing every lookup result, rebuilt on each sync,
and resolving each stored FQDN in shouldResync the same way sync does.
A target that leaves the netmap now triggers a resync too, so its rules
are removed straight away. serviceIPsFromNetMap returns each Service IP
once, so a Service gaining or losing a host doesn't cause a resync.

Fixes #21159
Fixes #21426

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-11-17 16:22:01 +00:00
Gabriel von Winckler f3bc40b679 release/dist/qnap: drop the static package tag from QPKG_VER (#22381)
QDK's qbuild truncates QPKG_VER to 10 characters, so versions like
1.105.265-1 produced Tailscale_1.105.265-_<arch>.qpkg while we returned
(and put in the manifest) Tailscale_1.105.265-1_<arch>.qpkg. The "-1" tag
was never bumped, so drop it and use the version alone. Fail the build
if the version itself exceeds 10 characters rather than silently
producing a mismatched filename.

Built qnap/x86_64 unsigned at 1.105.280: the file on disk and the
manifest both name Tailscale_1.105.280_x86_64.qpkg, and the qpkg header
version is 1.105.280. The length guard and signed builds were not
exercised.

Updates tailscale/corp#51480

Signed-off-by: Gabriel von Winckler <gabriel@tailscale.com>
2026-11-17 14:31:35 +00:00
Nick Beirne 54c4153604 wgengine/magicsock: rebind on bad socket errors
On macOS and iOS, UDP reads have been observed to fail with ENOTSOCK and
EBADF. Both errors indicate that the fd is no longer usable. The receive
function would retry reading from the bad socket until some other event,
like a link change, caused a rebind.

magicsock now rebinds when a read fails with EBADF or ENOTSOCK. Read and
write failures share a single 5s throttle to handle bursts of failures.

Updates #22097

Change-Id: Idd19f7094d9fc11e0f61a3207eb20281acfd5255
Signed-off-by: Nick Beirne <nickb@tailscale.com>
2026-11-17 09:09:04 -05:00
Dep Updater 46ad4538b7 go.mod: bump 5 modules
* golang.org/x/crypto: v0.58.0 to v0.59.0
* golang.org/x/mod: v0.41.0 to v0.43.0
* golang.org/x/sync: v0.24.0 to v0.25.0
* golang.org/x/text: v0.43.0 to v0.44.0
* golang.org/x/tools: v0.51.0 to v0.52.0

x/crypto v0.59.0 removed the DSA keys from ssh/testdata, so drop or
swap out the DSA test cases in tempfork/sshtest/ssh to match upstream.

Triggered by @bradfitz via the bumpdep workflow.

Updates tailscale/corp#47960

Signed-off-by: Dep Updater <noreply+dep-updater@tailscale.com>
2026-11-16 18:55:09 -08:00
Nick Khyl 13af579d64 ipn/ipnlocal: resend UserProfiles to IPN bus watchers after a profile change
A watch session's UserProfiles dedup state was only reset when the
self node delivered to it changed, as of c9fb05b6f5. Switching to
a profile that never gets a self node, such as a stopped or logged
out one, and back delivered the same self node again, so the profiles
were not resent to watchers that had dropped them on the switch. The
Windows GUI then listed no tagged or other users' devices.

Reset the dedup state on a profile change as well.

Updates #19889
Updates tailscale/corp#51597

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2026-11-16 18:54:54 -08:00
Brad Fitzpatrick 203692da0a derp/derphttp, feature/derpwebsocket: add opt-in WebSocket fallback
Some HTTP proxies (as seen in ChatGPT Work's sandbox) intercept TLS and
refuse DERP's "Upgrade: DERP" request but allow WebSocket upgrades,
like browsers use. derphttp could already speak DERP over WebSockets,
but only on js/wasm or with the ts_debug_websockets build tag and an
envknob, and that path dials with its own http.Client, skipping the
DERP node selection, proxy CONNECT, and TLS logic of the normal path.

Add derphttp.HookUpgradeWebsocket. When it's set and a client's HTTP
upgrade to DERP fails after any TLS handshake succeeded, the client
redials and calls the hook to do a WebSocket handshake over the new
connection instead. Once that works, the client keeps using WebSockets
for its reconnects until they fail, so it doesn't pay for a refused
upgrade every time.

The new feature/derpwebsocket package sets the hook. Neither tailscaled
nor tsnet links it in; programs that want the fallback, like tailcat,
import it.

Updates #22412

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I20e4b29f1bca6e7e5e3b33f960ce9d331ec7dac9
2026-11-16 17:26:11 -08:00
Jordan Whited ca0cadf957 go.mod,wgengine/wgcfg: bump wg-go & make crypto queue sizing cgroup-aware
https://github.com/tailscale/wireguard-go/compare/9e10ef9af415...c90940ef3f06

Fixes tailscale/corp#47966

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2026-11-16 16:12:24 -08:00
Lim-jooyoung cfc3f365d4 drive/driveimpl/compositedav: close idle connections of replaced children
SetChildren took oldChildren from its argument instead of from
h.children, so it closed the idle connections of the children it had
just set and left those of the replaced children open.

FileSystemForRemote builds a fresh Handler for every request from its
long-lived children, so idle connections to the local file server were
closed before every request and were generally not reused.

Updates #11187

Signed-off-by: Lim-jooyoung <mmporong@gmail.com>
2026-11-16 14:48:41 -08:00
Mazdak Nasab 04ed834b36 feature/conn25: resolve and count client flows atomically (#22288)
The datapath resolved a Magic IP to its Transit IP and then, in a second
lock acquisition, counted the new flow against the assignment holding
that Transit IP. A concurrent reserveAddresses could expire the
assignment in between and hand the Transit IP to an unrelated
destination, so the flow was installed DNATing to an address another
destination now owned, counted against that stranger's assignment.

Merge the two steps into ClientFlowCreatedForMagicIP, which resolves and
counts under one c.mu acquisition.

Fixes https://github.com/tailscale/corp/issues/44273

Change-Id: Iefae902267fd06a5d2c965a3570b6977921be76f

Signed-off-by: Mazdak Nasab <mazdak.nasab@gmail.com>
2026-11-16 12:19:54 -07:00
Brad Fitzpatrick f301a4d7a3 wgengine/magicsock: apply DERP home and endpoints deltas to peersByID
UpdateNetmapDelta updated a peer's endpoint but not its peersByID
snapshot. A later full netmap restoring the pre-delta DERP home or
endpoints then matched the stale snapshot, so the updateNodes fast path
skipped it and magicsock kept sending to the old DERP region.

Fixes #22379

Change-Id: I361f90e6063ca9e9dde02be8074b305622e46e5b
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-11-16 09:16:50 -08:00
Mario Minardi aac0e23d1d cmd/tsconnect: stop including tailwind styles in tsconnect package CSS
pkg.css was publishing Tailwind CSS classes unnecessarily which could
cause conflicts with downstream consumers (e.g., if the downstream uses
Tailwind 4 as an example).

Only publish xterm's styles as these are needed for the components used
by the library.

Updates https://github.com/tailscale/corp/issues/50293

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-11-16 09:31:58 -07:00