一个使用 Go WebAssembly 和 grdp 构建的基于 Web 的 RDP 客户端。
A web-based RDP client built with Go WebAssembly and grdp

原始链接: https://github.com/nakagami/grdpwasm

## grdpwasm:基于浏览器的RDP客户端 grdpwasm是一个基于Web的远程桌面协议(RDP)客户端,使用Go WebAssembly和`grdp`库构建,无需插件即可从浏览器直接连接到Windows RDP服务器。 它利用Go代理服务器来桥接浏览器和RDP服务器TCP端口之间的WebSocket连接,因为浏览器无法直接打开TCP套接字。用户通过简单的Web界面访问客户端,提供RDP服务器详细信息(主机、端口、凭据、分辨率)。 主要功能包括完整的键盘和鼠标支持、通过RDPSND的音频流,以及通过修改后的`grdp`客户端实现的可定制网络连接。 **设置:** 需要Go 1.24+,克隆GitHub仓库 ([https://github.com/nakagami/grdpwasm](https://github.com/nakagami/grdpwasm)),并运行`make all`来构建必要的文件。 安全至关重要;在不受信任的网络中使用时,建议使用HTTPS/WSS。

Hacker News新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交登录 一个用 Go WebAssembly 和 grdp (github.com/nakagami) 构建的基于 Web 的 RDP 客户端 8 分,mariuz 1 小时前 | 隐藏 | 过去 | 收藏 | 2 评论 帮助 solarkraft 9 分钟前 | 下一个 [–] 看起来很有趣,但有点惊讶没有提到最重要的一点:剪贴板共享效果如何?回复 jqpabc123 59 分钟前 | 上一个 [–] 从技术角度来看很有趣,但由于几乎每个平台上都有现成的原生 RDP 客户端,我看不出它的必要性。回复 考虑申请 YC 2026 年夏季批次!申请截止至 5 月 4 日 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A web-based RDP client built with Go WebAssembly and grdp. Connect to a Windows Remote Desktop server directly from your browser — no plugins required.

Browser (WASM) ──WebSocket──► proxy (Go) ──TCP──► RDP Server

Because browsers cannot open raw TCP sockets, a lightweight Go proxy server bridges WebSocket connections from the browser to the RDP server's TCP port.

  • Go 1.24 or later
  • A reachable RDP server (Windows or any RDP-compatible host)
git clone https://github.com/nakagami/grdpwasm.git
cd grdpwasm
make all

make all produces:

Output Description
static/main.wasm Go WASM binary (runs in the browser)
static/wasm_exec.js Go runtime JS support file
proxy/proxy WebSocket-to-TCP proxy + static file server
make serve
# or equivalently:
./proxy/proxy -listen :8080 -static static

Then open http://localhost:8080 in your browser.

Flag Default Description
-listen :8080 Address and port to listen on
-static static Directory to serve static files from
  1. Open http://localhost:8080 in a browser.
  2. Fill in the connection form:
    • Host — hostname or IP address of the RDP server
    • Port — RDP port (default 3389)
    • Domain — Windows domain (leave blank for local accounts)
    • User — username
    • Password — password
    • Width / Height — initial desktop resolution
  3. Click Connect.
  4. The remote desktop appears in the canvas. Click the canvas to capture keyboard focus.
  5. Click Disconnect to end the session.

All standard keyboard input is forwarded to the remote desktop via RDP scan codes. Mouse move, button clicks, and scroll wheel are fully supported.

Note: The browser tab must have focus for keyboard events to be forwarded. Click inside the canvas area if keys stop responding.

Remote audio is streamed via RDPSND and played through the browser's Web Audio API (PCM 44100 Hz, stereo, 16-bit signed little-endian).

  • The proxy accepts connections from any origin. Run it only on a trusted network or add authentication before exposing it to the internet.
  • Credentials are transmitted from the browser to the proxy over WebSocket. Use HTTPS/WSS (put the proxy behind a TLS-terminating reverse proxy such as nginx or Caddy) when accessing it over an untrusted network.

The repository contains a local fork of grdp under ./grdp/ with one addition: a Dialer field on RdpClient that lets callers inject a custom net.Conn factory. This is what allows the WASM build to connect via WebSocket instead of TCP.

make wasm       # rebuild only the WASM binary
make proxy      # rebuild only the proxy server
make wasm_exec  # refresh wasm_exec.js from the local Go toolchain
make clean      # remove all build artifacts

GPLv3 — see grdp LICENSE.

联系我们 contact @ memedata.com