Repository navigation
[Bug]: SSH environment: no port forwarding — loopback dev servers (localhost:5173) unreachable from the client and the preview panel #26891
Closed
bignosecss
started this conversation in
Ideas
Replies: 1 comment
|
Closing as a duplicate of #26890, which tracks the same request. Please follow along there. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/desktop
Steps to reproduce
127.0.0.1:3773).pnpm dev:web→ Vite printsLocal: http://localhost:5173/and listens on127.0.0.1:5173(Vite's defaulthost: localhost).http://localhost:5173/into Chrome on the macOS client.Expected behavior
A remote dev server reachable at
127.0.0.1:5173on the SSH host should be reachable from the client, the way VS Code Remote-SSH handles it: the client'slocalhost:5173is forwarded over the existing SSH connection to the remote's127.0.0.1:5173, so:Forwarding on demand from the discovered local servers (like VS Code's ports view, auto-forward on discovery) would be even better.
Actual behavior
localhost:5173→ERR_CONNECTION_REFUSED. The URL resolves on the Mac, where nothing listens.packages/ssh/src/tunnel.ts, the-Lforward is created for the managed server port (3773) only; the remote port scanner (apps/server/src/preview/PortScanner.ts) discovers the dev server, but nothing exposes that port to the client.Remote side for reference — both listeners are loopback-only:
Impact
Major degradation or frequent failure
Version or commit
Remote managed server 0.1.4 (SSH environment); desktop app connected from macOS.
Environment
pnpm dev:web, bound to127.0.0.1:5173(default).Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Manual forward in a separate terminal, then open
http://localhost:5173/in the client browser:Alternatively start the dev server with
--host/server.host: '0.0.0.0'and reach it on the remote's LAN/Tailscale address, which weakens isolation and does not work for servers that must stay loopback-only.All reactions