作者:zoahdev 路 2026-08-15 路 对应上游补丁 https://github.com/zoahdev/deepseek-harness/tree/fix/web-crypto-randomuuid-insecure-context
局域网用明文 HTTP 打开 dsh web,设置页报 crypto.randomUUID is not a function——因为该 API 只在安全上下文(HTTPS / localhost)里存在。修法不是换浏览器,而是给浏览器侧 UUID 生成加兜底。
# profile patch 让 web 绑定 0.0.0.0
- id: webserver
config:
host: 0.0.0.0
port: !!js ctx.webStartup.port ?? 3080
另一台设备打开 http://<内网IP>:3080 → 设置 → 模型 → 加载提供方目录失败: crypto.randomUUID is not a function。
浏览器全局 crypto.randomUUID() 只在安全上下文暴露。局域网 IP + 明文 HTTP 是非安全上下文,该值为 undefined;前端 4 处 id 生成(RPC id、附件 id、消息 id、实例 token)直接调用它,TypeError 在请求发出前就抛了。
fix/web-crypto-randomuuid-insecure-context:
@deepseek-ai/dsh-random-uuid:优先 crypto.randomUUID(),缺失时回退到 crypto.getRandomValues() 生成 RFC 4122 v4;crypto.randomUUID() mint。验证:build:lib:host + build:lib:client 全绿,定向 vitest 782/782。