插件目录 / Network / dsh-lan-uuid-fix
dsh-lan-uuid-fix
已验证 · 实测可装 Zenjibad
功能简介
为不安全源 polyfill crypto.randomUUID
可用 — 实测通过,早期项目
为不安全源 polyfill crypto.randomUUID 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-lan-uuid-fix
A DeepSeek Harness (dsh) plugin bundle that makes the Web UI work over plain-HTTP LAN addresses.
The bug it fixes
The web client's mintRpcId() calls crypto.randomUUID(). Browsers only expose that API in secure contexts — HTTPS, or loopback. A plain-HTTP LAN origin like http://192.168.1.66:3080 is not secure, so crypto.randomUUID is undefined:
| Page origin | Secure context | crypto.randomUUID |
|---|---|---|
http://127.0.0.1:3080 |
yes | function |
http://192.168.1.66:3080 |
no | undefined |
When it's missing, every unary RPC (host.describe, workspace.list, session.list, ...) throws TypeError: crypto.randomUUID is not a function, the connection generation aborts, the WebSocket streams are killed mid-handshake, and the UI never loads the session/workspace baseline — the workspace browser just shows "No sessions yet" and the console loops connection lost, retry #N.
crypto.getRandomValues is available on insecure origins, so a UUID-v4 backfill fixes it without HTTPS.
How it works
A host plugin registers an index tap on ctx.webServer (the webserver's html-transform hook, applied to every served index.html). The tap injects an inline polyfill that defines crypto.randomUUID from crypto.getRandomValues when missing, before the app bundles execute. Loopback and HTTPS pages are untouched — the polyfill only activates when the API is absent.
Install
dsh plugin --profile web add https://github.com/Zenjibad/dsh-lan-uuid-fix
The profile patch layer is applied live (HMR), so a running dsh web picks it up without a restart. Hard-refresh the page on the remote device afterwards.
The plugin adds one row, lan-uuid-fix, which injects webServer and taps the index. If your profile previously added this row with a local file path, remove that row before installing the bundle to avoid a duplicate id.
Verify
From the machine serving dsh, or any LAN client:
curl -s http://<host>:3080/ | grep randomUUID # polyfill present
The workspace browser should list sessions instead of "No sessions yet", and the browser console should show no connection lost retry loop.
License
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-lan-uuid-fix」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Zenjibad/dsh-lan-uuid-fix Headless(CLI)profile:
dsh plugin --profile headless add github:Zenjibad/dsh-lan-uuid-fix 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
给 agent 网络能力——请求、API、代理或协议——让它能触达外部系统。
适合谁
任务涉及网络的人——调 API、抓资源或与远端服务通信。
二次开发建议
适配器和请求整形是缝——加协议、鉴权处理器、重试和端点抽象。