Problem#
A device that is paired over a plain HTTP VPN address in 100.64.0.0/10 that is not Tailscale (NetBird, WARP, a mesh VPN) never learns the machine's LAN address. At home, with the VPN off, the app only tries the VPN address and reports Cause: network for http://100.x.x.x:3773, although the machine answers on the LAN.
Expected: the token was paired over plain HTTP, so it learns the reported plain HTTP LAN address, the same as a token paired over a LAN address does. docs/internals/remote.md states this rule: "A paired token only learns a plain HTTP address off the tailnet when it was itself paired over plain HTTP".
Case: macOS host with network access on, NetBird on host and iPad. The iPad is paired over http://<netbird-ip>:3773 only. On the same Wi-Fi as the host with NetBird off, the route list holds only the VPN route.
Change#
tokenAllowsPlainHttp accepted a credential route of kind lan or public only. The vpn kind (#17158) is also plain HTTP with no proof of who answers, so it is now accepted too. A route confirmed as Tailscale stays excluded, so a tailnet-paired token still keeps to the tailnet.
Scope#
Bug fix, one line in packages/client-runtime/src/connection/routes.ts. The code contradicts the rule in docs/internals/remote.md, and the new test fails on main.
Related: #41053 (the desktop app no longer offers a NetBird address for pairing). With the manual workaround from that issue, a device is paired over the VPN address only, and that is the case this fix covers.
Verification#
- Found while reading the route code for #41053 on a host with NetBird and no Tailscale.
- New case
learns plain HTTP LAN addresses over a token paired over a plain HTTP VPN address in routes.test.ts. On main it fails: mergeLearnedRoutes returns null instead of the learned LAN route. With the fix it passes.
vp test run src/connection/ in packages/client-runtime: 11 files, 215 tests pass.
vp run check:changed: format, lint, knip, typecheck, and test pass.
- Not checked: the bug and the fix on a device. The evidence is the unit test only.
Claude Fable 5.2, Claude Code (in T3 Code)
🤖 Generated with Claude Code
No actionable comments were generated in the recent review.
Walkthrough
The plain HTTP credential check now accepts VPN routes. A test covers learning a LAN address through a plain HTTP VPN route and verifies that the learned route uses the VPN credential without sending its token in clear.
Changes: VPN Credential Route Eligibility
packages/client-runtime/src/connection/routes.ts,packages/client-runtime/src/connection/routes.test.tstokenAllowsPlainHttpnow acceptsvpnroutes. A test checks that a learned LAN route references the VPN credential and does not send its token in clear.Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related PRs
100.64.0.0/10, which share route-kind and Tailscale confirmation semantics with this change.Suggested labels:
bugfixSuggested reviewers:
juliusmarmingeMerge Risk:
Low · up to
04da3Devices paired over a plain HTTP VPN address can now learn the machine's LAN address. An open concern remains where the eligibility check uses the saved credential kind. It could keep an unusable LAN route in the saved list when a merge confirms Tailscale. The token is still not sent over plain HTTP, so the risk is low.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: a device paired over a VPN address now learns the LAN route, which matches the routes.ts change that lets the vpn route kind authorize plain HTTP and the new test for it. It is a conventional commit with a fix scope. It is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each contains specific content. The Problem section gives expected behavior and a reproduction case. The Change section explains the one-line fix and why the Tailscale exclusion holds. The Scope section links related issue
#41053and explains why no separate issue is needed. The Verification section lists the new test, the commands run, and what was not checked on a device. The agent attribution line is present. The description does not explicitly say why no issue is linked beyond the related issue reference, but the Scope section states the bug is contradicted by documented behavior, which covers the template requirement.Finishing Touches
Generate unit tests (beta)
9c93d740-e37e-42c8-838b-3ee590d5fccbReviewing files that changed from the base of the PR and between 12dd5208bd56db5d323f59a73f2b3e11eec4067d and 04da3b9aae1b430a19ade299ed13b3e0b363e16d.
packages/client-runtime/src/connection/routes.test.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.