You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Jonathan Nobels 643e91f2eb
net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428)
fixes tailscale/tailscale#18418

Both Serve and PeerAPI broke when we moved the TailscaleInterfaceName
into State, which is updated asynchronously and may not be
available when we configure the listeners.

This extracts the explicit interface name property from netmon.State
and adds as a static struct with getters that have proper error
handling.

The bug is only found in sandboxed Darwin clients, where we
need to know the Tailscale interface details in order to set up the
listeners correctly (they must bind to our interface explicitly to escape
the network sandboxing that is applied by NECP).

Currently set only sandboxed macOS and Plan9 set this but it will
also be useful on Windows to simplify interface filtering in netns.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
17 hours ago
.bencher bencher: add config to suppress failures on benchmark regressions. 4 years ago
.github .github/workflows: double the timeout for golangci-lint (#18404) 3 days ago
appc appc,feature: add the start of new conn25 app connector 1 month ago
atomicfile all: rename variables with lowercase-l/uppercase-I 2 months ago
chirp all: rename variables with lowercase-l/uppercase-I 2 months ago
client client/local: add method to set gauge metric to a value 1 month ago
clientupdate cmd/distsign: add CLI for verifying package signatures (#18239) 1 week ago
cmd net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 17 hours ago
control cleanup: fix typos across multiple files 2 months ago
derp derp/derpserver: add a unique sender cardinality estimate 2 months ago
disco disco: add missing message types to MessageSummary (#17081) 4 months ago
docs docs/windows/policy: use a separate value to track the configuration state of EnableDNSRegistration 18 hours ago
doctor all: remove non-applicable "linux" deps on Android 8 months ago
drive all: rename variables with lowercase-l/uppercase-I 2 months ago
envknob syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2 months ago
feature cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
gokrazy go.toolchain.rev: update to Go 1.25.5 (#18123) 1 month ago
health ipn/ipnlocal: use an in-memory TKA store if FS is unavailable 2 months ago
hostinfo hostinfo, ipnlocal: add optional os-specific callback for querying the hostname (#15647) 9 months ago
internal cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
ipn net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 17 hours ago
jsondb all: update copyright and license headers 3 years ago
k8s-operator k8s-operator,kube: allowing k8s api request events to be enabled via grants (#18393) 23 hours ago
kube k8s-operator,kube: allowing k8s api request events to be enabled via grants (#18393) 23 hours ago
licenses net/portmapper, go.mod: unfork our goupnp dependency 1 week ago
log all: rename variables with lowercase-l/uppercase-I 2 months ago
logpolicy all: rename variables with lowercase-l/uppercase-I 2 months ago
logtail net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
maths maths: add exponentially weighted moving average type 11 months ago
metrics metrics: add a NewSet and Set.NewLabelMap helpers 4 days ago
net net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 17 hours ago
omit cmd/tailscaled, ipn/conffile: support ec2 user-data config file 2 years ago
packages/deb all: rename variables with lowercase-l/uppercase-I 2 months ago
paths all: detect JetKVM and specialize a handful of things for it 6 months ago
portlist portlist: skip tests on Linux 6.14.x with /proc/net/tcp bug (#18185) 1 month ago
posture util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 5 months ago
prober all: rename variables with lowercase-l/uppercase-I 2 months ago
proxymap syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2 months ago
release all: use Go 1.20's errors.Join instead of our multierr package 4 months ago
safesocket ipn/ipnauth, safesocket: defer named pipe client's token retrieval until ipnserver needs it 4 weeks ago
safeweb safeweb: Set Cross-Origin-Opener-Policy for browser requests (#15936) 8 months ago
scripts scripts/installer.sh: add ultramarine to supported OS list 2 weeks ago
sessionrecording sessionrecording: fix regression in recent http2 package change 3 months ago
ssh/tailssh ssh/tailssh: send audit messages on SSH login (Linux) 2 weeks ago
syncs syncs: add means of declare locking assumptions for debug mode validation 2 months ago
tailcfg tailcfg, control/controlclient: start moving MapResponse.DefaultAutoUpdate to a nodeattr 2 months ago
tempfork feature/c2n: move answerC2N code + deps out of control/controlclient 3 months ago
tka tka: add some more tests for Bootstrap() 1 month ago
tool tool/gocross: update gocross-wrapper.ps1 to use absolute path for resolving tar 2 days ago
tsconsensus tsconsensus: skip integration tests in CI 2 months ago
tsconst health: compare warnable codes to avoid errors on release branch (#17637) 3 months ago
tsd cmd/tailscale,ipn: add Unix socket support for serve 1 month ago
tsnet tsnet: allow for automatic ID token generation 3 days ago
tstest net/portmapper, go.mod: unfork our goupnp dependency 1 week ago
tstime tstime: add GoDuration which JSON serializes with time.Duration.String (#15726) 9 months ago
tsweb tsweb: add Unwrap to loggingResponseWriter for ResponseController (#18195) 1 month ago
types ipn,ipn/local: always accept routes for Tailscale Services (cgnat range) (#18173) 3 days ago
util feature/featuretags: make QR codes modular (#18358) 1 week ago
version clientupdate, util/osshare, util/winutil, version: improve Windows GUI filename resolution and WinUI build awareness 3 months ago
wf all: rename variables with lowercase-l/uppercase-I 2 months ago
wgengine ipn,ipn/local: always accept routes for Tailscale Services (cgnat range) (#18173) 3 days ago
wif cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
words words: 33 tails and 26 scales (#18213) 1 month ago
.gitattributes .: add .gitattributes entry to use Go hunk-header driver 4 years ago
.gitignore cmd/k8s-operator: Add NOTES.txt to Helm chart (#16364) 7 months ago
.golangci.yml .github: Bump golangci/golangci-lint-action from 6.5.0 to 7.0.0 (#15476) 9 months ago
ALPINE.txt docker: bump alpine v3.19 -> 3.22 (#17155) 4 months ago
AUTHORS Move Linux client & common packages into a public repo. 6 years ago
CODEOWNERS CODEOWNERS: add the start of an owners file 2 years ago
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md: update code of conduct 3 months ago
Dockerfile .github/workfkows,Dockerfile,Dockerfile.base: add a test for base image (#18180) 1 month ago
Dockerfile.base .github/workfkows,Dockerfile,Dockerfile.base: add a test for base image (#18180) 1 month ago
LICENSE all: update tools that manage copyright headers 3 years ago
Makefile Makefile, cmd/*/depaware.txt: split out vendor packages explicitly 4 months ago
PATENTS Move Linux client & common packages into a public repo. 6 years ago
README.md README: update the version of Go in the README 4 months ago
SECURITY.md Add a SECURITY.md for vulnerability reports. 6 years ago
VERSION.txt VERSION.txt: this is v1.95.0 (#18414) 3 days ago
api.md {api.md,publicapi}: remove old API docs (#13468) 1 year ago
assert_ts_toolchain_match.go tailscaleroot: panic if tailscale_go build tag but Go toolchain mismatch 1 year ago
build_dist.sh build_dist.sh: keep --extra-small making a usable build, add --min 3 months ago
build_docker.sh build_docker.sh: support including extra files (#17405) 4 months ago
flake.lock .github/Makefile/flake: update nix flake support (#16636) 5 months ago
flake.nix cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
go.mod cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
go.mod.sri cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
go.sum cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
go.toolchain.branch go.toolchain.branch: bump to go1.25 (#16954) 5 months ago
go.toolchain.rev go.toolchain.rev: update to Go 1.25.5 (#18123) 1 month ago
go.toolchain.rev.sri go.toolchain.rev: update to Go 1.25.5 (#18123) 1 month ago
go.toolchain.version go.toolchain.rev: update to Go 1.25.5 (#18123) 1 month ago
gomod_test.go go.mod: add test that replace directives aren't added in oss 2 years ago
header.txt cmd/k8s-operator: operator can create subnetrouter (#9505) 2 years ago
license_test.go wgengine/router{,/osrouter}: split OS router implementations into subpackage 4 months ago
pkgdoc_test.go all: skip looking for package comments in .git/ repository (#15384) 10 months ago
pull-toolchain.sh flake.nix: update Nix to use tailscale/go 1.25.2 (#17500) 3 months ago
shell.nix cmd,feature: add identity token auto generation for workload identity (#18373) 3 days ago
staticcheck.conf all: cleanup unused code, part 2 (#10670) 2 years ago
update-flake.sh flake.nix: update Nix to use tailscale/go 1.25.2 (#17500) 3 months ago
version-embed.go Fix various linting, vet & static check issues 1 year ago
version_tailscale_test.go tailscaleroot: panic if tailscale_go build tag but Go toolchain mismatch 1 year ago
version_test.go .github/workflows: test that ./go/tool version matches go mod version 7 months ago

README.md

Tailscale

https://tailscale.com

Private WireGuard® networks made easy

Overview

This repository contains the majority of Tailscale's open source code. Notably, it includes the tailscaled daemon and the tailscale CLI tool. The tailscaled daemon runs on Linux, Windows, macOS, and to varying degrees on FreeBSD and OpenBSD. The Tailscale iOS and Android apps use this repo's code, but this repo doesn't contain the mobile GUI code.

Other Tailscale repos of note:

For background on which parts of Tailscale are open source and why, see https://tailscale.com/opensource/.

Using

We serve packages for a variety of distros and platforms at https://pkgs.tailscale.com.

Other clients

The macOS, iOS, and Windows clients use the code in this repository but additionally include small GUI wrappers. The GUI wrappers on non-open source platforms are themselves not open source.

Building

We always require the latest Go release, currently Go 1.25. (While we build releases with our Go fork, its use is not required.)

go install tailscale.com/cmd/tailscale{,d}

If you're packaging Tailscale for distribution, use build_dist.sh instead, to burn commit IDs and version info into the binaries:

./build_dist.sh tailscale.com/cmd/tailscale
./build_dist.sh tailscale.com/cmd/tailscaled

If your distro has conventions that preclude the use of build_dist.sh, please do the equivalent of what it does in your distro's way, so that bug reports contain useful version information.

Bugs

Please file any issues about this code or the hosted service on the issue tracker.

Contributing

PRs welcome! But please file bugs. Commit messages should reference bugs.

We require Developer Certificate of Origin Signed-off-by lines in commits.

See commit-messages.md (or skim git log) for our commit message style.

About Us

Tailscale is primarily developed by the people at https://github.com/orgs/tailscale/people. For other contributors, see:

WireGuard is a registered trademark of Jason A. Donenfeld.