Mirror of tailscale/tailscale@github.com
Go to file
Andrea Gottardo c79b736a85
ipnlocal: allow overriding os.Hostname() via syspolicy (#14676)
Updates tailscale/corp#25936

This defines a new syspolicy 'Hostname' and allows an IT administrator to override the value we normally read from os.Hostname(). This is particularly useful on Android and iOS devices, where the hostname we get from the OS is really just the device model (a platform restriction to prevent fingerprinting).

If we don't implement this, all devices on the customer's side will look like `google-pixel-7a-1`, `google-pixel-7a-2`, `google-pixel-7a-3`, etc. and it is not feasible for the customer to use the API or worse the admin console to manually fix these names.

Apply code review comment by @nickkhyl

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Co-authored-by: Nick Khyl <1761190+nickkhyl@users.noreply.github.com>
2025-01-17 14:52:47 -08:00
.bencher
.github .github: Bump github/codeql-action from 3.27.6 to 3.28.1 (#14618) 2025-01-15 10:54:34 -07:00
appc
atomicfile atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 2025-01-15 13:57:37 -05:00
chirp
client client/tailscale: fix typo in comment 2025-01-14 16:55:32 -06:00
clientupdate
cmd go.{mod,sum},cmd/{k8s-operator,derper,stund}/depaware.txt: bump kube deps (#14601) 2025-01-17 05:37:53 +00:00
control tailcfg,control/controlclient: treat nil AllowedIPs as Addresses [capver 112] 2025-01-15 07:28:25 -08:00
derp derp: change packets_dropped metric to also have reason and kind labels (#14651) 2025-01-16 12:21:33 -07:00
disco
docs
doctor
drive cmd/viewer,all: consistently use "read-only" instead of "readonly" 2025-01-14 08:26:56 -08:00
envknob
gokrazy
health
hostinfo
internal
ipn ipnlocal: allow overriding os.Hostname() via syspolicy (#14676) 2025-01-17 14:52:47 -08:00
jsondb
k8s-operator
kube
licenses
log
logpolicy
logtail
metrics
net net/tstun: add logging to aid developers missing Start calls 2025-01-16 17:28:30 -08:00
omit
packages/deb
paths
portlist
posture
prober prober: remove DERP pub key copying overheads in qd and non-tun measures (#14659) 2025-01-15 16:28:49 -08:00
proxymap
release
safesocket
safeweb
scripts
sessionrecording
smallzstd
ssh/tailssh
syncs
tailcfg tailcfg,control/controlclient: treat nil AllowedIPs as Addresses [capver 112] 2025-01-15 07:28:25 -08:00
taildrop
tempfork
tka
tool
tsconst
tsd
tsnet
tstest all: add Node.HomeDERP int, phase out "127.3.3.40:$region" hack [capver 111] 2025-01-14 12:27:14 -08:00
tstime
tsweb
types types/lazy: fix flaky TestDeferAfterDo 2025-01-15 15:38:51 -06:00
util ipnlocal: allow overriding os.Hostname() via syspolicy (#14676) 2025-01-17 14:52:47 -08:00
version util/uniq,types/lazy,*: delete code that's now in Go std 2025-01-12 19:49:02 -08:00
wf
wgengine all: add Node.HomeDERP int, phase out "127.3.3.40:$region" hack [capver 111] 2025-01-14 12:27:14 -08:00
words
.gitattributes
.gitignore
.golangci.yml
ALPINE.txt Revert "Dockerfile: bump base alpine image (#14604)" (#14620) 2025-01-13 10:02:26 -08:00
AUTHORS
CODEOWNERS
CODE_OF_CONDUCT.md
Dockerfile Revert "Dockerfile: bump base alpine image (#14604)" (#14620) 2025-01-13 10:02:26 -08:00
Dockerfile.base Revert "Dockerfile: bump base alpine image (#14604)" (#14620) 2025-01-13 10:02:26 -08:00
LICENSE
Makefile
PATENTS
README.md
SECURITY.md
VERSION.txt
api.md
assert_ts_toolchain_match.go
build_dist.sh
build_docker.sh
flake.lock
flake.nix
go.mod go.{mod,sum},cmd/{k8s-operator,derper,stund}/depaware.txt: bump kube deps (#14601) 2025-01-17 05:37:53 +00:00
go.mod.sri
go.sum go.{mod,sum},cmd/{k8s-operator,derper,stund}/depaware.txt: bump kube deps (#14601) 2025-01-17 05:37:53 +00:00
go.toolchain.branch
go.toolchain.rev
gomod_test.go
header.txt
pkgdoc_test.go
pull-toolchain.sh
shell.nix
staticcheck.conf
update-flake.sh
version-embed.go
version_tailscale_test.go
version_test.go

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.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:

WireGuard is a registered trademark of Jason A. Donenfeld.