Skip to content

v0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Nov 05:07
· 3 commits to main since this release

Guest links work on a new installation in two commands, and remote MCP needs the portal owner for every public change. tslink add then tslink guest create --public --print-link now succeeds on a fresh install: the first guest link takes the app off the home gateway in the same write. tslink limits set changes an app's upload limits in place, including on an app with guest links, and an upload over the limit gets a JSON 413 that status and doctor count. tslink remove revokes the app's guest links, so a re-added app of the same name cannot bring old links back.

Upgrade

  • Homebrew: brew upgrade --cask anydoor7/tap/tslink. Scoop: scoop update; scoop update tslink. Other installs: download the new archive or package from this release.
  • If TSLink runs as a background service, run tslink install again after upgrading so the service starts the new binary. No registry migration is required.
  • Remote MCP operators (serve --mcp): on an installation with a portal owner or a home gateway, a remote principal that holds the MCP owner role but is not the current portal owner now gets access_request_owner_required for changes to public apps, including unshare, limits_set and app_restart; guest_revoke stays open to it. Run such changes as the portal owner, or locally with the CLI or stdio MCP. Installations without a remote MCP control plane are unaffected. See Security below.

Added

  • TSLink now logs TLS handshake trouble per app: failed handshakes (tls.handshake.failed) and successful but slow ones over 2 s (tls.handshake.slow), each aggregated to one record per app per 10 s with a count, the error classes (timeout_before_hello, timeout_after_hello, timeout, eof, reset, bad_record, client_alert, protocol), the longest duration and, when known, the client's node name. Before this, a connection that died during the TLS handshake left no trace, because the access log only records completed requests. timeout_before_hello means no TLS ClientHello had been parsed within the handshake budget: either the client or network did not deliver it, or TSLink was too starved to read it, so it is not proof the server is innocent. timeout_after_hello means the ClientHello was parsed but the handshake did not finish in time. Plain timeout appears for every connection to a Funnel-enabled app, whose TLS configuration TSLink does not hook. Records carry no addresses, request data or login names.
  • tslink startup set <service> <priority> chooses which services come back first after a daemon restart: the daemon starts nodes one at a time, higher priority first, registry order among equals; tslink startup list shows the order. Priorities are stored in startup-priority.json beside registry.json, which builds without this command ignore, so downgrading keeps every service serving and only loses the ordering.
  • tslink limits set <app> (MCP limits_set; the app's node restarts to apply the change, so guests reopen their link) changes only an app's HTTP request limits (--max-request-body, --request-header-timeout, --request-read-timeout, --idle-timeout, with the unlimited acknowledgement rule) in one registry transaction, returns without waiting for the restart and says so (node_restarting and a message naming tslink url <app> --wait; with no daemon running node_restarting is false and the message says the limits apply when it starts), keeping target, access, routes, health, preserve-host, the guest gate and the enrolled node. It works on apps with guest links, where add is refused, and remote MCP needs the current portal owner for a routed or public app. Every hint that used to say to re-run add to change a limit now names it.
  • tslink guest create (and MCP guest_create) report the app's per-request upload cap in request_body_limit (max_body_bytes, -1 for an acknowledged unlimited body, and a message with the tslink limits set <app> --max-request-body <value> command), and the human output prints it, so an upload app's owner sees the 32 MiB default before a guest's upload is refused.
  • A recipe in the catalog can carry finite request_limits; a new service from that recipe uses them unless request-limit flags (MCP request_limits) are given.
  • A panic while serving one connection (the TLS handshake and header-budget worker, gateway admission, or a raw TCP connection and its copy loops) now drops only that connection. It is logged at error level as connection.panic_recovered with the app, the panic, its stack and the running total for the process. Before, it stopped the daemon and every node had to come back.

Changed

  • An upload refused by a request limit now gets TSLink's JSON error envelope (code request_body_limit or request_read_timeout, with a message stating the limit, such as at most 32 MiB (33554432 bytes) per request) instead of a plain-text line that named the service and the owner's --max-request-body flag. The status codes (413, 408) are unchanged.
  • The request_body_limit, request_read_timeout and request_header_timeout warnings in status --urls, list --verbose and doctor now say the app is rejecting requests, count the rejections since its node last started (and state that time; changing limits restarts the node and resets the count, while each 413 and upload 408 stays in tslink access log), give the most recent time and name the tslink limits set command that raises the limit. A connection that times out before sending any request byte, such as an idle Funnel or edge connection, still gets the 408 (and an Info-level log line) but no longer counts toward the request_header_timeout warning, which had told owners to raise the header timeout on that evidence. The first rejection is published at once and later ones within 30 seconds at the end of that window. Generated refusals carry X-Content-Type-Options: nosniff, and the request-header-timeout 408 no longer names the service or an owner flag.
  • People grants on a guest-gated app: the refusal (people_service_unsupported) now says that grants given before the gate keep working on the private tailnet listener and names the start-over. docs/guest-links.md had said a gated proxy supports people grants; the grant action has refused new grants on gated apps since the common grant action was introduced.

Fixed

  • tslink guest create works on a new installation. New installations serve through the home gateway, so tslink add also gives the app a gateway route, and guest-gated apps cannot be routed: the documented tslink add photos --proxy localhost:3000 then tslink guest create photos --for 3d --public --print-link failed with portal_route_guest_refused until tslink portal route remove photos. The first guest link now removes the route in the same registry write that saves the grant when only the owner and admins use it and the app's own node is running with an exact URL, and says so (removed_gateway_route in JSON and MCP, with the node URL; check status/doctor that the public Funnel listener came up, which the evidence cannot prove). Without that node evidence it refuses with url_not_ready and keeps the route, with or without --print-link. When people grants (including an admin who reaches TSLink only through the gateway), allow-list entries or a cross-origin route depend on it, or the app is portal-only, it refuses with portal_route_guest_refused, changes nothing and names the next command. Over remote MCP, a create needs the current portal owner (see Security), checked in the write transaction. With --print-link, creation now waits up to 8 seconds for a running daemon to publish the app's node URL, which covers the node restart the first link causes (measured at about 5 seconds until the URL is exact again). Exit code change: a node that still needs browser authorization now fails at once with enrollment_required (exit 3) instead of url_not_ready (exit 5).
  • tslink remove (and MCP unshare, and a share's rollback) revoke the app's guest links in the same write, with one guest_revoked receipt each. They had stayed active in the ledger, so re-adding an app with the same name and creating a guest link for it made the removed app's links work again. Grants an earlier release left unrevoked are revoked, with receipts, when a new app of that name raises its gate, and a grant created before its app's current created_at never authorizes and lists as revoked, which also covers a name an earlier release already re-added and re-gated. A receipt that cannot be written after the commit no longer turns a finished remove or guest create into a failure: the result is reported with audit_warning, and remove still cleans up the node.
  • add on a guest-gated app is still refused (the gate is sticky), and the refusal now names tslink limits set and tslink health set instead of only the start-over.
  • docs/guest-links.md told owners to disable an open Funnel with an add that leaves --funnel out, which keeps the Funnel; it now says --funnel=false.
  • The daemon no longer exits with a nil pointer dereference when a connection dies during its TLS handshake. Since the handshake logging above, recording such a handshake read the peer address after gVisor had already dropped it; each occurrence restarted the daemon and every node. The address is now read when the connection is accepted, so the failure is still attributed to the client. The gateway connection gate and TCP access records read the peer the same nil-safe way.
  • A finished health check now frees its slot before reporting the result, so the next check of the same app is never skipped as still running.
  • MCP doctor called by a reduced role (viewer, app-operator or people-manager) no longer reports a running daemon as stopped and a host with warnings as healthy. It used to return the owner's result shape with every field it could not show set to zero, so daemon.running was false, health_status was healthy with health_exit_code 0, and credential mode, supervision, guest links and node keys read as absent. It now returns its own shape: daemon.running and daemon.state exactly as status reports them, the health findings of the role's apps under findings_scope: "app_health", and a withheld array naming the omitted fields, including the host-wide verdict. Reduced status had the same flaw (supervision installed: false, credentials present: false, credential_stored: false, access log disabled, no guest links) and now withholds those fields and the host-level authenticated and node_authorized. Its authorized_service_count is now the owner's own per-service decision, so it no longer reads 0 while the registry is unreadable. Reduced health and list name the per-service fields they remove or rewrite. tools/list advertises these reduced output schemas to reduced roles; owner schemas and results are unchanged, except that MCP status and health services gain an authorized flag.
  • tslink guest create <app> --print-link (and MCP guest_create) issues a second link, or a replacement after guest revoke, while the guest Funnel gate is up. It had failed with url_not_ready because the guest-link and people URL lookup accepted only a tailnet https endpoint, and the gate reports the same node URL as public_https; for the same reason people list/show showed no url for an existing grant on an app that later became guest-gated. A failed node, a missing hostname or a stale runtime snapshot still returns url_not_ready, which now also says that nothing was saved and to rerun the create once tslink url <app> --wait=30s returns.

Security

  • Built with Go 1.27.4, which fixes GO-2026-6859 (net/http: an HTTP/1 server could crash from a MaxBytesReader header race); govulncheck ./... reported it as reachable from TSLink with Go 1.27.3. golang.org/x/net moves to v0.62.0 for GO-2026-6866 and GO-2026-6860 (both in its html package, which TSLink does not call). The module minimum stays Go 1.27.1 and only the toolchain directive moves; with GOTOOLCHAIN=local, install Go 1.27.4 or newer yourself.
  • Over remote HTTP MCP (serve --mcp), every change to a public app now needs the current portal owner, not only changes to a routed app. An app is public with an open Funnel, a lapsed Funnel that keeps its public acknowledgement, or guest links. The rule covers add, share, recipe_apply, unshare, limits_set, health_set, tags_set, app_restart, extend of the Funnel and guest_create, every write that makes a private app public, and settling another caller's tentative public share (an identical share or a recipe_apply naming it), and is checked inside the registry write transaction at the one point every write passes, on the registry loaded under the lock. Before, the first guest link took an app off the gateway and with it out of the portal-owner check, so a remote principal holding the MCP owner role (an mcp.allow login or tag, or an owner binding) who was not the portal owner could set an unlimited request body on the public app, mint itself a link with print_link and delete it; it could also make any unrouted private app public. Breaking for remote operators: such a principal now gets access_request_owner_required for these changes, including reducing ones such as unsharing a public app; revoking an existing guest link stays open to the MCP owner role so a leaked link can be pulled, and its receipt names the caller; run them as the portal owner, or on the gateway host with the local CLI or stdio MCP, which are unaffected. The rule applies once a portal owner is recorded or a home gateway is on; a legacy install with neither keeps the MCP owner-role rule. Private apps without a route are unchanged.
  • Over remote HTTP MCP, creating a home gateway route needs the portal owner on every path: template_apply and share created routed apps for a remote non-owner although add refused them.
  • On a home gateway whose owner is not set yet, remote person changes are refused: a remote MCP owner-role caller could revoke the login about to be bootstrapped as owner and lock it out of every remote change. The daemon no longer bootstraps a revoked login, and tslink portal enable --owner <login> restores a revoked owner login in the same write and reports it (owner_restored, a portal_owner_restored receipt), which is the local recovery. A portal enable that does not name the owner leaves a revoked owner revoked and reports owner_revoked with that command.
  • The registry write guard no longer depends on file-lock exclusivity alone: a path's transactions are also serialized inside the process.