Commit Graph

9390 Commits

Author SHA1 Message Date
David Bond
e00d6b4266 cmd/k8s-operator: allow specifying replicas for connectors
This commit adds a `replicas` field to the `Connector` custom resource that
allows users to specify the number of desired replicas deployed for their
connectors.

This allows users to deploy exit nodes, subnet routers and app connectors
in a highly available fashion.

Signed-off-by: David Bond <davidsbond93@gmail.com>
2025-08-12 13:49:59 +01:00
Jordan Whited
cde65dba16 wgengine/magicsock: add clientmetric for Peer Relay challenge reception (#16834)
Updates tailscale/corp#30527

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-11 14:53:25 -07:00
Jordan Whited
4fa27db8dd wgengine/magicsock: add clientmetrics for locally delivered Peer Relay alloc disco (#16833)
Expected when Peer Relay'ing via self. These disco messages never get
sealed, and never leave the process.

Updates tailscale/corp#30527

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-11 14:48:19 -07:00
Jordan Whited
36397f1794 wgengine/magicsock: add clientmetrics for TX direction Peer Relay disco messages (#16831)
Updates tailscale/corp#30527

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-11 13:29:57 -07:00
Mike O'Driscoll
03c4b2a0d0 derp/derphttp: test improvements (#16723)
Update some logging to help future failures.
Improve test shutdown concurrency issues.

Fixes #16722

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
2025-08-11 12:57:15 -04:00
Jordan Whited
d122f0350e control/controlknobs,tailcfg,wgengine/magicsock: deprecate NodeAttrDisableMagicSockCryptoRouting (#16818)
Peer Relay is dependent on crypto routing, therefore crypto routing is
now mandatory.

Updates tailscale/corp#20732
Updates tailscale/corp#31083

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-11 09:04:03 -07:00
dependabot[bot]
71d51eb8db .github: bump github/codeql-action from 3.29.3 to 3.29.5 (#16765)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.3 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d6bbdef45e...51f77329af)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-10 21:56:17 -06:00
Brad Fitzpatrick
796eb21204 go.toolchain.rev: bump tsgo toolchain
Updates tailscale/go#129

Change-Id: I94debd1d0b7080c5b012f200ad98d22c3048f350
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-08-08 16:21:39 -06:00
Claus Lensbøl
5297dc3baf cmd/tailscale/cli: move systray configuration to tailscale configure (#16817)
Updates #1708

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2025-08-08 16:12:11 -04:00
Andrew Lytvynov
b5283ab13a go.toolchain.rev: bump to 1.24.6 (#16811)
Updates https://github.com/tailscale/corp/issues/31103

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-08-07 14:41:55 -07:00
Claus Lensbøl
3fe022877a client/systray: temporarily replace systray module (#16807)
We are waiting for a PR to be reviewed upstream.

https://github.com/fyne-io/systray/pull/100

Updates #1708

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2025-08-07 16:02:47 -04:00
Erisa A
d4060f1a39 CODE_OF_CONDUCT.md: update Code of Conduct (#16806)
Updates #cleanup

Signed-off-by: Erisa A <erisa@tailscale.com>
2025-08-07 19:27:56 +01:00
Claus Lensbøl
89954fbceb client/systray: add startup script generator for systemd (#16801)
Updates #1708

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2025-08-07 11:51:15 -04:00
Jordan Whited
4666d4ca2a wgengine/magicsock: fix missing Conn.hasPeerRelayServers.Store() call (#16792)
This commit also extends the updateRelayServersSet unit tests to cover
onNodeViewsUpdate.

Fixes tailscale/corp#31080

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-06 14:57:55 -07:00
Jordan Whited
0374e6d906 wgengine/magicsock: add lazyEndpoint.FromPeer tests (#16791)
Updates tailscale/corp#30903

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-06 14:55:34 -07:00
Jordan Whited
02967ffcf2 wgengine/magicsock: add lazyEndpoint.InitiationMessagePublicKey tests (#16790)
Updates tailscale/corp#30903

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-06 14:41:05 -07:00
Jordan Whited
908f20e0a5 wgengine/magicsock: add receiveIP() unit tests (#16781)
One of these tests highlighted a Geneve encap bug, which is also fixed
in this commit.

looksLikeInitMsg was passed a packet post Geneve header stripping with
slice offsets that had not been updated to account for the stripping.

Updates tailscale/corp#30903

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-06 09:35:25 -07:00
TheBigBear
57d653014b scripts/installer.sh: add FreeBSD 15 (#16741)
* Update installer.sh add FreeBSD ver 15

this should fix the issue on https://github.com/tailscale/tailscale/issues/16740

Signed-off-by: TheBigBear <471105+TheBigBear@users.noreply.github.com>

* scripts/installer.sh: small indentation change

Signed-off-by: Erisa A <erisa@tailscale.com>
Fixes #16740

---------

Signed-off-by: TheBigBear <471105+TheBigBear@users.noreply.github.com>
Signed-off-by: Erisa A <erisa@tailscale.com>
Co-authored-by: Erisa A <erisa@tailscale.com>
2025-08-06 02:38:50 +01:00
Andrew Lytvynov
f80ea92030 .github/workflows: enforce github action version pinning (#16768)
Use https://github.com/stacklok/frizbee via the new `go tool` support
from Go 1.24.

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

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-08-05 11:49:33 -07:00
Erisa A
ad273d75b7 scripts/installer.sh: add bazzite handling (#16779)
Fixes #14540

Signed-off-by: Erisa A <erisa@tailscale.com>
2025-08-05 18:24:32 +01:00
Will Norris
9f29c428f4 client/systray: allow specifying tailscaled socket
Pass a local.Client to systray.Run, so we can use the existing global
localClient in the cmd/tailscale CLI.  Add socket flag to cmd/systray.

Updates #1708

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
2025-08-05 09:19:49 -07:00
Claus Lensbøl
5bb42e3018 wgengine/router: rely on events for deleted IP rules (#16744)
Adds the eventbus to the router subsystem.

The event is currently only used on linux.

Also includes facilities to inject events into the bus.

Updates #15160

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
2025-08-05 08:31:51 -04:00
Jordan Whited
b0018f1e7d wgengine/magicsock: fix looksLikeInitiationMsg endianness (#16771)
WireGuard message type is little-endian encoded.

Updates tailscale/corp#30903

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-08-04 14:21:32 -07:00
Will Norris
834630fedf cmd/tailscale: add systray subcommand on Linux builds
This will start including the sytray app in unstable builds for Linux,
unless the `ts_omit_systray` build flag is specified.

If we decide not to include it in the v1.88 release, we can pull it
back out or restrict it to unstable builds.

Updates #1708

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
2025-08-01 17:57:06 -07:00
Will Norris
0f15e44196 Makefile: sort make commands and fix printing newlines
Updates #cleanup

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
2025-08-01 15:41:56 -07:00
kari-ts
d897d809d6 feature/taildrop: do not use m.opts.Dir for Android (#16316)
In Android, we are prompting the user to select a Taildrop directory when they first receive a Taildrop: we block writes on Taildrop dir selection. This means that we cannot use Dir inside managerOptions, since the http request would not get the new Taildrop extension. This PR removes, in the Android case, the reliance on m.opts.Dir, and instead has FileOps hold the correct directory.

This expands FileOps to be the Taildrop interface for all file system operations.

Updates tailscale/corp#29211

Signed-off-by: kari-ts <kari@tailscale.com>

restore tstest
2025-08-01 15:10:00 -07:00
mzbenami
5865d0a61a Makefile: 'generate' target (#16746)
Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
2025-08-01 13:30:42 -04:00
Lee Briggs
f2fd7a0514 cmd/k8s-operator,k8s-operator: allow setting a priorityClassName (#16685)
* cmd/k8s-operator,k8s-operator: allow setting a `priorityClassName`

Fixes #16682

Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>

* Update k8s-operator/apis/v1alpha1/types_proxyclass.go

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
Signed-off-by: Lee Briggs <jaxxstorm@users.noreply.github.com>

* run make kube-generate-all

Change-Id: I5f8f16694fdc181b048217b9f05ec2ee2aa04def
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>

---------

Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <jaxxstorm@users.noreply.github.com>
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2025-07-31 23:35:48 -07:00
jishudashu
23a0398136 ipn/ipnlocal, net/dns: use slices.Equal to simplify code (#16641)
Signed-off-by: jishudashu <979260390@qq.com>
2025-07-31 11:36:51 -07:00
Mike O'Driscoll
47b5f10165 cmd/tsidp,tsnet: update tsidp oidc-key store path (#16735)
The tsidp oidc-key.json ended up in the root directory
or home dir of the user process running it.

Update this to store it in a known location respecting
the TS_STATE_DIR and flagDir options.

Fixes #16734

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
2025-07-31 12:13:36 -04:00
Joe Tsai
1cc842b389 util/set: add more functionality to IntSet (#16640) 2025-07-30 13:08:53 -07:00
Tom Proctor
eed3e5dc61 ipn/store/kubestore,kube: fix cert error in admin UI (#16717)
Also adds a test to kube/kubeclient to defend against the error type
returned by the client changing in future.

Fixes tailscale/corp#30855

Change-Id: Id11d4295003e66ad5c29a687f1239333c21226a4

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
2025-07-30 13:39:59 +01:00
Percy Wegmann
aa6a2d1e56 drive/driveimpl: use sudo or su to run file server
Some systems have `sudo`, some have `su`. This tries both, increasing
the chance that we can run the file server as an unprivileged user.

Updates #14629

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2025-07-29 17:06:20 -05:00
Jordan Whited
3d1e4f147a tstest/natlab: fix conn.Close race with conn.ReadFromUDPAddrPort (#16710)
If a conn.Close call raced conn.ReadFromUDPAddrPort before it could
"register" itself as an active read, the conn.ReadFromUDPAddrPort would
never return.

This commit replaces all the activeRead and breakActiveReads machinery
with a channel. These constructs were only depended upon by
SetReadDeadline, and SetReadDeadline was unused.

Updates #16707

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-07-29 14:58:47 -07:00
KevinLiang10
e37432afb7 cmd/tailscale/cli: update message for disable service (#16705)
This commit update the message for recommanding clear command after running serve for service.
Instead of a flag, we pass the service name as a parameter.

Fixes tailscale/corp#30846

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
2025-07-29 13:59:09 -04:00
M. J. Fromberger
b34cdc9710 ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594)
In the components where an event bus is already plumbed through, remove the
exceptions that allow it to be omitted, and update all the tests that relied on
those workarounds execute properly.

This change applies only to the places where we're already using the bus; it
does not enforce the existence of a bus in other components (yet),

Updates #15160

Change-Id: Iebb92243caba82b5eb420c49fc3e089a77454f65
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
2025-07-29 09:04:08 -07:00
dependabot[bot]
e5e4386f33 build(deps): bump @babel/runtime from 7.23.4 to 7.26.10 in /client/web (#15299)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.4 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 23:36:36 -06:00
Nick Khyl
4df02bbb48 util/syspolicy/setting: use a custom marshaler for time.Duration
jsonv2 now returns an error when you marshal or unmarshal a time.Duration
without an explicit format flag. This is an intentional, temporary choice until
the default [time.Duration] representation is decided (see golang/go#71631).

setting.Snapshot can hold time.Duration values inside a map[string]any,
so the jsonv2 update breaks marshaling. In this PR, we start using
a custom marshaler until that decision is made or golang/go#71664
lets us specify the format explicitly.

This fixes `tailscale syspolicy list` failing when KeyExpirationNotice
or any other time.Duration policy setting is configured.

Fixes #16683

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2025-07-28 12:57:39 -05:00
Jordan Whited
a9f3fd1c67 wgengine/magicsock: fix magicsock deadlock around Conn.NoteRecvActivity (#16687)
Updates #16651
Updates tailscale/corp#30836

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2025-07-28 09:26:24 -07:00
M. J. Fromberger
5ce3845a02 net/portmapper: avert a panic when a mapping is not available (#16686)
Ideally when we attempt to create a new port mapping, we should not return
without error when no mapping is available. We already log these cases as
unexpected, so this change is just to avoiding panicking dispatch on the
invalid result in those cases. We still separately need to fix the underlying
control flow.

Updates #16662

Change-Id: I51e8a116b922b49eda45e31cd27f6b89dd51abc8

Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
2025-07-28 09:01:41 -07:00
dependabot[bot]
c962fefa3e build(deps): bump form-data from 4.0.0 to 4.0.4 in /client/web (#16623)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.0 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 08:51:58 -06:00
dependabot[bot]
4a435aedcb .github: Bump github/codeql-action from 3.29.2 to 3.29.3 (#16615)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](181d5eefc2...d6bbdef45e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 08:41:59 -06:00
Tom Proctor
61d42eb300 k8s-operator: fix test flake (#16680)
This occasionally panics waiting on a nil ctx, but was missed in the
previous PR because it's quite a rare flake as it needs to progress to a
specific point in the parser.

Updates #16678

Change-Id: Ifd36dfc915b153aede36b8ee39eff83750031f95

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
2025-07-28 13:33:46 +01:00
Tom Proctor
02084629e2 k8s-operator: handle multiple WebSocket frames per read (#16678)
When kubectl starts an interactive attach session, it sends 2 resize
messages in quick succession. It seems that particularly in HTTP mode,
we often receive both of these WebSocket frames from the underlying
connection in a single read. However, our parser currently assumes 0-1
frames per read, and leaves the second frame in the read buffer until
the next read from the underlying connection. It doesn't take long after
that before we end up failing to skip a control message as we normally
should, and then we parse a control message as though it will have a
stream ID (part of the Kubernetes protocol) and error out.

Instead, we should keep parsing frames from the read buffer for as long
as we're able to parse complete frames, so this commit refactors the
messages parsing logic into a loop based on the contents of the read
buffer being non-empty.

k/k staging/src/k8s.io/kubectl/pkg/cmd/attach/attach.go for full
details of the resize messages.

There are at least a couple more multiple-frame read edge cases we
should handle, but this commit is very conservatively fixing a single
observed issue to make it a low-risk candidate for cherry picking.

Updates #13358

Change-Id: Iafb91ad1cbeed9c5231a1525d4563164fc1f002f

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
2025-07-28 12:03:08 +01:00
James Sanderson
5731869565 health: add an ETag to UnhealthyState for change detection
Updates tailscale/corp#30596

Signed-off-by: James Sanderson <jsanderson@tailscale.com>
2025-07-28 11:50:18 +01:00
Tom Meadows
5154bbb0b3 k8s-operator: adding session type to cast header (#16660)
Updates #16490

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2025-07-28 11:15:14 +01:00
Raj Singh
e300a00058 cmd/k8s-operator: Enhance DNS record handling for ProxyGroup egress services (#16181)
This update introduces support for DNS records associated with ProxyGroup egress services, ensuring that the ClusterIP Service IP is used instead of Pod IPs.

Fixes #15945

Signed-off-by: Raj Singh <raj@tailscale.com>
2025-07-25 19:45:37 -05:00
Aaron Klotz
bfebf870ae cmd/tailscaled: update installSystemDaemonWindows to set the correct system service depndencies
Fixes #16658

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2025-07-25 11:03:57 -06:00
Danni Popova
c572442548 cmd/tailscale: allow SSH to IPs or DNS names without MagicDNS (#16591)
fixes #16381

Signed-off-by: Danni Popova <danni@tailscale.com>
2025-07-25 10:21:41 +01:00
Aaron Klotz
2a5d9c7269 VERSION.txt: this is v1.87.0
Signed-off-by: Aaron Klotz <aaron@tailscale.com>
v1.87.0-pre
2025-07-24 12:25:57 -06:00