GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): Open in VS Code uses the LAN address the client reached by tebiggs · Pull Request #21 · tebiggs/t3code

Conversation

@tebiggs

@tebiggs tebiggs commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Problem

A client that reaches a remote server over the LAN gets an Open in VS Code link to the server's tailnet name when the server has one, even if the client is not on the tailnet. On the reporting setup, a desktop connected by LAN address and not on the tailnet ended up in an empty VS Code window in Restricted Mode.

The server side of this is confirmed: the client's connection came over the LAN, the client has no tailnet entry, and sshd listens on all interfaces with Tailscale SSH off. Nothing on the client machine was inspected, including the VS Code error and whether Remote-SSH is installed. That the failed connection causes Restricted Mode is an inference.

Fix

When sshd is listening and the client is connected over a direct, non-public route, the link uses that route's host with the advertised username, for example [email protected]. An SSH profile alias still wins.

  • sshd signal: the server marks sshd-backed targets with sshd: true instead of the client inferring it from the mdns target. A Tailscale-SSH-only server has no marker and keeps its tailnet name. Older clients ignore the field, and a client talking to an older server keeps the old link.
  • Which route: the route the client is connected on, not the first saved one. A saved LAN route can outrank the live tailnet route on a client that has left that LAN.
  • Hosts that qualify: route kinds lan, tailnet and vpn from connectionRouteKind. That covers private IPv4, .local, bare hostnames, MagicDNS names and 100.64.0.0/10 addresses. Tailscale qualifies for the same reason as the LAN: the client has already reached the server at that host. A MagicDNS connection gets the same link as before. A connection to a bare 100.x address now gets that address instead of the MagicDNS name.
  • Hosts that do not qualify: public hostnames (Cloudflare tunnels, T3 Connect, reverse proxies), relay, SSH-forwarded and loopback routes, plus .localhost and 0.x addresses, which name the client itself. These keep today's behaviour.
  • IPv6 literals, including ULA, are left out. How the editors handle them in these links is untested, so they keep today's link.
  • ChatMarkdown.tsx only checks mode !== "local-exec" and passes no targets, so it is unaffected and unchanged.

Known limits

  • A private address that forwards only the T3 port (a reverse proxy, or a Docker-published port) gets a link to a host with no SSH behind it. An SSH profile alias is the way out.
  • The sshd check probes port 22 on loopback, as it did before, so an sshd bound only to loopback is reported as listening.

Rollout

The web code is bundled in the desktop app, so the desktop needs a release with this change. The server must also be updated to send sshd. Until both are updated, the link stays as it is today.

Verification

  • Live: ran this branch's dev server and opened it in headless Chromium through a forward on the host's LAN address. Clicking Open in VS Code requested vscode://vscode-remote/ssh-remote+<user>%40<lan-address>/<path>, using the host's real sshd and Tailscale state. That was a browser, not the desktop app, and VS Code itself was not exercised.
  • Focused tests in remoteOpen.test.ts and RemoteOpenTargets.test.ts, typecheck for contracts, web and server, plus lint and format, pass.
  • vp run check:changed could not run: git diff segfaulted in the sandbox before any check started.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tebiggs and others added 2 commits October 30, 2026 16:20
@tebiggs @claude
fix(web): Open in VS Code uses the LAN address the client reached
29c0449
A client on the LAN got a link to the server's tailnet name, which it may
not be able to resolve. When sshd is listening and the connected route is
direct and non-public, the editor link now uses that route's host with the
advertised username. An SSH profile alias still wins.

The server now marks sshd-backed targets explicitly, so a Tailscale-SSH-only
host keeps its tailnet name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
docs(fork): list the connection-host editor links
7d59dda
Also moves the test fixture to a neutral LAN address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs
tebiggs merged commit 4d0dc43 into main Oct 30, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 12, 2026
chore(fork): merge upstream v0.1.10-nightly.20261112.4564 #42
Merged
chore(fork): merge upstream v0.1.10-nightly.20261113.4630 #46
Merged
@tebiggs tebiggs mentioned this pull request Nov 23, 2026
chore(fork): merge upstream v0.1.12-nightly.20261123.5138 #66
Merged
tebiggs added a commit that referenced this pull request Nov 25, 2026
@tebiggs @claude
test(fork): expect windowId=_blank in the LAN Remote-SSH link
e241a02
Upstream pingdotgg#41610 opens SSH projects in a new VS Code window,
so the fork's #21 test now expects the query it appends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs tebiggs mentioned this pull request Nov 25, 2026
chore(fork): merge upstream v0.1.12-nightly.20261124.5178 #67
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@tebiggs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.