summaryrefslogtreecommitdiffhomepage
path: root/paths
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10all: detect JetKVM and specialize a handful of things for itBrad Fitzpatrick2-0/+35
Updates #16524 Change-Id: I183428de8c65d7155d82979d2d33f031c22e3331 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-01-09all: illumos/solaris userspace only supportNahum Shalman1-1/+1
Updates #14565 Change-Id: I743148144938794db0a224873ce76c10dbe6fa5f Signed-off-by: Nahum Shalman <nahamu@gmail.com>
2024-04-16all: use Go 1.22 range-over-intBrad Fitzpatrick1-1/+1
Updates #11058 Change-Id: I35e7ef9b90e83cac04ca93fd964ad00ed5b48430 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-04-13paths: set default state path on AIXBrad Fitzpatrick1-0/+2
Updates #11361 Change-Id: I196727a540be6b7c75303f9958490b1d76189fd6 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-09-07safesocket, paths: add Plan 9 supportSkip Tavakkolian1-0/+3
Updates #5794 Change-Id: I69150ec18d101f55baabb38613512cde858447cb Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com> Signed-off-by: Skip Tavakkolian <skip.tavakkolian@gmail.com>
2023-08-30adjust build tags for tamagoAndrea Barisani1-1/+1
Signed-off-by: Andrea Barisani <andrea@inversepath.com>
2023-08-24paths: remove wasm file, no-op stubs, make OS-specific funcs consistentBrad Fitzpatrick4-27/+28
Some OS-specific funcs were defined in init. Another used build tags and required all other OSes to stub it out. Another one could just be in the portable file. Simplify it a bit, removing a file and some stubs in the process. Updates #5794 Change-Id: I51df8772cc60a9335ac4c1dc0ab59b8a0d236961 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-06-11all: adjust some build tags for wasiBrad Fitzpatrick2-1/+1
A start. Updates #8320 Change-Id: I64057f977be51ba63ce635c56d67de7ecec415d1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-01-27all: update copyright and license headersWill Norris5-15/+10
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>
2022-12-02paths: set QNAP socket to /tmp.Denton Gentry1-0/+2
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2022-12-02paths, version/distro: detect Synology DSM version better, use for socket pathBrad Fitzpatrick1-8/+4
Resolves a TODO in the code noted while discussing QNAP defaults. Tested on DSM6 and DSM7. Change-Id: Icce03ff41fafd7b3a358cfee16f2ed13d5cc3c5d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-11-30all: use named pipes on windowsMaisem Ali1-1/+1
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-11-04all: remove old +build tagsBrad Fitzpatrick1-1/+0
The //go:build syntax was introduced in Go 1.17: https://go.dev/doc/go1.17#build-lines gofmt has kept the +build and go:build lines in sync since then, but enough time has passed. Time to remove them. Done with: perl -i -npe 's,^// \+build.*\n,,' $(git grep -l -F '+build') Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-09-29all: fix spelling mistakesJosh Soref1-1/+1
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-08-04all: use syncs.AtomicValueMaisem Ali1-2/+2
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>
2022-08-02all: gofmt for Go 1.19Brad Fitzpatrick2-10/+13
Updates #5210 Change-Id: Ib02cd5e43d0a8db60c1f09755a8ac7b140b670be Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-05-27net/dns, paths, util/winutil: change net/dns/windowsManager NRPT management ↵Aaron Klotz1-58/+2
to support more than 50 domains. AFAICT this isn't documented on MSDN, but based on the issue referenced below, NRPT rules are not working when a rule specifies > 50 domains. This patch modifies our NRPT rule generator to split the list of domains into chunks as necessary, and write a separate rule for each chunk. For compatibility reasons, we continue to use the hard-coded rule ID, but as additional rules are required, we generate new GUIDs. Those GUIDs are stored under the Tailscale registry path so that we know which rules are ours. I made some changes to winutils to add additional helper functions in support of both the code and its test: I added additional registry accessors, and also moved some token accessors from paths to util/winutil. Fixes https://github.com/tailscale/coral/issues/63 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2022-03-01cmd/tailscaled: default to userspace-networking mode on gokrazy, set pathsBrad Fitzpatrick2-1/+8
One of the current few steps to run Tailscale on gokrazy is to specify the --tun=userspace-networking flag: https://gokrazy.org/userguide/install/tailscale/ Instead, make it the default for now. Later we can change the default to kernel mode if available and fall back to userspace mode like Synology, once #391 is done. Likewise, set default paths for Gokrazy, as its filesystem hierarchy is not the Linux standard one. Instead, use the conventional paths as documented at https://gokrazy.org/userguide/install/tailscale/. Updates #1866 RELNOTE=default to userspace-networking mode on gokrazy Change-Id: I3766159a294738597b4b30629d2860312dbb7609 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-12-15all: gofmt -w -s (simplify) testsBrad Fitzpatrick1-2/+2
And it updates the build tag style on a couple files. Change-Id: I84478d822c8de3f84b56fa1176c99d2ea5083237 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-11-07paths: add missing js/wasm stubBrad Fitzpatrick1-0/+2
Change-Id: Iae4838f5fa1dc0cd491d5a3ac906fd3cdacb173c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-10-20all: fix some js/wasm compilation issuesBrad Fitzpatrick2-2/+11
Change-Id: I05a3a4835e225a1e413ec3540a7c7e4a2d477084 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-10-18ipn/ipnserver paths: add paths.LegacyStateFilePathAaron Klotz2-0/+11
Moving this information into a centralized place so that it is accessible to code in subsequent commits. Updates #3011 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2021-09-27paths: skip unix chmod if state directory is already 0700Brad Fitzpatrick1-4/+16
Updates #2934 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-09-24ipn, paths: unconditionally attempt to set state dir perms, but only if the ↵Aaron Klotz2-5/+10
state dir is ours We unconditionally set appropriate perms on the statefile dir. We look at the basename of the statefile dir, and if it is "tailscale", then we set perms as appropriate. Fixes #2925 Updates #2856 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2021-09-22ipn, paths: ensure that the state directory for Windows has the correct permsAaron Klotz4-1/+169
ProgramData has a permissive ACL. For us to safely store machine-wide state information, we must set a more restrictive ACL on our state directory. We set the ACL so that only talescaled's user (ie, LocalSystem) and the Administrators group may access our directory. We must include Administrators to ensure that logs continue to be easily accessible; omitting that group would force users to use special tools to log in interactively as LocalSystem, which is not ideal. (Note that the ACL we apply matches the ACL that was used for LocalSystem's AppData\Local). There are two cases where we need to reset perms: One is during migration from the old location to the new. The second case is for clean installations where we are creating the file store for the first time. Updates #2856 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2021-09-20logpolicy: don't use C:\ProgramData use for tailscale-ipn GUI's log dirBrad Fitzpatrick1-6/+7
tailscale-ipn.exe (the GUI) shouldn't use C:\ProgramData. Also, migrate the earlier misnamed wg32/wg64 conf files if they're present. (That was stopped in 2db877caa332c8968ee1b1eb08ef40a219ff3eec, but the files exist from fresh 1.14 installs) Updates #2856 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-09-19ipn/ipnserver, paths, logpolicy: move Window config files out of %LocalAppData%Denton Gentry2-1/+55
C:\WINDOWS\system32\config\systemprofile\AppData\Local\ is frequently cleared for almost any reason: Windows updates, System Restore, even various System Cleaner utilities. The server-state.conf file in AppData\Local could be deleted at any time, which would break login until the node is removed from the Admin Panel allowing it to create a new key. Carefully copy any AppData state to ProgramData at startup. If copying the state fails, continue to use AppData so at least there will be connectivity. If there is no state, use ProgramData. We also migrate the log.conf file. Very old versions of Tailscale named the EXE tailscale-ipn, so the log conf was tailscale-ipn.log.conf and more recent versions preserved this filename and cmdName in logs. In this migration we always update the filename to c:\ProgramData\Tailscale\tailscaled.log.conf Updates https://github.com/tailscale/tailscale/issues/2856 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-08-05all: gofmt with Go 1.17Josh Bleecher Snyder1-0/+1
This adds "//go:build" lines and tidies up existing "// +build" lines. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-06-03cmd/tailscale/web: restrict web access to synology admins.Maisem Ali1-5/+11
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-05-24paths: generalize IOSSharedDir to cover AndroidElias Naur1-2/+2
Also fix an error message while here. Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-05-03paths: add synology socket pathDavid Crawshaw1-0/+7
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2021-04-07ipn, paths, cmd/tailscaled: remove LegacyConfigPath, relaynode migrationBrad Fitzpatrick1-10/+0
It is time. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-31ipn/ipnlocal: make peerapi work on iOS againBrad Fitzpatrick1-0/+5
It didn't have a storage directory. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-30paths: fall back to XDG_DATA_HOME for non-root users' state dirBrad Fitzpatrick1-4/+14
So peerapi has a default state directory, mostly for netstack mode testing. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-02-13paths: update some default paths for darwinBrad Fitzpatrick2-0/+5
2021-02-05cmd/tailscaled: move more of the Windows server setup code into tailscaledBrad Fitzpatrick1-0/+4
Updates #1232
2020-07-13paths, cmd/tailscaled: on Windows, don't try to migrate from legacy relay.confBrad Fitzpatrick1-3/+9
Avoids confusing logspam on Windows.
2020-03-03paths: use /var/db for state on BSDs, and /var/run for sockets.David Anderson2-6/+21
On BSD, /var/db is what linux calls /var/lib. On modern linux, /run and /var/run are the same directory, but on BSD the correct path is /var/run, so use that. Fixes #79 Signed-off-by: David Anderson <dave@natulte.net>
2020-03-03paths: remove some debug logging I left inBrad Fitzpatrick1-2/+0
2020-03-03cmd/tailscale, cmd/tailscaled, paths: add paths package for default pathsBrad Fitzpatrick2-0/+77
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>