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.
tailscale/util
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>
11 months ago
..
cache util/cache: fix missing interface methods (#11275) 2 years ago
cibuild all: update copyright and license headers 3 years ago
clientmetric wgengine: instrument with usermetrics 1 year ago
cloudenv all: use math/rand/v2 more 2 years ago
cmpver util/cmpver: add Less/LessEq helper funcs 2 years ago
codegen util/codegen: treat unique.Handle as an opaque value type 1 year ago
cstruct all: use Go 1.21's binary.NativeEndian 11 months ago
ctxkey all: use reflect.TypeFor now available in Go 1.22 (#11078) 2 years ago
deephash util/deephash: fix test regression on 32-bit 1 year ago
dirwalk all: use tstest.Replace more 3 years ago
dnsname util/dnsname: use vizerror for all errors 12 months ago
execqueue control/controlclient,util/execqueue: extract execqueue into a package 2 years ago
expvarx all: use Go 1.22 range-over-int 2 years ago
goroutines ipn/ipnlocal, util/goroutines: track goroutines for tests, shutdown 11 months ago
groupmember util/groupmember: fail earlier if group doesn't exist, use slices.Contains 2 years ago
hashx all: use Go 1.22 range-over-int 2 years ago
httphdr util/httphdr: add new package for parsing HTTP headers (#9797) 2 years ago
httpm util/httpm: don't run test if .git doesn't exist 2 years ago
jsonutil all: use Go 1.22 range-over-int 2 years ago
limiter all: add test for package comments, fix, add comments as needed 1 year ago
lineiter types/result, util/lineiter: add package for a result type, use it 1 year ago
lineread all: update copyright and license headers 3 years ago
linuxfw all: use Go 1.21's binary.NativeEndian 11 months ago
lru util/slicesx: add MapKeys and MapValues from golang.org/x/exp/maps 11 months ago
mak various: add golangci-lint, fix issues (#7905) 3 years ago
multierr all: use Go 1.22 range-over-int 2 years ago
must all: update copyright and license headers 3 years ago
nocasemaps all: use Go 1.22 range-over-int 2 years ago
osdiag all: add test for package comments, fix, add comments as needed 1 year ago
osshare all: add test for package comments, fix, add comments as needed 1 year ago
osuser util/osuser: turn wasm check into a const expression 1 year ago
pidowner types/result, util/lineiter: add package for a result type, use it 1 year ago
pool util/pool: add package for storing and using a pool of items 2 years ago
precompress all: update copyright and license headers 3 years ago
progresstracking ipn/localapi: add support for multipart POST to file-put 2 years ago
quarantine all: update copyright and license headers 3 years ago
race all: use Go 1.22 range-over-int 2 years ago
racebuild all: update copyright and license headers 3 years ago
rands wgengine/magicsock: use math/rands/v2 2 years ago
reload all: use math/rand/v2 more 2 years ago
ringbuffer all: use Go 1.22 range-over-int 2 years ago
set all: use iterators over slice views more 1 year ago
singleflight util/singleflight: add DoChanContext 2 years ago
slicesx util/slicesx: add MapKeys and MapValues from golang.org/x/exp/maps 11 months ago
stringsx util/stringsx: add package for extra string functions, like CompareFold 12 months ago
syspolicy ipnlocal: allow overriding os.Hostname() via syspolicy (#14676) 11 months ago
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 3 years ago
systemd all: update copyright and license headers 3 years ago
testenv util/testenv: add new package to hold InTest 2 years ago
topk all: use Go 1.22 range-over-int 2 years ago
truncate util/truncate: support []byte as well (#11614) 2 years ago
usermetric cmd/checkmetrics: add command for checking metrics against kb 1 year ago
vizerror util/vizerror: add WrapWithMessage 1 year ago
winutil util/winutil/s4u: fix token handle leak 1 year ago
zstdframe all: use Go 1.22 range-over-int 2 years ago