Skip to content

[Bug]: Windows desktop advertises the Tailscale IP for both Local network and Tailscale pairing options #7519

Description

@MorningStar3600

What happened

On a Windows machine with Tailscale installed for unrelated work, T3 Code displayed both “Local network” and “Tailscale IP” as pairing endpoint options.

Selecting either option did not change the displayed address or QR code, even before scanning or syncing with the phone. Both options used the machine’s Tailscale 100.x address.

The phone and computer were connected to the same Wi-Fi, but the phone was intentionally not connected to the work tailnet. Pairing therefore timed out. Manually replacing the advertised address with the computer’s Wi-Fi LAN address made the mobile connection work immediately.

Diagnosis

The T3 server was healthy, listening on 0.0.0.0:3773, and responding correctly through both the Wi-Fi and Tailscale addresses from the host machine.

The desktop core endpoint selection accepts every non-internal IPv4 address except loopback and link-local addresses, then returns the first match:

On this Windows machine, the Tailscale adapter was enumerated before Wi-Fi. The Tailscale 100.x address therefore became the desktop core advertisedHost and was incorrectly emitted as:

label: Local network
reachability: lan
isDefault: true

The Tailscale endpoint provider independently detects the same 100.x address and emits it as “Tailscale IP”:

Consequently, the endpoint selector contains two different options and preference keys, but both resolve to the same URL. Switching between them correctly changes the logical selection while leaving the displayed address and QR code unchanged. The actual Wi-Fi address is absent from the endpoint list.

The current regression test constructs the interfaces with LAN first and Tailscale second, so it does not cover Windows returning the Tailscale adapter first:

The same implementation is still present on main.

Steps to reproduce

  1. On Windows, connect the computer to Wi-Fi.
  2. Install and connect Tailscale on the computer.
  3. Ensure Windows enumerates the Tailscale adapter before Wi-Fi.
  4. Leave the phone connected to the same Wi-Fi but outside the computer’s tailnet.
  5. Start T3 Code Desktop.
  6. Open Settings → Connections and enable Network access.
  7. Expand the available endpoint list.
  8. Select “Local network” and note the displayed address and QR code.
  9. Select “Tailscale IP”.
  10. Observe that the address and QR code remain unchanged because both options contain the same Tailscale 100.x URL.
  11. Attempt to pair the phone and observe the discovery timeout.
  12. Replace the host manually with the computer’s Wi-Fi 192.168.x.x address.
  13. Observe that the connection succeeds.

Version

0.0.34-nightly.20260819.1132
Commit: 36f4314ab768dca3fc20af6ac25e7011b4b0447f

Environment

Windows x64 10.0.26200
Node.js 24.19.0
T3 Code Desktop Nightly
Tailscale connected on the computer
Android phone on the same Wi-Fi, intentionally outside the work tailnet

Evidence

Listener:
  LocalAddress: 0.0.0.0
  LocalPort: 3773

Detected IPv4 interfaces:
  Tailscale: <tailnet-ip>
  Wi-Fi: <lan-ip>
  vEthernet (WSL): <wsl-ip>

Advertised endpoint selected by Desktop:
  Local network -> http://<tailnet-ip>:3773

Endpoint options shown in the UI:
  Local network -> http://<tailnet-ip>:3773
  Tailscale IP  -> http://<tailnet-ip>:3773

Observed UI behavior:
  Switching between Local network and Tailscale IP does not change
  the displayed address or QR code.

Host probes:
  GET http://<tailnet-ip>:3773/.well-known/t3/environment -> 200 application/json
  GET http://<lan-ip>:3773/.well-known/t3/environment -> 200 application/json

Mobile result:
  Generated endpoint -> timeout
  Manually substituted Wi-Fi endpoint -> connection succeeds

Related issues

#5233 requests ordered fallback endpoints such as LAN plus Tailscale. This report is distinct: the desktop misclassifies the Tailscale IP as the LAN endpoint, causing both selector options to contain the same URL while omitting the real LAN address.

No exact duplicate was found.

Fix applied or workaround

Manually replace the generated Tailscale host with the computer’s Wi-Fi LAN address in the mobile environment configuration.

A product fix could:

  1. Exclude Tailscale’s 100.64.0.0/10 range from the core LAN endpoint selection.
  2. Keep Tailscale addresses exclusively in the Tailscale endpoint provider.
  3. Consider excluding or separately classifying other virtual adapters such as WSL.
  4. Add a regression test where the Tailscale interface appears before the Wi-Fi interface.
  5. Ensure the actual Wi-Fi address remains available in the endpoint selector.

Filed by

Codex (GPT-5.6 Sol) via t3 triage

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions