summaryrefslogtreecommitdiffhomepage
path: root/version/prop.go
AgeCommit message (Collapse)AuthorFilesLines
2026-01-23all: remove AUTHORS file and references to itWill Norris1-1/+1
This file was never truly necessary and has never actually been used in the history of Tailscale's open source releases. A Brief History of AUTHORS files --- The AUTHORS file was a pattern developed at Google, originally for Chromium, then adopted by Go and a bunch of other projects. The problem was that Chromium originally had a copyright line only recognizing Google as the copyright holder. Because Google (and most open source projects) do not require copyright assignemnt for contributions, each contributor maintains their copyright. Some large corporate contributors then tried to add their own name to the copyright line in the LICENSE file or in file headers. This quickly becomes unwieldy, and puts a tremendous burden on anyone building on top of Chromium, since the license requires that they keep all copyright lines intact. The compromise was to create an AUTHORS file that would list all of the copyright holders. The LICENSE file and source file headers would then include that list by reference, listing the copyright holder as "The Chromium Authors". This also become cumbersome to simply keep the file up to date with a high rate of new contributors. Plus it's not always obvious who the copyright holder is. Sometimes it is the individual making the contribution, but many times it may be their employer. There is no way for the proejct maintainer to know. Eventually, Google changed their policy to no longer recommend trying to keep the AUTHORS file up to date proactively, and instead to only add to it when requested: https://opensource.google/docs/releasing/authors. They are also clear that: > Adding contributors to the AUTHORS file is entirely within the > project's discretion and has no implications for copyright ownership. It was primarily added to appease a small number of large contributors that insisted that they be recognized as copyright holders (which was entirely their right to do). But it's not truly necessary, and not even the most accurate way of identifying contributors and/or copyright holders. In practice, we've never added anyone to our AUTHORS file. It only lists Tailscale, so it's not really serving any purpose. It also causes confusion because Tailscalars put the "Tailscale Inc & AUTHORS" header in other open source repos which don't actually have an AUTHORS file, so it's ambiguous what that means. Instead, we just acknowledge that the contributors to Tailscale (whoever they are) are copyright holders for their individual contributions. We also have the benefit of using the DCO (developercertificate.org) which provides some additional certification of their right to make the contribution. The source file changes were purely mechanical with: git ls-files | xargs sed -i -e 's/\(Tailscale Inc &\) AUTHORS/\1 contributors/g' Updates #cleanup Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2026-01-20version: add support for reporting the mac variant from tailscale --version ↵Jonathan Nobels1-7/+74
(#18462) fixes tailscale/corp#27182 tailscale version --json now includes an osVariant field that will report one of macsys, appstore or darwin. We can extend this to other platforms where tailscaled can have multiple personalities. This also adds the concept of a platform-specific callback for querying an explicit application identifier. On Apple, we can use CFBundleGetIdentifier(mainBundle) to get the bundle identifier via cgo. This removes all the ambiguity and lets us remove other less direct methods (like env vars, locations, etc). Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2025-10-10clientupdate, util/osshare, util/winutil, version: improve Windows GUI ↵Aaron Klotz1-1/+3
filename resolution and WinUI build awareness On Windows arm64 we are going to need to ship two different GUI builds; one for Win10 (GOARCH=386) and one for Win11 (GOARCH=amd64, tags += winui). Due to quirks in MSI packaging, they cannot both share the same filename. This requires some fixes in places where we have hardcoded "tailscale-ipn" as the GUI filename. We also do some cleanup in clientupdate to ensure that autoupdates will continue to work correctly with the temporary "-winui" package variant. Fixes #17480 Updates https://github.com/tailscale/corp/issues/29940 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2025-03-11safesocket, version: fix safesocket_darwin behavior for cmd/tailscale (#15275)Jonathan Nobels1-16/+26
fixes tailscale/tailscale#15269 Fixes the various CLIs for all of the various flavors of tailscaled on darwin. The logic in version is updated so that we have methods that return true only for the actual GUI app (which can beCLI) and the order of the checks in localTCPPortAndTokenDarwin are corrected so that the logic works with all 5 combinations of CLI and tailscaled. Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2025-01-12util/uniq,types/lazy,*: delete code that's now in Go stdBrad Fitzpatrick1-1/+2
sync.OnceValue and slices.Compact were both added in Go 1.21. cmp.Or was added in Go 1.22. Updates #8632 Updates #11058 Change-Id: I89ba4c404f40188e1f8a9566c8aaa049be377754 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-05-16version: add GitCommitTime to MetaMaisem Ali1-0/+4
Updates tailscale/corp#1297 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2024-04-07net/tsdial: partially fix "tailscale nc" (UserDial) on macOSBrad Fitzpatrick1-0/+9
At least in the case of dialing a Tailscale IP. Updates #4529 Change-Id: I9fd667d088a14aec4a56e23aabc2b1ffddafa3fe Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-03-19version/prop: remove IsMacAppSandboxEnabled (#11461)Andrea Gottardo1-28/+5
Fixes tailscale/corp#18441 For a few days, IsMacAppStore() has been returning `false` on App Store builds (IPN-macOS target in Xcode). I regressed this in #11369 by introducing logic to detect the sandbox by checking for the APP_SANDBOX_CONTAINER_ID environment variable. I thought that was a more robust approach instead of checking the name of the executable. However, it appears that on recent macOS versions this environment variable is no longer getting set, so we should go back to the previous logic that checks for the executable path, or HOME containing references to macsys. This PR also adds additional checks to the logic by also checking XPC_SERVICE_NAME in addition to HOME where possible. That environment variable is set inside the network extension, either macos or macsys and is good to look at if for any reason HOME is not set.
2024-03-14version,cli,safesocket: detect non-sandboxed macOS GUI (#11369)Andrea Gottardo1-2/+48
Updates ENG-2848 We can safely disable the App Sandbox for our macsys GUI, allowing us to use `tailscale ssh` and do a few other things that we've wanted to do for a while. This PR: - allows Tailscale SSH to be used from the macsys GUI binary when called from a CLI - tweaks the detection of client variants in prop.go, with new functions `IsMacSys()`, `IsMacSysApp()` and `IsMacAppSandboxEnabled()` Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2023-12-20all: cleanup unused code, part 1 (#10661)Andrew Lytvynov1-13/+13
Run `staticcheck` with `U1000` to find unused code. This cleans up about a half of it. I'll do the other half separately to keep PRs manageable. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-24cmd/tailscale/cli: set Sparkle auto-update on macsys (#9952)Andrew Lytvynov1-0/+9
On `tailscale set --auto-update`, set the Sparkle plist option for it. Also make macsys report not supporting auto-updates over c2n, since they will be triggered by Sparkle locally. Updates #755 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-20clientupdate: change Mac App Store support (#9891)Andrew Lytvynov1-11/+16
In the sandboxed app from the app store, we cannot check `/Library/Preferences/com.apple.commerce.plist` or run `softwareupdate`. We can at most print a helpful message and open the app store page. Also, reenable macsys update function to mark it as supporting c2n updates. macsys support in `tailscale update` was fixed. Updates #755 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-07-06version: fix tvOS network extension bundle identifier (#8545)Andrea Gottardo1-1/+1
Fixes #8544 and updates #8282. Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
2023-06-07version: detect tvOS by checking XPC_SERVICE_NAME (#8295)Andrea Gottardo1-0/+16
Another change needed working towards #8282. Updates https://github.com/tailscale/tailscale/issues/8282 Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
2023-02-11version: make all exported funcs compile-time constant or lazyDavid Anderson1-62/+57
Signed-off-by: David Anderson <danderson@tailscale.com>
2023-02-11version: unexport all vars, turn Short/Long into funcsDavid Anderson1-7/+7
The other formerly exported values aren't used outside the package, so just unexport them. Signed-off-by: David Anderson <danderson@tailscale.com>
2023-02-10version: undo previous "optimization", do more work lazilyDavid Anderson1-8/+100
Commit 59c254579ea63c669ffb3b5031e51288422c5194 moved a lot of work from functions that could be eliminated at compile time (because tests against runtime.GOOS are compile-time constant), into code that must always run before main(). So, revert that, and instead optimize the package only by moving the remaining string processing code behind sync.Onces. Signed-off-by: David Anderson <danderson@tailscale.com>
2023-02-10version: return correct Meta.MajorMinorPatch in non-dev buildsDavid Anderson1-2/+1
Signed-off-by: David Anderson <danderson@tailscale.com>
2023-02-06version: unify and optimize the various not-version funcsDavid Anderson1-78/+6
Signed-off-by: David Anderson <danderson@tailscale.com>
2023-01-27all: update copyright and license headersWill Norris1-3/+2
This updates all source files to use a new standard header for copyright and license declaration. Notably, copyright no longer includes a date, and we now use the standard SPDX-License-Identifier header. This commit was done almost entirely mechanically with perl, and then some minimal manual fixes. Updates #6865 Signed-off-by: Will Norris <will@tailscale.com>
2023-01-20version, cmd/tailscale: add version.Meta, tailscale version --jsonBrad Fitzpatrick1-0/+75
Add `tailscale version --json` JSON output mode. This will be used later for a double-opt-in (per node consent like Tailscale SSH + control config) to let admins do remote upgrades via `tailscale update` via a c2n call, which would then need to verify the cmd/tailscale found on disk for running tailscale update corresponds to the running tailscaled, refusing if anything looks amiss. Plus JSON output modes are just nice to have, rather than parsing unstable/fragile/obscure text formats. Updates #6995 Updates #6907 Change-Id: I7821ab7fbea4612f4b9b7bdc1be1ad1095aca71b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-11-19ipn/ipnlocal: add health warning for unstable buildsBrad Fitzpatrick1-0/+30
Like the macOS About dialog. Change-Id: Ic27f091e66e29d5eebe4e195eda97ed331d748fd Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-11-15version: make IsSandboxedMacOS handle the IPNExtension binary tooMihai Parparita1-3/+4
It was previously only invoked from the CLI, which only runs from the main .app. However, starting with #6022 we also invoke it from the network extension. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-04all: use syncs.AtomicValueMaisem Ali1-3/+4
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-08-03all: use atomic.PointerMaisem Ali1-1/+1
Also add some missing docs. Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-12-17logpolicy, ipn/ipnserver: connect to logtail via tailscaled when neededBrad Fitzpatrick1-0/+10
This is for use by the Windows GUI client to log via when an exit node is in use, so the logs don't go out via the exit node and instead go directly, like tailscaled's. The dialer tried to do that in the unprivileged GUI by binding to a specific interface, but the "Internet Kill Switch" installed by tailscaled for exit nodes precludes that from working and instead the GUI fails to dial out. So, go through tailscaled (with a CONNECT request) instead. Fixes tailscale/corp#3169 Change-Id: I17a8efdc1d4b8fed53a29d1c19995592b651b215 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-28version: add IsMacSysExt funcBrad Fitzpatrick1-1/+26
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-28version: add IsSandboxedMacOS funcBrad Fitzpatrick1-1/+16
For when we need to tweak behavior or errors as a function of which of 3 macOS Tailscale variants we're using. (more accessors coming later as needed) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-19version: simplify iOS detection now that we require Go 1.16Brad Fitzpatrick1-4/+2
See https://golang.org/doc/go1.16#darwin No need for build tag tricks anymore.
2020-11-11all: prepare for GOOS=ios in Go 1.16Brad Fitzpatrick1-5/+4
Work with either way for now on iOS (darwin/arm64 vs ios/arm64). In February when Go 1.16 comes out we'll have a universal binary for darwin/arm64 (macOS) and will drop support for Go 1.15 and its darwin/amd64 meaning iOS. (it'll mean macOS). Context: * https://tip.golang.org/doc/go1.16#darwin * https://github.com/golang/go/issues/38485 * https://github.com/golang/go/issues/42100
2020-04-01version: move runtime.OS to tailscale OS mapping func to versionBrad Fitzpatrick1-0/+12
So other code can use this without duplicating the policy.
2020-03-02version: add IsMobile funcBrad Fitzpatrick1-0/+15
And use it control/controlclient.