[Feature Request] Wasm VNC/RDP client
Description
Just like the ssh WASM client, it would be nice if VNC and RDP would work so easily too.
https://github.com/rickli-cloud/headscale-console implements this.
Feasibility analysis: WASM VNC/RDP client
No duplicate or directly related issue exists. The request is reasonable, and Headplane's existing Browser SSH is already most of the infrastructure — but VNC and RDP are not small additions, and two product decisions are needed before this becomes a concrete plan.
What the reference project does
headscale-console splits each protocol at a clean seam:
- Go/WASM owns the tailnet and exposes raw TCP as an
RTCDataChannel-shaped object (IpnRawTcpChannel) — no WebRTC involved, just an interface noVNC and IronRDP already consume. - VNC: JS handles the protocol (noVNC) and renders.
- RDP: JS pipes bytes into a second WASM module (IronRDP, Rust) that does TLS, RDP, and rendering.
SSH there is the same as Headplane's: Go owns the whole stack.
How this maps onto Headplane
Reusable today:
- The tailnet join, pre-auth key generation, ephemeral node lifecycle, and agent cleanup in
app/routes/ssh/page.tsx(loader) andapp/routes/ssh/wasm.client.tsare protocol-agnostic and can be shared. cmd/hp_ssh/wasm_js.go:432already dials arbitrary TCP throughdialer.UserDial; the netstack dialer is wired for any address (wasm_js.go:137-159).- The windowed
/ssh/:idroute + machine menu entry (app/routes/machines/components/menu.tsx:45) is the pattern to copy for/vnc/:idand/rdp/:id.
Missing:
- A generic dial in the WASM shim. Today only
ipn.sshis exported (wasm_js.go:213). Adial(host, port)returning{ write, close, setReadFn }(mirroring thejsSSHSessionplumbing) is the one Go-side primitive both protocols need. This is the smallest, most reusable piece and the natural first PR. - Browser protocol clients. noVNC (JS, MIT) for VNC; IronRDP for RDP. IronRDP is a Rust→WASM module, so the build gains a second toolchain and a sizeable binary alongside
hp_ssh.wasm. That is the biggest cost and the main reason to split VNC and RDP into separate efforts. - Port discovery. SSH is offered when
node.hostInfo.sshHostKeysis present (menu.tsx:46). VNC (5900) and RDP (3389) have no Headscale metadata. Something has to decide when the buttons show: user-enteredhost:port, agent probing, or a per-node config list. This is an open design question. - Credential UX. Unlike Tailscale SSH, VNC and RDP authenticate with their own password/credentials, collected by the client. The tailnet node still joins as the signed-in user, so Headscale ACLs still gate the TCP flow — worth documenting so expections don't drift from SSH's "connects as your Headscale user" model.
Decisions needed before a plan
- Scope: VNC, RDP, or both? Recommend VNC first — noVNC is pure JS, so it needs no new toolchain and validates the dial seam cheaply. RDP can follow.
- Discovery: how Headplane knows a machine speaks VNC/RDP (see #3).
- Build size: whether a second Rust WASM artifact is acceptable for the Docker image and Nix build.
Suggested phasing (once the above are settled)
- Export a generic
dialfromcmd/hp_ssh/wasm_js.go+ typings, with no UI change. Add integration coverage through the existing permissions test as new routes appear. - Add
/vnc/:idwith the SSH route's loader/lifecycle and a noVNC pane. - Add
/rdp/:idwith IronRDP and the second WASM build target. - Docs page under
docs/features/, a machine menu entry gated on discovery, and aCHANGELOG.mdline under# Next.
I haven't started implementation. If the scope and the discovery question can be settled, the dial seam is a well-contained first step.

deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏