deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Def1ce/dsh-lan-bridge
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Fixes the DeepSeek Harness web UI on phones: injects a crypto.randomUUID polyfill so the harness works over plain HTTP — no certs, no warnings, no public tunnels, works on old iOS too. Zero dependencies.
Two ways to use it:
bin/dsh-bridge.cjs): proxy any local web app on the LAN with the polyfill.| 简体中文 | English |
|---|---|
| 中文说明 | English |
用手机访问 dsh 网页界面时会碰到一个隐蔽的坑:
crypto.randomUUID is not a function. (In 'crypto.randomUUID()', 'crypto.randomUUID' is undefined)
原因:
crypto.randomUUID()(生成 RPC 消息 ID)。http:// 下是 undefined。于是手机访问陷入死循环:http 打不开功能,https 打不开网页。
crypto.getRandomValues() 是所有浏览器、所有环境(包括 http、老 iOS)都有的 API。本项目在 dsh 返回的页面里注入一段极小的 polyfill,用 getRandomValues 实现 randomUUID:
if (typeof crypto === 'object' && crypto && !crypto.randomUUID && crypto.getRandomValues) {
crypto.randomUUID = function () { /* 用 getRandomValues 生成 UUID v4 */ };
}
于是纯 HTTP 就能完整使用 dsh:零证书、零警告、任何浏览器、任何 iOS 版本。
包内 dsh/index.js 是一个 dsh bundle 插件:它通过 webServer.tapIndex 把 polyfill 注入 dsh 自己返回的 index.html。装进 harness 后不需要任何额外进程,手机直接访问 dsh 端口即可。
# 安装(0.2.1 起自动把 dsh 绑到 0.0.0.0,手机可直接访问)
# 注意:刚发布的版本有 pnpm 24 小时闸门,请用带版本号的命令:
dsh plugin --profile web add dsh-lan-bridge@0.2.1
# 24 小时后可简写为:dsh plugin --profile web add dsh-lan-bridge
# 重启 dsh 后生效,手机(同一 WiFi)打开:
# http://<电脑局域网IP>:3080
0.2.1起插件的 bundle patch 会把 dsh webserver 自动绑到0.0.0.0(所有网卡),局域网 IP 由 dsh 自动加入/api信任名单——装完即可用,无需手动改配置。⚠️ dsh 界面无登录认证,请只在可信局域网使用。
# 本地直接运行(无需安装,默认代理 127.0.0.1:3080)
node bin/dsh-bridge.cjs
# 或安装后
npm install -g dsh-lan-bridge && dsh-lan-bridge
# 自定义参数
dsh-lan-bridge --backend http://127.0.0.1:3080 --http-port 8088
启动后,手机连同一 WiFi,打开:
http://<电脑局域网IP>:8088
例:http://192.168.1.100:8088 —— 直接可用,无需任何设置(WebSocket 实时通道已自动转发)。
获取电脑局域网 IP:Windows 运行
ipconfig,找"IPv4 地址"。
解压后双击根目录 start.bat(会自动定位到自身目录,从任何位置双击都不会报"找不到路径")。dsh 需先在 3080 端口运行。
| 参数 | 说明 | 默认 |
|---|---|---|
--backend <url> |
要代理的后端 | http://127.0.0.1:3080 |
--http-port <n> |
监听端口 | 8088 |
--host <addr> |
绑定地址 | 0.0.0.0 |
--help, -h |
帮助 |
MIT
Accessing the DeepSeek Harness web UI from a phone hits a nasty trap:
crypto.randomUUID is not a function
crypto.randomUUID() for RPC/message ids.http:// it is undefined.So phones are stuck: http breaks the app, https breaks the page.
crypto.getRandomValues() exists everywhere (http, old iOS, every browser). This project injects a tiny polyfill that implements randomUUID on top of it, so the UI works over plain HTTP.
dsh/index.js is a dsh bundle plugin that uses webServer.tapIndex to inject the polyfill into the harness's own index.html — no extra process, the phone opens dsh's own port.
dsh plugin --profile web add dsh-lan-bridge # or: add /path/to/dsh-lan-bridge
# restart dsh, then on a phone on the same Wi-Fi:
# http://<your-lan-ip>:3080
node bin/dsh-bridge.cjs # default backend :3080
# or
npm install -g dsh-lan-bridge && dsh-lan-bridge
dsh-lan-bridge --backend http://127.0.0.1:3080 --http-port 8088
Then on a phone on the same Wi-Fi open http://<your-lan-ip>:8088 — no setup at all. WebSocket streams are forwarded automatically. Find your LAN IP with ipconfig / ip addr.
On Windows, double-click start.bat for the CLI mode (dsh must already be running on 3080).
The harness UI has no authentication. Use this only on a trusted LAN, and do not expose the LAN port to the public internet.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。