Skip to content

Commit 14fa24e

Browse files
committed
Fix: skip Tailscale endpoint resolution in local-only mode
In local-only mode the backend binds to 127.0.0.1, so Tailscale CGNAT addresses (100.64.x.y) are unreachable. However, resolveTailscaleAdvertisedEndpoints was called unconditionally, producing endpoints marked as 'available' that would rank higher than the working loopback endpoint during selection. Return only core endpoints when exposure mode is 'local-only'.
1 parent 0f13603 commit 14fa24e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/desktop/src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ async function getDesktopAdvertisedEndpoints() {
326326
exposure,
327327
customHttpsEndpointUrls: resolveCustomHttpsEndpointUrls(),
328328
});
329+
if (exposure.mode === "local-only") {
330+
return coreEndpoints;
331+
}
329332
const tailscaleEndpoints = await resolveTailscaleAdvertisedEndpoints({
330333
port: backendPort,
331334
networkInterfaces: OS.networkInterfaces(),

0 commit comments

Comments
 (0)