Repository navigation
Upgrading from 1.0.0. No code change is needed. Without one, watches open on Tailscale 1.104 and later (the client drops the two options those daemons reject), PingType.peerAPI pings get an answer, PingResult.isDirect is true only for a direct path, a rejected watch reports its error at once, and a watch over loopback (the standalone and Mac App Store Tailscale apps) stays open through quiet periods and, with a reconnect policy, follows a daemon that restarts on a new port. To adopt: read PingResult.path to learn how a ping reached a peer, and consider subscribing with the new watch options (.peerChanges, .noNetMap) and re-reading status() on each notification, as the monitoring recipe and the Peer Diagnostics sample do. PingResult.path, PingPath, and the four new NotifyWatchOpt options are new in 1.1.0.
Added
PingResult.pathsays how a ping reply reached the peer: a newPingPath
value of.direct(endpoint:),.peerRelay(endpoint:),
.derp(regionID:regionCode:), or.unknown, andnilwhen the ping failed.
It uses the same precedence astailscale ping(peer relay, then DERP, then
direct endpoint) and treats the empty strings and zeros the daemon always
sends as absent. Only disco pings report a path.- Peer Diagnostics, a Mac sample app:
swift run --package-path Examples/PeerDiagnostics PeerDiagnosticsopens a
SwiftUI window that lists your peers and shows how a ping reached the
selected one (Direct, Peer relay, DERP, Unknown, or Failed), its latency,
when it was measured, how many pings it took, whether it is the settled path
or one measurement, and whether it is still current. It starts with a
built-in fixture tailnet that needs no Tailscale; Live reads the local
daemon without changing it.--fixture --printand--live --printrun it
headless. Its view model is a tested library target
(PeerDiagnosticsCore). A new DocC recipe, "Show How a Ping Reached a Peer",
walks through it. NotifyWatchOpt.peerChanges,.noNetMap,.initialStatus, and
.peerPatches(upstream bits 12-15), observed accepted by Tailscale
v1.102.2 and v1.104.7.IPNNotifydoes not yet model the fields they
produce; those notifications still decode.tailscale-swift pingprints that path the waytailscale pingdoes
(via <ip:port>,via peer-relay(...),via DERP(<code>), or the ping type
when the reply names no path).--jsonoutput is unchanged.tailscale-swift watchprints the daemon's message when it rejects a watch,
and its help, man page, and README describe the options it requests.- Sanitized ping replies captured from a Tailscale 1.102.2 daemon as test
fixtures, with provenance and digests, andScripts/capture-ping-fixture.py
to capture more.
Fixed
- Watching the IPN bus works on Tailscale 1.104 and later. Those daemons answer
a watch that sets.rateLimitor.initialNetMap(including
NotifyWatchOpt.defaultand.allInitial) with HTTP 400. Before this fix,
watchIPNBus()with default options against such a daemon never returned or
threw until the daemon closed the connection, andtailscale-swift watch
printed only its banner. Now the client releases the rejected response
unread, opens the watch once more without those two options, and omits them
from later watches and reconnects of the same client. A daemon that accepts
them still receives exactly the options the caller passed, in one request.
Callers do not need to change their options. - A rejected IPN bus watch (
watchIPNBus,watchIPNBusEvents,
tailscale-swift watch) now reports its typed status error as soon as the
response arrives (the error'sbodyandbodyPreviewcarry the daemon's
message), instead of hanging until the daemon closes the connection. Over
the Unix socket, a streaming response body now ends after its
Content-Lengthbytes (or at the terminal chunk, or at EOF only when
neither framing is present), and the socket is closed then; a body shorter
than itsContent-Lengthfails withmalformedResponse. - An IPN bus watch over loopback TCP (the standalone and Mac App Store
Tailscale apps on macOS) no longer ends with "The request timed out" after
requestTimeout(30 s by default) without notifications, and a watch with a
reconnect policy no longer reconnects and reports a state gap on that
period.requestTimeoutnow bounds only opening a stream (connect, send,
response head), as documented. The session'stimeoutIntervalForResource
(7 days forURLSession.shared) still ends a stream that has been open that
long. - Reconnecting watchers (
watchIPNBus(reconnect:)andwatchIPNBusEvents)
now follow a daemon restart that changes the loopback port or proof token:
when the endpoint source is automatic, each reconnect attempt rediscovers
the daemon once (single-flight with unary requests) on a connect-stage
failure or a 401/loopback 403, as the initial open does. A rediscovery
failure during a reconnect (for example, discovery metadata briefly missing
mid-restart) counts as one failed attempt under the retry policy rather
than ending the stream; on the initial open it is still thrown. Pinned
configurations still never rediscover. - On macOS loopback connections, a refused connection is now reported as
TailscaleTransportError.connectionRefused, as it already is on Unix
sockets, instead of a rawURLError(watch open) ornetworkFailure(other
requests). A watch or request using automatic discovery therefore
rediscovers a daemon that restarted on a new port. Opening a watch now
always throwsTailscaleClientErrorfor transport failures, and stream body
errors are reported the same way as for other requests. - Concurrent requests against a restarting or stopped daemon share a single
rediscovery. A request whose connection failed after another request had
already started rediscovering, including one that waited on a rediscovery
that failed, takes that rediscovery's result (the refreshed endpoint, or the
sameTailscaleClientError.discovery) instead of running another. watchIPNBusno longer ends withstreamOverflowon an undecodable line
or, with a reconnect policy, on its first successful reconnect: the stream
continues, the line is reported throughonUndecodableLine, and genuine
buffer overflow still throwsstreamOverflow.PingResult.isDirectwastruefor TSMP, ICMP, peerAPI, and failed pings,
because the daemon sendsEndpointas""rather than omitting it. It is now
trueexactly whenpathis.direct.PingType.peerAPIpings never got an answer and ran until the request
timeout, because they senttype=peerAPI; the daemon only recognizes
peerapi(tailcfg.PingPeerAPI). The raw value is now"peerapi".
PingType(rawValue:)and decoding still accept"peerAPI".tailscale-swift pingno longer prints a bareviafor replies without an
endpoint.- The recovery suggestion for
TailscaleTransportError.socketNotFoundno
longer says the client discovers the Mac App Store app's loopback API on its
own; that discovery is opt-in (allowMacOSAppStoreDiscovery: true). userMetrics()throwsendpointUnavailableon Tailscale 1.76, which answers
the endpoint with 403 "usermetrics debug flag not enabled". It threw
permissionDenied, contrary to its documentation. Any other 403 still
throwspermissionDenied.- The package compiles on Linux again: the Unix-socket liveness probe passes
SOCK_STREAMasInt32on Glibc. Linux remains unqualified; macOS 13+ is
the supported runtime. - The example packages (
Examples/StatusDemo,Examples/Recipes) build from
a checkout in any folder, including a git worktree; before, SwiftPM stopped
withunknown package 'swift-tailscale-client'unless the folder had the
repository's name.
Changed
- A watch answered with HTTP 400 now ends instead of being retried:
StreamRetryPolicy.classifytreatsunexpectedStatus(400, …)as fatal, so
the initial open throws it and a reconnecting stream ends with it. 429, 5xx,
timeouts, and connection failures are still retried. - The monitoring recipe (
MonitorChanges,RecipeMonitoring) subscribes with
[.initialState, .initialHealthState, .peerChanges, .noNetMap]and re-reads
status()on each notification, reconnect, and state gap, instead of asking
for.initialNetMap. It works on daemons before and after Tailscale 1.104. - Re-pin upstream LocalAPI provenance to
tailscale/tailscale@1db8e79a8b00
and advance the default advertised capability from 144 to 152. Explicit
capabilityVersionconfiguration andTAILSCALE_LOCALAPI_CAPABILITY
still override the default. The upstreamcert-status/and
resume-ipn-bushandlers are recorded as unwrapped. See
Documentation/COMPATIBILITY-148.mdand
Documentation/COMPATIBILITY-152.mdfor the upstream reviews and
compatibility evidence. - The API compatibility check now compares against
v1.0.0with an empty
breakage allowlist (previouslyv0.12.0plus an allowlist of pre-1.0 breaks). - The release workflow can be rehearsed with a manual run that validates,
tests, builds, checksums, and aggregates evidence for any commit without
publishing. Release evidence now requires the packaged CLI to report the
tagged version. - CI no longer cancels a run on
mainthat has started when the next commit
lands; only superseded pull-request runs are cancelled, so a release commit
keeps the completed CI run the release workflow looks for. (GitHub still
replaces amainrun that is waiting to start behind another.)
Documentation
- The endpoint manifest (
Documentation/endpoints.json) and the tables
generated from it keep three kinds of evidence apart for each endpoint: what
the unit tests decode (synthetic fixture, captured fixture, or wire shape),
the CI comparison with the pinned upstream source, and observation on a real
daemon, which names the lane, run, tailscaled version, and date.
Headscale-matrix observations from v0.12.0 code are kept in their own
column, labeled as pre-1.0.min_tailscaledno longer implies a tested
floor.generate-endpoint-docs.py --checkrejects untraceable live claims.
capture-fixtures.py --capture, which read live status and then wrote
synthetic fixtures, is removed;Scripts/capture-ping-fixture.pyis the
capture path. - The manual Headscale workflow passes again. One run observed logged-in
tailscaled 1.76.0, 1.84.0, 1.102.5, 1.104.7, and unstable 1.105 under
Headscale 0.29.7 (0.28.0 for 1.76.0), including the default watch's retry
on 1.104. The unit suite also passes in Swift 6.1 and 6.4 Linux containers.
Neither runs in required CI, and Linux stays outside release qualification. Documentation/TESTING.mdexplains how to test against a specific daemon
version withScripts/disposable-tailscaled.sh, which builds and runs a
throwaway, never-logged-in userspacetailscaledof any upstream tag.- The integration guide,
llms.txt, and the agent skill describe ping paths,
the watch options that work on current daemons, and Linux as unqualified. - Corrected the soak, adoption, consumer, review, support, testing, and 1.0 release documents to state only measured results: the 1-hour and 24-hour soaks are listed as not yet run, Linux as unqualified, no daemon versions as certified, and DCO sign-off as requested but not enforced in CI. The 1.0.0 release record now gives the published outcome and the gates left open.
Documentation/releases/1.1.0.mdrecords what was run to qualify this
release and what remains untested.