packages/dsh-remote-web-ui
zhu1090093659/dsh-web手机/PC 远程操控 dsh web 工作区:扫码配对、令牌门控通道、SSE 实时同步,提供移动端与完整桌面 GUI 两种远程形态。
DSH Web 远程访问网关:登录鉴权 + 到本机服务的 HTTP/WebSocket 反向代理,无需 --trusted-host。
Remote access gateway for the DeepSeek Harness (DSH) Web GUI — login auth + HTTP/WebSocket reverse proxy to the loopback DSH server.
中文 · MIT
dsh plugin --profile web add dsh-plugin-remote && dsh web
Note: this is a DSH (DeepSeek Harness) plugin — install it into a profile through
dsh plugin(or the profile's dependencies) so the gateway activates; a plainnpm ialone does not wire it in.
| Login | Main view (对话 / 轨迹 / 远程访问 tabs) |
|---|---|
| Remote desktop tab | Settings → Remote Access |
|---|---|
--trusted-host needed/admin/*, session-required), managed in the
Settings → 远程访问 section:
node-datachannel package provides the WebRTC fast path and
the Next.js login app lives inside gateway/http://<server-ip>:4080 — the first visit creates the only accountnode lib/remote-passwd.mjs add|set-password|list|del <username>$DSH_HOME/plugin-data/dsh-plugin-remote/ (users.json, whitelist.json, logs/)On Windows 10/11 x64, the plugin launches native/windows-x64/dsh-remote-host.exe
after the gateway becomes ready. It connects back with a random process-local
authentication token that is never written to disk. Only logged-in gateway
users can open the viewer/control channel.
The current Windows helper source has two video paths. After native:build,
the primary path captures BGRA frames, encodes H.264 through Media Foundation,
and sends one access unit into a real WebRTC H.264/RTP track. The browser and
libdatachannel then use the media transport's pacing, congestion feedback,
NACKs, and keyframe requests instead of putting every full frame into a TCP
queue. During startup or when H.264 cannot be decoded, the gateway keeps the
JPEG DataChannel path alive and switches to it automatically; the authenticated
WebSocket viewer is the final compatibility fallback. The package prefers the
dsh-remote-host-h264.exe binary when present and keeps the old exe as a legacy
fallback; npm run native:build refreshes both copies.
Pointer motion and wheel events use a disposable low-latency channel, while keyboard, button transitions, ACKs, and input-reset messages remain ordered and reliable. This prevents stale video from blocking new input on a weak link.
For clients behind symmetric NAT or UDP-restricted networks, configure a TURN
server in the plugin row. The values use the browser RTCConfiguration shape:
{
rtcIceServers: [
'stun:stun.example.net:3478',
{ urls: 'turns:turn.example.net:5349', username: 'user', credential: 'secret' },
],
}
STUN is useful for direct paths; TURN is the reliable relay fallback. Keep the WebSocket fallback enabled when deploying in environments where UDP policy is unknown.
Windows secure desktops (UAC prompts, sign-in, and locked sessions) cannot be
captured or controlled. Set config.desktop: false to disable projection.
npm run native:build
npm run gateway:build
npm run test:desktop
MIT