The easiest, most secure way to use WireGuard and 2FA.
Go to file
Brad Fitzpatrick 82cfea90ca
Some checks are pending
checklocks / checklocks (push) Waiting to run
CodeQL / Analyze (go) (push) Waiting to run
Dockerfile build / deploy (push) Waiting to run
test installer.sh / test (curl ca-certificates, kalilinux/kali-dev) (push) Waiting to run
test installer.sh / test (curl ca-certificates, kalilinux/kali-rolling) (push) Waiting to run
test installer.sh / test (curl, alpine:3.21) (push) Waiting to run
test installer.sh / test (curl, alpine:edge) (push) Waiting to run
test installer.sh / test (curl, alpine:latest) (push) Waiting to run
test installer.sh / test (curl, amazonlinux:latest) (push) Waiting to run
test installer.sh / test (curl, archlinux:latest) (push) Waiting to run
test installer.sh / test (curl, debian:oldstable-slim) (push) Waiting to run
test installer.sh / test (curl, debian:sid-slim) (push) Waiting to run
test installer.sh / test (curl, debian:stable-slim, 1.80.0) (push) Waiting to run
test installer.sh / test (curl, debian:testing-slim) (push) Waiting to run
test installer.sh / test (curl, elementary/docker:stable) (push) Waiting to run
test installer.sh / test (curl, elementary/docker:unstable) (push) Waiting to run
test installer.sh / test (curl, fedora:latest, 1.80.0) (push) Waiting to run
test installer.sh / test (curl, opensuse/leap:latest) (push) Waiting to run
test installer.sh / test (curl, opensuse/tumbleweed:latest) (push) Waiting to run
test installer.sh / test (curl, oraclelinux:8) (push) Waiting to run
test installer.sh / test (curl, oraclelinux:9) (push) Waiting to run
test installer.sh / test (curl, parrotsec/core:latest) (push) Waiting to run
test installer.sh / test (curl, rockylinux:8.7) (push) Waiting to run
test installer.sh / test (curl, rockylinux:9) (push) Waiting to run
test installer.sh / test (curl, ubuntu:20.04) (push) Waiting to run
test installer.sh / test (curl, ubuntu:22.04) (push) Waiting to run
test installer.sh / test (curl, ubuntu:24.04, 1.80.0) (push) Waiting to run
test installer.sh / test (wget, debian:oldstable-slim) (push) Waiting to run
test installer.sh / test (wget, debian:sid-slim) (push) Waiting to run
test installer.sh / notify-slack (push) Blocked by required conditions
natlab-basic / EasyEasy (push) Waiting to run
CI / gomod-cache (push) Waiting to run
CI / race-root-integration (1/4) (push) Blocked by required conditions
CI / race-root-integration (2/4) (push) Blocked by required conditions
CI / race-root-integration (3/4) (push) Blocked by required conditions
CI / race-root-integration (4/4) (push) Blocked by required conditions
CI / test (-race, amd64, 1/3) (push) Blocked by required conditions
CI / test (-race, amd64, 2/3) (push) Blocked by required conditions
CI / test (-race, amd64, 3/3) (push) Blocked by required conditions
CI / test (386) (push) Blocked by required conditions
CI / test (amd64) (push) Blocked by required conditions
CI / Windows (${{ matrix.name || matrix.shard}}) (win-bench, benchmarks) (push) Blocked by required conditions
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-1-2, 1/2) (push) Blocked by required conditions
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-2-2, 2/2) (push) Blocked by required conditions
CI / macos (push) Blocked by required conditions
CI / privileged (push) Blocked by required conditions
CI / cross (386, linux) (push) Blocked by required conditions
CI / cross (amd64, darwin) (push) Blocked by required conditions
CI / cross (amd64, freebsd) (push) Blocked by required conditions
CI / cross (amd64, openbsd) (push) Blocked by required conditions
CI / cross (amd64, windows) (push) Blocked by required conditions
CI / cross (arm, 5, linux) (push) Blocked by required conditions
CI / cross (arm, 7, linux) (push) Blocked by required conditions
CI / cross (arm64, darwin) (push) Blocked by required conditions
CI / cross (arm64, linux) (push) Blocked by required conditions
CI / cross (arm64, windows) (push) Blocked by required conditions
CI / cross (loong64, linux) (push) Blocked by required conditions
CI / ios (push) Blocked by required conditions
CI / crossmin (amd64, illumos) (push) Blocked by required conditions
CI / crossmin (amd64, plan9) (push) Blocked by required conditions
CI / crossmin (amd64, solaris) (push) Blocked by required conditions
CI / crossmin (ppc64, aix) (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / tailscale_go (push) Blocked by required conditions
CI / fuzz (push) Waiting to run
CI / depaware (push) Blocked by required conditions
CI / go_generate (push) Blocked by required conditions
CI / make_tidy (push) Blocked by required conditions
CI / licenses (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=darwin, arm64, darwin, macOS) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=linux, amd64, linux, Linux) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=windows, amd64, windows, Windows) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=1/4, amd64, linux, Portable (1/4)) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=2/4, amd64, linux, Portable (2/4)) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=3/4, amd64, linux, Portable (3/4)) (push) Blocked by required conditions
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=4/4, amd64, linux, Portable (4/4)) (push) Blocked by required conditions
CI / notify_slack (push) Blocked by required conditions
CI / merge_blocker (push) Blocked by required conditions
CI / check_mergeability_strict (push) Blocked by required conditions
CI / check_mergeability (push) Blocked by required conditions
tailscale.com/cmd/vet / vet (push) Waiting to run
all: fix JSON serialization under Go 1.27's finalized encoding/json/v2
Go 1.27 enables GOEXPERIMENT=jsonv2 by default: encoding/json is now
backed by the json/v2 machinery, and github.com/go-json-experiment/json
compiles as a thin alias of the standard library's encoding/json/v2.
Several tag options and behaviors we relied on did not make the cut for
the final Go 1.27 API, breaking tailscaled at runtime and four packages'
tests. This change adapts to the final API while keeping the wire format
byte-for-byte identical on all Go versions.

First, the `format` tag option was demoted to experimental. Its mere
presence in a struct tag now makes marshaling and unmarshaling fail at
runtime. tailcfg.SSHAction.SessionDuration had `format:nano` (added in
a2dc517d7 to pin the v1 representation), so on Go 1.27 any netmap
containing an SSH policy failed to decode, breaking every PollNetMap.
Remove the option here and in net/speedtest; time.Duration still
marshals as int64 nanoseconds under encoding/json on all Go versions
(Go 1.27's v1 mode sets FormatDurationAsNano by default), so old
clients and servers are unaffected. Add a regression test locking in
the exact wire format.

Consequently, invert the cmd/vet jsontags rule: it previously required
an explicit `format` tag on time.Duration fields, which is now exactly
wrong. It now rejects any `format` tag option, which would have caught
this bug in CI.

Second, the `inline` tag option was renamed to `embed`. The standard
library silently ignores `inline`, while the pinned go-json-experiment
module (used on Go 1.26) only knows `inline`. Specify both options in
types/prefs and logtail; each implementation ignores the option it does
not know, producing identical output. Drop `inline` once we require
Go 1.27.

Third, encoding/json (v1) now dispatches to MarshalJSONTo and
UnmarshalJSONFrom methods and its v1 options flow into nested
jsonv2.MarshalEncode calls. Types whose v1 methods deliberately
routed through jsonv2 for v2 semantics (types/opt.Value, the
types/prefs preference types) would silently change wire format
(e.g. nil slices becoming null). Pin jsonv2.DefaultOptionsV2 in
their jsonv2 methods so the representation is the same regardless
of the entry point.

Finally, json.Marshal costs one more allocation under Go 1.27,
tripping the types/logger.AsJSON alloc test. Switch its fmt.Formatter
to jsonv2.MarshalWrite with explicit v1 options, which writes directly
to the fmt.State: one allocation on both toolchains with unchanged
output. Depaware files pick up the go-json-experiment/json/v1 options
shim as a new dependency of types/logger.

With this change, go test ./... passes with both Go 1.26.5 and
go1.27rc2.

Updates #20220
Fixes #20528
Fixes #20254

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I694c7d57fd81e55a579c579e9be10032bca569d4
2026-07-19 09:58:50 -07:00
.bencher bencher: add config to suppress failures on benchmark regressions. 2021-10-01 16:16:02 -07:00
.github .github: double the timeout for go vet in CI 2026-07-16 16:05:04 +01:00
appc appc,feature/conn25: use custom scheme resolvers for conn25 2026-05-29 12:23:47 -07:00
atomicfile all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
chirp all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
client all: apply go fix 2026-07-10 17:39:16 -07:00
clientupdate cmd/tailscale: add 'configure pve-appliance' to make Proxmox VM of appliance 2026-07-07 13:12:13 -07:00
cmd all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
control control/controlclient,net/tstun,wgengine/magicsock: fix handling of zero keys in TSMP (#20508) 2026-07-17 14:02:53 -04:00
derp derp/derpserver,cmd/derper: use slices.Clip for cert chain copies (#20484) 2026-07-15 22:13:27 -04:00
disco disco: fix UDPRelayEndpoint.AddrPorts slice cap math 2026-07-17 09:11:12 -07:00
docs docs: add CLI evolution guidelines 2026-07-10 14:55:33 -07:00
doctor all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
drive all: apply go fix 2026-07-10 17:39:16 -07:00
envknob envknob/logknob: remove unused package (#19515) 2026-04-24 15:48:06 -07:00
feature feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag 2026-07-17 13:55:23 -07:00
gokrazy gokrazy, tstest, cmd/vnet: switch amd64 kernel to gokrazy/kernel.amd64 2026-07-15 11:45:02 -04:00
health all: don't repeat the the word "the" unnecessarily 2026-06-18 16:32:08 +01:00
hostinfo clientupdate, cmd/tailscale: verify signed GAFs, wire up tailscale update for Gokrazy 2026-06-30 07:09:25 -07:00
internal .github,.policy-tests.yml: test .policy.yml in CI 2026-06-26 15:55:15 -07:00
ipn ipn/ipnlocal: reject SrcCaps-based packet filter rules for unsigned peers (#20513) 2026-07-17 15:58:06 -06:00
jsondb all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
k8s-operator all: apply go fix 2026-07-10 17:39:16 -07:00
kube cmd/{k8s-operator,containerboot,kube}: support IPv6 in egress ProxyGroup (#19898) 2026-07-14 13:26:40 +01:00
licenses licenses: update license notices 2026-07-08 11:14:50 -07:00
log cmd/tailscale/cli: fix time in tailscale routecheck (#19956) 2026-06-01 16:12:08 -07:00
logpolicy feature/syslog, cmd/tailscaled, logpolicy: add optional --syslog flag 2026-07-17 13:55:23 -07:00
logtail all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
metrics cmd/vet/lowerell, drive/driveimpl: forbid variables named "l" or "I" 2026-05-04 14:03:28 -07:00
misc all: apply go fix 2026-07-10 17:39:16 -07:00
net all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
omit all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
packages/deb all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
paths all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
portlist all: apply go fix 2026-07-10 17:39:16 -07:00
posture posture: add HealthTracker for serial number retrieval (#19181) 2026-04-25 15:42:47 -03:00
prober prober: deflake TestHTTPBandwidth 2026-06-23 08:35:57 -07:00
proxymap all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
release release/dist/synology: add GOARM=7,softfloat mode for hi3535 2026-05-27 10:54:15 -07:00
safesocket all: apply go fix 2026-07-10 17:39:16 -07:00
safeweb all: don't repeat the the word "the" unnecessarily 2026-06-18 16:32:08 +01:00
scripts scripts/installer.sh: remove an unused PACKAGE_NAME variable 2026-07-17 20:12:50 +01:00
sessionrecording sessionrecording: close idle connections after upload 2026-06-19 13:42:14 +01:00
ssh/tailssh ssh/tailssh: dissallow purely numeric usernames for SSH 2026-06-11 17:52:51 -06:00
syncs cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
tailcfg all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
tempfork misc/genreadme,tempfork/pkgdoc,tsnet: generate README.md files from godoc 2026-04-22 15:13:09 -07:00
tka tka: use a named constant to tidy up sig_test.go 2026-06-11 10:37:48 +01:00
tool all: fix more typos caused by unnecessary repetition 2026-07-06 10:36:17 +01:00
tsconsensus all: migrate code off Notify.NetMap to Notify.SelfChange 2026-05-01 06:51:40 -07:00
tsconst tstest/integration: run a smoke test against a Windows tailscaled service (#20382) 2026-07-17 12:29:12 -07:00
tsd ipn/ipnlocal,tsd: add NoiseRoundTripper to tsd.Sys 2026-05-13 14:56:28 -07:00
tsnet all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
tstest tstest/integration: run a smoke test against a Windows tailscaled service (#20382) 2026-07-17 12:29:12 -07:00
tstime cmd/tailscale/cli: fix time in tailscale routecheck (#19956) 2026-06-01 16:12:08 -07:00
tsweb all: apply go fix 2026-07-10 17:39:16 -07:00
types all: fix JSON serialization under Go 1.27's finalized encoding/json/v2 2026-07-19 09:58:50 -07:00
util util/def,cmd/containerboot: add LookupEnv, simplify env parsing (#20277) 2026-07-17 18:32:52 -07:00
version all: fix more typos caused by unnecessary repetition 2026-07-06 10:36:17 +01:00
wf wf: allow limited broadcast to/from permitted interfaces when using an exit node on Windows 2026-01-23 18:30:38 -06:00
wgengine wgengine/router/osrouter: remove orphaned tailnet addrs on cleanup (#20304) 2026-07-17 14:18:09 -07:00
wif wif: add AWS ecs for autogenerated OIDC tokens 2026-03-25 14:41:41 -06:00
words words: redress historical wrongs against the tuatara 2026-07-18 15:34:33 -07:00
.gitattributes .gitattributes: explicitly mark text files as such with eol 2026-06-23 13:04:07 -07:00
.gitignore cmd/fbstatus: add framebuffer status display for the Tailscale appliance 2026-07-02 09:24:01 -07:00
.golangci.yml .golangci.yml: enforce gliderssh import alias via importas linter 2026-04-07 11:59:38 +01:00
.policy-tests.yml .github,.policy-tests.yml: test .policy.yml in CI 2026-06-26 15:55:15 -07:00
.policy.yml .policy.yml: tweak policy after testing 2026-06-26 12:28:02 -07:00
.stignore Add .stignore for syncthing (#18540) 2026-01-27 16:15:17 -08:00
ALPINE.txt docker: bump alpine v3.19 -> 3.22 (#17155) 2025-09-17 20:22:24 +01:00
api.md {api.md,publicapi}: remove old API docs (#13468) 2024-09-13 14:10:33 -06:00
assert_ts_toolchain_match.go .: permit running binary built with TS_GO_NEXT=1 2026-02-23 09:37:04 -08:00
build_dist.sh Add --strip option to build_dist 2026-06-02 10:59:29 -07:00
build_docker.sh docker: add riscv64 to container image architectures 2026-03-29 07:47:39 -07:00
cache_key_test.go util/cibuild, cache_key_test: skip TestTsgoRevInCacheKey outside Tailscale CI 2026-05-14 15:55:05 -07:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md: update code of conduct 2025-10-28 08:58:00 -07:00
CODEOWNERS CODEOWNERS,.policy.yml: replace CODEOWNERS with a policy-bot policy 2026-06-26 10:30:59 -07:00
Dockerfile go.toolchain.branch: switch to Go 1.26 2026-03-04 21:57:05 -08:00
Dockerfile.base all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
flake.lock nix: update flakes to get a nixpkgs version with go 1.26 2026-03-06 04:06:57 -08:00
flake.nix Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20485) 2026-07-16 13:46:23 -06:00
flakehashes.json Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20485) 2026-07-16 13:46:23 -06:00
go.mod Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20485) 2026-07-16 13:46:23 -06:00
go.sum Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20485) 2026-07-16 13:46:23 -06:00
go.toolchain.branch go.toolchain.branch: switch to Go 1.26 2026-03-04 21:57:05 -08:00
go.toolchain.next.branch tool/gocross, pull-toolchain.sh: support a "next" Go toolchain 2026-01-27 14:07:35 -08:00
go.toolchain.next.rev go.mod: bump Go to 1.26.5 2026-07-08 17:15:35 -07:00
go.toolchain.rev go.mod: bump Go to 1.26.5 2026-07-08 17:15:35 -07:00
go.toolchain.version go.mod: bump Go to 1.26.5 2026-07-08 17:15:35 -07:00
gomod_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
header.txt all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
LICENSE all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
license_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
Makefile gokrazy, Makefile: improve appliance build tooling 2026-07-02 09:24:01 -07:00
PATENTS Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
pkgdoc_test.go cmd/vet/lowerell, drive/driveimpl: forbid variables named "l" or "I" 2026-05-04 14:03:28 -07:00
pull-toolchain.sh tool/updateflakes, cmd/nardump: replace update-flake.sh with Go tool 2026-04-28 10:18:32 -07:00
README.md README: update the version of Go in the README (#19168) 2026-03-28 22:21:41 -03:00
SECURITY.md Add a SECURITY.md for vulnerability reports. 2020-02-11 10:26:41 -08:00
shell.nix Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20485) 2026-07-16 13:46:23 -06:00
staticcheck.conf all: cleanup unused code, part 2 (#10670) 2023-12-21 17:40:03 -08:00
version_tailscale_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
version_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
version-embed.go cmd/printdep: add --next flag to use rc Go build hash instead 2026-01-27 14:49:56 -08:00
VERSION.txt VERSION.txt: this is v1.101.0 (#19992) 2026-06-03 15:40:23 -04:00

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.26. (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.