summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2025-01-09cmd/k8s-operator,k8s-operator: allow users to set custom labels for the ↵Irbe Krumina15-101/+389
optional ServiceMonitor (#14475) * cmd/k8s-operator,k8s-operator: allow users to set custom labels for the optional ServiceMonitor Updates tailscale/tailscale#14381 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2025-01-08go.mod: bump go-git to v5.13.1 (#14584)Andrew Lytvynov2-43/+36
govulncheck flagged a couple fresh vulns in that package: * https://pkg.go.dev/vuln/GO-2025-3367 * https://pkg.go.dev/vuln/GO-2025-3368 I don't believe these affect us, as we only do any git stuff from release tooling which is all internal and with hardcoded repo URLs. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2025-01-08client/web: properly show "Log In" for web client on fresh install (#14569)Mario Minardi1-6/+6
Change the type of the `IPv4` and `IPv6` members in the `nodeData` struct to be `netip.Addr` instead of `string`. We were previously calling `String()` on this struct, which returns "invalid IP" when the `netip.Addr` is its zero value, and passing this value into the aforementioned attributes. This caused rendering issues on the frontend as we were assuming that the value for `IPv4` and `IPv6` would be falsy in this case. The zero value for a `netip.Addr` marshalls to an empty string instead which is the behaviour we want downstream. Updates https://github.com/tailscale/tailscale/issues/14568 Signed-off-by: Mario Minardi <mario@tailscale.com>
2025-01-08client/systray: record that systray is runningWill Norris1-0/+1
Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2025-01-08types/views: add MapViewsEqual and MapViewsEqualFuncAndrew Dunham2-0/+126
Extracted from some code written in the other repo. Updates tailscale/corp#25479 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I92c97a63a8f35cace6e89a730938ea587dcefd9b
2025-01-08hostinfo: improve accuracy of Linux desktop detection heuristicBrad Fitzpatrick1-1/+0
DBus doesn't imply desktop. Updates #1708 Change-Id: Id43205aafb293533119256adf372a7d762aa7aca Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-08ipn/ipnlocal: add client metric gauge for number of IPNBus connectionsBrad Fitzpatrick1-0/+8
Updates #1708 Change-Id: Ic7e28d692b4c48e78c842c26234b861fe42a916e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-08prober: clone histogram buckets before handing to Prometheus for ↵Percy Wegmann1-1/+2
derp_qd_probe_delays_seconds Updates tailscale/corp#25697 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2025-01-08cmd/k8s-operator,k8s-operator: support ingress ProxyGroup type (#14548)Irbe Krumina9-32/+222
Currently this does not yet do anything apart from creating the ProxyGroup resources like StatefulSet. Updates tailscale/corp#24795 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2025-01-07ipn/ipnlocal: connect serve config to c2n endpointKevinLiang103-34/+154
This commit updates the VIPService c2n endpoint on client to response with actual VIPService configuration stored in the serve config. Fixes tailscale/corp#24510 Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
2025-01-07all: fix golangci-lint errorsWill Norris8-13/+13
These erroneously blocked a recent PR, which I fixed by simply re-running CI. But we might as well fix them anyway. These are mostly `printf` to `print` and a couple of `!=` to `!Equal()` Updates #cleanup Signed-off-by: Will Norris <will@tailscale.com>
2025-01-07net/netmon: remove extra panic guard around ParseRIBJames Tucker1-12/+1
This was an extra defense added for #14201 that is no longer required. Fixes #14201 Signed-off-by: James Tucker <james@tailscale.com>
2025-01-07go.mod: bump tailscale/wireguard-go for Solaris/IllumosBrad Fitzpatrick2-3/+3
Updates #14565 Change-Id: Ifb88ab2ee1997c00c3d4316be04f6f4cc71b2cd3 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-07wgengine/magicsock: refactor maybeRebindOnErrorJames Tucker4-65/+95
Remove the platform specificity, it is unnecessary complexity. Deduplicate repeated code as a result of reduced complexity. Split out error identification code. Update call-sites and tests. Updates #14551 Updates tailscale/corp#25648 Signed-off-by: James Tucker <james@tailscale.com>
2025-01-07controlclient: do not set HTTPS port for any private coordination server IP ↵Andrea Gottardo2-6/+140
(#14564) Fixes tailscale/tailscale#14563 When creating a NoiseClient, ensure that if any private IP address is provided, with both an `http` scheme and an explicit port number, we do not ever attempt to use HTTPS. We were only handling the case of `127.0.0.1` and `localhost`, but `192.168.x.y` is a private IP as well. This uses the `netip` package to check and adds some logging in case we ever need to troubleshoot this. Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2025-01-07wgengine/magicsock: rebind on EPIPE/ECONNRESETJames Tucker3-29/+61
Observed in the wild some macOS machines gain broken sockets coming out of sleep (we observe "time jumped", followed by EPIPE on sendto). The cause of this in the platform is unclear, but the fix is clear: always rebind if the socket is broken. This can also be created artificially on Linux via `ss -K`, and other conditions or software on a system could also lead to the same outcomes. Updates tailscale/corp#25648 Signed-off-by: James Tucker <james@tailscale.com>
2025-01-07cmd/derper: improve logging on derp mesh connectJames Tucker1-3/+7
Include the mesh log prefix in all mesh connection setup. Updates tailscale/corp#25653 Signed-off-by: James Tucker <james@tailscale.com>
2025-01-07go.mod: bump github.com/tailscale/peercred for SolarisBrad Fitzpatrick2-6/+6
This pulls in Solaris/Illumos-specific: https://github.com/tailscale/peercred/pull/10 https://go-review.googlesource.com/c/sys/+/639755 Updates tailscale/peercred#10 (from @nshalman) Change-Id: I8211035fdcf84417009da352927149d68905c0f1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-06cmd/systray: add cmd/systray back as a small client/systray wrapperWill Norris1-0/+15
Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2025-01-06client/systray: move cmd/systray to client/systrayWill Norris2-5/+5
Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2025-01-06ipn/ipnlocal: move where auto exit node selection happensBrad Fitzpatrick2-33/+84
In the process, because I needed it for testing, make all LocalBackend-managed goroutines be accounted for. And then in tests, verify they're no longer running during LocalBackend.Shutdown. Updates tailscale/corp#19681 Change-Id: Iad873d4df7d30103a4a7863dfacf9e078c77e6a3 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-06ipn/ipnlocal, util/goroutines: track goroutines for tests, shutdownBrad Fitzpatrick3-14/+118
Updates #14520 Updates #14517 (in that I pulled this out of there) Change-Id: Ibc28162816e083fcadf550586c06805c76e378fc Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-06tailcfg: remove unused User fieldsBrad Fitzpatrick5-33/+20
Fixes #14542 Change-Id: Ifeb0f90c570c1b555af761161f79df75f18ae3f9 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-06cmd/tailscale/cli: fix TestUpdatePrefs on macOSBrad Fitzpatrick1-1/+1
It was failing about an unaccepted risk ("mac-app-connector") because it was checking runtime.GOOS ("darwin") instead of the test's env.goos string value ("linux", which doesn't have the warning). Fixes #14544 Change-Id: I470d86a6ad4bb18e1dd99d334538e56556147835 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-06tailcfg: flesh out docsBrad Fitzpatrick3-18/+65
Updates #cleanup Updates #14542 Change-Id: I41f7ce69d43032e0ba3c866d9c89d2a7eccbf090 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-04ipn: declare NotifyWatchOpt consts without using iotaBrad Fitzpatrick1-9/+15
Updates #cleanup Updates #1909 (noticed while working on that) Change-Id: I505001e5294287ad2a937b4db61d9e67de70fa14 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-04Fix various linting, vet & static check issuesMarc Paquette4-5/+7
Fixes #14492 ----- Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Change-Id: I6dc1068d34bbfa7477e7b7a56a4325b3868c92e1 Signed-off-by: Marc Paquette <marcphilippaquette@gmail.com>
2025-01-04Update README to reference correct Commit Style URLMarc Paquette1-1/+1
Change-Id: I2981c685a8905ad58536a8d9b01511d04c3017d1 Signed-off-by: Marc Paquette <marcphilippaquette@gmail.com>
2025-01-04ipn: convert ServeConfig Range methods to iteratorsBrad Fitzpatrick2-30/+32
These were the last two Range funcs in this repo. Updates #12912 Change-Id: I6ba0a911933cb5fc4e43697a9aac58a8035f9622 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-04types/views: remove various Map Range funcs; use iterators everywhereBrad Fitzpatrick2-86/+45
The remaining range funcs in the tree are RangeOverTCPs and RangeOverWebs in ServeConfig; those will be cleaned up separately. Updates #12912 Change-Id: Ieeae4864ab088877263c36b805f77aa8e6be938d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-04all: use iterators in more places instead of Range funcsBrad Fitzpatrick7-50/+33
And misc cleanup along the way. Updates #12912 Change-Id: I0cab148b49efc668c6f5cdf09c740b84a713e388 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-03go.mod: update github.com/go-json-experiment/json (#14522)Joe Tsai2-3/+3
Updates tailscale/corp#11038 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2025-01-03control/controlclient: remove optimization that was more convoluted than usefulBrad Fitzpatrick2-51/+30
While working on #13390, I ran across this non-idiomatic pointer-to-view and parallel-sorted-map accounting code that was all just to avoid a sort later. But the sort later when building a new netmap.NetworkMap is already a drop in the bucket of CPU compared to how much work & allocs mapSession.netmap and LocalBackend's spamming of the full netmap (potentially tens of thousands of peers, MBs of JSON) out to IPNBus clients for any tiny little change (node changing online status, etc). Removing the parallel sorted slice let everything be simpler to reason about, so this does that. The sort might take a bit more CPU time now in theory, but in practice for any netmap size for which it'd matter, the quadratic netmap IPN bus spam (which we need to fix soon) will overshadow that little sort. Updates #13390 Updates #1909 Change-Id: I3092d7c67dc10b2a0f141496fe0e7e98ccc07712 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-03util/slicesx: add MapKeys and MapValues from golang.org/x/exp/mapsBrad Fitzpatrick17-41/+76
Importing the ~deprecated golang.org/x/exp/maps as "xmaps" to not shadow the std "maps" was getting ugly. And using slices.Collect on an iterator is verbose & allocates more. So copy (x)maps.Keys+Values into our slicesx package instead. Updates #cleanup Updates #12912 Updates #14514 (pulled out of that change) Change-Id: I5e68d12729934de93cf4a9cd87c367645f86123a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-03wgengine/router: refactor udm-pro into broader ubnt supportJason Barnett3-56/+17
Fixes #14453 Signed-off-by: Jason Barnett <J@sonBarnett.com>
2025-01-03ipn/ipnlocal: use context.CancelFunc type for doc clarityBrad Fitzpatrick1-1/+1
Using context.CancelFunc as the type (instead of func()) answers questions like whether it's okay to call it multiple times, whether it blocks, etc. And that's the type it actually is in this case. Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-03ipn: update reference to Notify's Swift definitionBrad Fitzpatrick1-1/+1
Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-12-31all: add means to set device posture attributes from nodeBrad Fitzpatrick5-2/+125
Updates tailscale/corp#24690 Updates #4077 Change-Id: I05fe799beb1d2a71d1ec3ae08744cc68bcadae2a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-12-30scripts/install.sh: add special case for Parrot Security (#14487)Erisa A1-0/+8
Their `os-release` doesn't follow convention. Fixes #10778 Signed-off-by: Erisa A <erisa@tailscale.com>
2024-12-27cmd/systray: properly set tooltip on different platformsWill Norris1-5/+15
On Linux, systray.SetTitle actually seems to set the tooltip on all desktops I've tested on. But on macOS, it actually does set a title that is always displayed in the systray area next to the icon. This change should properly set the tooltip across platforms. Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2024-12-27cmd/systray: update state management and initializationWill Norris1-92/+128
Move a number of global state vars into the Menu struct, keeping things better encapsulated. The systray package still relies on its own global state, so only a single Menu instance can run at a time. Move a lot of the initialization logic out of onReady, in particular fetching the latest tailscale state. Instead, populate the state before calling systray.Run, which fixes a timing issue in GNOME (#14477). This change also creates a separate bgContext for actions not tied menu item clicks. Because we have to rebuild the entire menu regularly, we cancel that context as needed, which can cancel subsequent updateState calls. Also exit cleanly on SIGINT and SIGTERM. Updates #1708 Fixes #14477 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2024-12-23cmd/systray: set app icon and title consistentlyWill Norris2-37/+50
Refactor code to set app icon and title as part of rebuild, rather than separately in eventLoop. This fixes several cases where they weren't getting updated properly. This change also makes use of the new exit node icons. Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2024-12-23cmd/systray: add icons for exit node online and offlineWill Norris1-44/+133
restructure tsLogo to allow setting a mask to be used when drawing the logo dots, as well as add an overlay icon, such as the arrow when connected to an exit node. The icon is still renders as white on black, but this change also prepare for doing a black on white version, as well a fully transparent icon. I don't know if we can consistently determine which to use, so this just keeps the single icon for now. Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2024-12-23metrics,syncs: add ShardedInt support to metrics.LabelMapJames Tucker3-0/+46
metrics.LabelMap grows slightly more heavy, needing a lock to ensure proper ordering for newly initialized ShardedInt values. An Add method enables callers to use .Add for both expvar.Int and syncs.ShardedInt values, but retains the original behavior of defaulting to initializing expvar.Int values. Updates tailscale/corp#25450 Co-Authored-By: Andrew Dunham <andrew@du.nham.ca> Signed-off-by: James Tucker <james@tailscale.com>
2024-12-23scripts/installer.sh: allow CachyOS for Arch packages (#14464)Erisa A1-1/+1
Fixes #13955 Signed-off-by: Erisa A <erisa@tailscale.com>
2024-12-23cmd/systray: rebuild menu on pref change, assorted other fixesWill Norris1-39/+52
- rebuild menu when prefs change outside of systray, such as setting an exit node - refactor onClick handler code - compare lowercase country name, the same as macOS and Windows (now sorts Ukraine before USA) - fix "connected / disconnected" menu items on stopped status - prevent nil pointer on "This Device" menu item Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2024-12-23scripts/installer.sh: accept different capitalisation of deepin (#14463)Erisa A1-1/+1
Newer Deepin Linux versions use `deepin` as their ID, older ones used `Deepin`. Fixes #13570 Signed-off-by: Erisa A <erisa@tailscale.com>
2024-12-23util/stringsx: add package for extra string functions, like CompareFoldBrad Fitzpatrick2-0/+130
Noted as useful during review of #14448. Updates #14457 Change-Id: I0f16f08d5b05a8e9044b19ef6c02d3dab497f131 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-12-23.github: update matrix of installer.sh tests (#14462)Erisa A1-7/+4
Remove EOL Ubuntu versions. Add new Ubuntu LTS. Update Alpine to test latest version. Also, make the test run when its workflow is updated and installer.sh isn't. Updates #cleanup Signed-off-by: Erisa A <erisa@tailscale.com>
2024-12-23scripts/installer.sh: add support for PikaOS (#14461)Erisa A1-0/+13
Fixes #14460 Signed-off-by: Erisa A <erisa@tailscale.com>