3fc8683585
Add support for maps and interfaces to the fast path. Add cycle-detection to the pointer handling logic. This logic is mostly copied from the slow path. A future commit will delete the slow path once the fast path never falls back to the slow path. Performance: name old time/op new time/op delta Hash-24 18.5µs ± 1% 14.9µs ± 2% -19.52% (p=0.000 n=10+10) HashPacketFilter-24 2.54µs ± 1% 2.60µs ± 1% +2.19% (p=0.000 n=10+10) HashMapAcyclic-24 31.6µs ± 1% 30.5µs ± 1% -3.42% (p=0.000 n=9+8) TailcfgNode-24 1.44µs ± 2% 1.43µs ± 1% ~ (p=0.171 n=10+10) HashArray-24 324ns ± 1% 324ns ± 2% ~ (p=0.425 n=9+9) The additional cycle detection logic doesn't incur much slow down since it only activates if a type is recursive, which does not apply for any of the types that we care about. There is a notable performance boost since we switch from the fath path to the slow path less often. Most notably, a struct with a field that could not be handled by the fast path would previously cause the entire struct to go through the slow path. Signed-off-by: Joe Tsai <joetsai@digital-static.net> |
||
---|---|---|
.bencher | ||
.github | ||
atomicfile | ||
chirp | ||
client/tailscale | ||
cmd | ||
control | ||
derp | ||
disco | ||
docs | ||
envknob | ||
health | ||
hostinfo | ||
internal/tooldeps | ||
ipn | ||
jsondb | ||
kube | ||
log | ||
logpolicy | ||
logtail | ||
metrics | ||
net | ||
packages/deb | ||
paths | ||
portlist | ||
prober | ||
safesocket | ||
scripts | ||
smallzstd | ||
ssh/tailssh | ||
syncs | ||
tailcfg | ||
tempfork | ||
tka | ||
tool | ||
tsconst | ||
tsnet | ||
tstest | ||
tstime | ||
tsweb | ||
types | ||
util | ||
version | ||
wf | ||
wgengine | ||
words | ||
.gitattributes | ||
.gitignore | ||
ALPINE.txt | ||
AUTHORS | ||
CODE_OF_CONDUCT.md | ||
Dockerfile | ||
Dockerfile.base | ||
LICENSE | ||
Makefile | ||
PATENTS | ||
README.md | ||
SECURITY.md | ||
VERSION.txt | ||
api.md | ||
build_dist.sh | ||
build_docker.sh | ||
go.mod | ||
go.sum | ||
go.toolchain.branch | ||
go.toolchain.rev | ||
pull-toolchain.sh | ||
shell.nix | ||
staticcheck.conf | ||
version-embed.go |
README.md
Tailscale
Private WireGuard® networks made easy
Overview
This repository contains all the open source Tailscale client code and
the tailscaled
daemon and tailscale
CLI tool. The tailscaled
daemon runs on Linux, Windows and macOS, and to varying degrees on FreeBSD, OpenBSD, and Darwin. (The Tailscale iOS and Android apps use this repo's code, but this repo doesn't contain the mobile GUI code.)
The Android app is at https://github.com/tailscale/tailscale-android
The Synology package is at https://github.com/tailscale/tailscale-synology
Using
We serve packages for a variety of distros 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 that are not open source.
Building
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.
We require the latest Go release, currently Go 1.19.
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.
About Us
Tailscale is primarily developed by the people at https://github.com/orgs/tailscale/people. For other contributors, see:
- https://github.com/tailscale/tailscale/graphs/contributors
- https://github.com/tailscale/tailscale-android/graphs/contributors
Legal
WireGuard is a registered trademark of Jason A. Donenfeld.