tailscale.comtailscale.com/paths Index | Files

package paths

import "tailscale.com/paths"

Package paths returns platform and user-specific default paths to Tailscale files and directories.

Index

Variables

var AppSharedDir syncs.AtomicValue[string]

AppSharedDir is a string set by the iOS or Android app on start containing a directory we can read/write in.

Functions

func DefaultTailscaledSocket

func DefaultTailscaledSocket() string

DefaultTailscaledSocket returns the path to the tailscaled Unix socket or the empty string if there's no reasonable default.

func DefaultTailscaledStateFile

func DefaultTailscaledStateFile() string

DefaultTailscaledStateFile returns the default path to the tailscaled state file, or the empty string if there's no reasonable default value.

func LegacyStateFilePath

func LegacyStateFilePath() string

LegacyStateFilePath returns the legacy path to the state file when it was stored under the current user's %LocalAppData%.

It is only called on Windows.

func MkStateDir

func MkStateDir(dirPath string) error

MkStateDir ensures that dirPath, the daemon's configuration directory containing machine keys etc, both exists and has the correct permissions. We want it to only be accessible to the user the daemon is running under.

func TryConfigFileMigration

func TryConfigFileMigration(logf logger.Logf, oldFile, newFile string) string

TryConfigFileMigration carefully copies the contents of oldFile to newFile, returning the path which should be used to read the config.

Source Files

migrate.go paths.go paths_unix.go

Version
v1.84.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
1 day ago

Tools for package owners.