Kristoffer Dalby
caecddd249
config: keep every default in Default
...
The DNS-01 challenge resolvers, dns.challenge.resolvers, now default to
Quad9 (9.9.9.9:53, 149.112.112.112:53) instead of Cloudflare and
Google.
Updates #1926
2026-11-11 12:19:28 +01:00
Kristoffer Dalby
7d2f2a1b37
types: document every config field
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
cca1221ec7
hscontrol: validate configuration in NewHeadscale
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
48b5cffc96
config: make the loaded configuration round-trip
...
Configuration keys now match only as written, in lower case. BREAKING:
Server_URL is an unknown key, where 0.29 and the previous commits
ignored case. Each key has one spelling, the one the dump prints.
Open-map entry names keep their own rule: split DNS domains and
provider settings are lowercased, oidc.extra_params keeps case.
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
e8e82ffe71
config: load configuration outside types
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
c6d25d12e1
types: decode configuration strictly
...
Fixes #2899
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
3a3a10edf9
types: give config values their own types
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
565aaf7e49
types: compute derived config values where they are used
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
c27285f224
types: remove viper
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
960c9a3f1d
types: reject unknown and removed config keys
...
Fixes #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
65e9ccedf6
types: load configuration with koanf
...
Updates #1926
2026-11-11 11:19:27 +00:00
Kristoffer Dalby
443f3a0ecd
types: pin effective config of shipped examples
...
Updates #1926
2026-11-11 12:19:23 +01:00
Kristoffer Dalby
167f4f646f
prek: run treefmt hook serially
...
Parallel nix fmt batches time out on treefmt's cache lock.
Updates #1926
2026-11-11 12:19:23 +01:00
Kristoffer Dalby
8a291dfc9d
types: add config compatibility fixtures
...
Frozen real-world config inputs for the compat goldens; formatter skips them.
Updates #1926
2026-11-11 12:19:23 +01:00
Kristoffer Dalby
bd3495d8d2
types: reject unknown policy.mode
...
A typo booted with no policy, allowing all traffic.
Updates #1926
2026-11-11 12:19:22 +01:00
Kristoffer Dalby
ae6ea2cce4
cli: add check config and check all
...
check config validates only the config; check all adds one
ok/FAIL/skip line per named file.
Fixes #3443
2026-11-11 12:19:22 +01:00
Kristoffer Dalby
0208434691
config: validate the files a config names
...
New package hscontrol/config: Files lists each file a config
names with its validator; ReadPrivateKey moves here.
Updates #3443
2026-11-11 12:19:22 +01:00
Kristoffer Dalby
5de40d9528
github: regenerate integration test list
...
Updates #3355
2026-11-11 12:06:27 +01:00
Kristoffer Dalby
f5fd1d16cf
cli: add check policy
...
check policy and policy set share ValidatePolicy; tests and sshTests
run against stand-ins built from the policy. Replaces policy check.
Fixes #3355
2026-11-11 12:06:27 +01:00
Kristoffer Dalby
0fe0545b3d
cli: add check command group that loads config on demand
...
Updates #3355
2026-11-11 12:06:27 +01:00
Kristoffer Dalby
626f400d54
policy/v2: name the tester compat skip lists like the others
...
Updates #3355
2026-11-11 12:06:27 +01:00
Kristoffer Dalby
7989fed78e
servertest: return from NewClient after the first map
...
HA tests expect the first router created to hold the older control
session; under load its stream connected later and the standby won.
2026-11-10 15:55:42 +01:00
Kristoffer Dalby
e49629ebf3
goreleaser: build with -trimpath
...
Release logs showed the CI runner's checkout path on every Caller() line; nix builds already trim.
2026-11-10 15:55:25 +01:00
Kristoffer Dalby
48416ce089
tools/capver: test 429 and dropped-connection retries
2026-11-06 14:25:24 +01:00
Kristoffer Dalby
9a199a7e7e
tools/capver: add blank line before range for wsl
2026-11-06 14:25:24 +01:00
Kristoffer Dalby
4a531ec7a2
tools/capver: fetch tailcfg.go from raw.githubusercontent.com
...
github.com/raw only redirects there, and its edge serves stale 504s.
2026-11-06 14:25:24 +01:00
Kristoffer Dalby
dc9513f472
tools/capver: fail on fetch errors instead of dropping versions
...
Retry 5xx, 429 and network errors with backoff, then fail.
Only 404 skips a version.
2026-11-06 14:25:24 +01:00
Kristoffer Dalby
017ab6b219
derp: skip DERP map sources that fail to load
...
Warn and start on what loaded; abort only if the served map, policy
derpMap included, has no region. Refresh still keeps the old map.
Fixes #3142
2026-11-06 14:03:08 +01:00
Kristoffer Dalby
a25aff2ccc
derp: reject non-200 DERP map responses
...
A JSON error page decoded to an empty map; a refresh then dropped
that URL's regions. Errors now name the URL.
Updates #3142
2026-11-06 14:03:08 +01:00
Kristoffer Dalby
8bc7e793a8
hscontrol: keep ACME retries on tls.acme.url
...
certmagic retried Let's Encrypt failures against staging, registering an account there.
Fixes #3589
2026-11-06 13:15:24 +01:00
Kristoffer Dalby
aa8d73ea1e
db: test too-old SQLite dumps are rejected unmodified
...
Adds a 0.22.3 dump; every fixture must fail before any write.
Updates #3648
2026-11-06 10:04:31 +01:00
Kristoffer Dalby
059b95bacc
db: reject pre-0.23 databases by their machines table
...
Missing, empty or InitSchema-stamped migrations tables all hid them.
Error follows the one-minor-at-a-time upgrade path.
Fixes #3648
2026-11-06 10:04:31 +01:00
CJstate
3bb5789d24
db: reject pre-0.23 databases that lack a migrations table
...
checkMinimumMigration treated any database without a migrations table as
fresh. Databases created before gormigrate (0.23) also lack that table, so
they were accepted as fresh, let InitSchema run against the legacy schema,
and stamp SCHEMA_INIT plus every migration ID without running any migration.
Only treat a missing migrations table as fresh when no legacy or current
core table exists; otherwise return the too-old upgrade error. Add a test
case covering the legacy-schema database.
Closes #3648 .
2026-11-06 10:04:31 +01:00
Kristoffer Dalby
0bdc332886
CHANGELOG: note app grants and exit nodes
2026-11-05 17:23:53 +01:00
Kristoffer Dalby
99b2d94938
policy: list capability sources on exit nodes
...
SaaS lists the source of an app grant to the internet on every exit node,
one-sided: the source does not list the exit node (via-grant-v99, v100).
2026-11-05 17:23:53 +01:00
Kristoffer Dalby
f924bf2527
policy: keep capability destinations out of the exit test
...
An app grant carries no traffic, so it offers no exit routes, as on SaaS
(via-grant-v101..v104).
2026-11-05 17:23:53 +01:00
Kristoffer Dalby
1fa8061e2c
servertest: hold the exit-node capture to the wire and filter rules
...
Updates #3643
2026-11-05 16:15:27 +01:00
Kristoffer Dalby
9ab6a64ee3
state: pin ExitNodeID as not peer-visible
...
Updates #3643
2026-11-05 16:15:27 +01:00
Kristoffer Dalby
b216d5b6aa
servertest: pin exit node choice as server-side, as on SaaS
...
SaaS sends no frame for it and no map entry carries ExitNodeID.
Updates #3643
2026-11-05 16:15:27 +01:00
Kristoffer Dalby
91f0c8e8bb
servertest: add exit-node SaaS capture
...
saasprobe exit-node: a node picks, switches and clears an exit node
while same-user and other-user peers watch.
Updates #3643
2026-11-05 16:15:27 +01:00
Kristoffer Dalby
ac25916b5f
api/v2: register device update operations apart
...
registerDevices passed gocyclo's limit.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
49ddd3d412
docs: describe update-client as Tailscale answers it
...
auto_update.enabled reaches only nodes with no stored setting.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
fda2a123c7
hscontrol: answer 413 only for an oversized c2n response
...
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
6245fbe30b
integration: expect not found from nodes update-client
...
Run every tested client version.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
f9992637a6
cli: follow the update-client wire format
...
Drop --force, which also shadowed the global flag. Wait 15s, past
the server's 10s c2n wait.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
04ba527a91
gen/client/v2: regenerate for update-client and update-status
...
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
7af29e8c45
api/v2: add device update-status
...
updating from a started update until the node runs another version,
or for at most 10 minutes; else not-updating. Kept in memory.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
8230c58a0c
api/v2: answer update-client as Tailscale does
...
No body, 200 {} once started, 404 "not found" for a device that
disallows updates, has no map stream, or refuses. c2n wait 10s.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
7ea7208ec0
servertest: replay update-client captures against headscale
...
Fails until update-client matches SaaS; grace test now expects SaaS's 404.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
da6a5e9f5d
servertest: add update-client SaaS captures
...
API rows from saasprobe; console Start update imported from a browser HAR.
Updates #3629
2026-11-05 15:51:04 +01:00