Categorygithub.com/sagernet/tailscale
modulepackage
1.79.0-mod
Repository: https://github.com/sagernet/tailscale.git
Documentation: pkg.go.dev

# README

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.23. (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 git log for our commit message style. It's basically the same as Go's style.

About Us

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

Legal

WireGuard is a registered trademark of Jason A. Donenfeld.

# Packages

Package appc implements App Connectors.
Package atomicfile contains code related to writing to filesystems atomically.
Package chirp implements a client to communicate with the BIRD Internet Routing Daemon.
No description provided by the author
Package clientupdate implements tailscale client update for all supported platforms.
No description provided by the author
Package derp implements the Designated Encrypted Relay for Packets (DERP) protocol.
Package disco contains the discovery message types.
No description provided by the author
Package doctor contains more in-depth healthchecks that can be run to aid in diagnosing Tailscale issues.
Package drive provides a filesystem that allows sharing folders between Tailscale nodes using WebDAV.
Package envknob provides access to environment-variable tweakable debug settings.
Package health is a registry for other packages to report & check overall health status of the node.
Package hostinfo answers questions about the host environment that Tailscale is running on.
Package ipn implements the interactions between the Tailscale cloud control plane and the local network stack.
Package jsondb provides a trivial "database": a Go object saved to disk as JSON.
No description provided by the author
Package licenses provides utilities for working with open source licenses.
No description provided by the author
Package logpolicy manages the creation or reuse of logtail loggers, caching collection instance state on disk for use on future runs of programs on the same machine.
Package logtail sends logs to log.tailscale.io.
Package metrics contains expvar & Prometheus types and code used by Tailscale for monitoring.
No description provided by the author
Package omit provides consts to access Tailscale ts_omit_FOO build tags.
No description provided by the author
Package paths returns platform and user-specific default paths to Tailscale files and directories.
The portlist package contains code that checks what ports are open and listening on the current machine.
Package posture contains functions to query the local system state for managed posture checks.
Package prober implements a simple blackbox prober.
Package proxymap contains a mapping table for ephemeral localhost ports used by tailscaled on behalf of remote Tailscale IPs for proxied connections.
Package safesocket creates either a Unix socket, if possible, or otherwise a localhost TCP connection.
Package safeweb provides a wrapper around an http.Server that applies basic web application security defenses by default.
Package sessionrecording contains session recording utils shared amongst Tailscale SSH and Kubernetes API server proxy session recording.
Package smallzstd produces zstd encoders and decoders optimized for low memory usage, at the expense of compression efficiency.
Package syncs contains additional sync types and functionality.
Package tailcfg contains types used by the Tailscale protocol with between the node and the coordination server.
Package taildrop contains the implementation of the Taildrop functionality including sending and retrieving files.
No description provided by the author
Package tka (WIP) implements the Tailnet Key Authority.
No description provided by the author
Package tsconst exports some constants used elsewhere in the codebase.
Package tsd (short for "Tailscale Daemon") contains a System type that containing all the subsystems a Tailscale node (tailscaled or platform equivalent) uses.
Package tsnet provides Tailscale as a library.
Package tstime defines Tailscale-specific time utilities.
Package tsweb contains code used in various Tailscale webservers.
No description provided by the author
No description provided by the author
Package version provides the version that the binary was built at.
Package wgengine provides the Tailscale WireGuard engine interface.
Package words contains accessors for some nice words.

# Variables

go:embed ALPINE.txt.
GoToolchainRev is the git hash from github.com/tailscale/go that this release should be built using.
VersionDotTxt is the contents of VERSION.txt.