Def1ce/dsh-lan-bridge

Def1ce★ 1JavaScript最后同步: 2026-08-15

在 GitHub 打开

Fix the DeepSeek Harness web UI on phones: injects a crypto.randomUUID polyfill so it works over plain HTTP on your LAN - no certs, no proxy. dsh plugin + CLI, zero dependencies.

README 摘要

dsh-lan-bridge 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: - dsh plugin (recommended): install into the harness, the polyfill is served by dsh itself — the phone opens dsh's own port directly, no extra process. - Standalone proxy ( bin/dsh-bridge.cjs ): proxy any local web app on the LAN with the polyfill. 简体中文 English 中文说明 English 中文说明 为什么会有这个项目 用手机访问 dsh 网页界面时会碰到一个隐蔽的坑: 原因: 1. dsh 前端代码大量调用 crypto.randomUUID() (生成 RPC 消息 ID)。 2. 这个函数 只在 HTTPS(或 localhost)安全上下文中存在 ,普通 http:// 下是 undefined 。 3. 更糟的是 iOS 15.4 以下的 Safari/浏览器根本没有这个函数 ,连 HTTPS 都没用。 4. 想补 HTTPS?自签名证书在 iOS Safari 里会直接拒绝打开,连"继续访问"按钮都没有 ;正式证书又要域名/公网。 于是手机访问陷入死循环: http 打不开功能, https 打不开网页。 解决办法 crypto.getRandomValues() 是 所有浏览器、所有环境 (包括 http、老 iOS)都有的 API。本项目在 dsh 返回的页面里注入一段 极小的 polyfill ,用 getRandomValues 实现 randomUUID : 于是 纯 HTTP 就能完整使用 dsh :零证书、零警告、任何浏览器、任何 iOS 版本。 方式一:作为 dsh 插件安装(推荐) 包内 dsh/index.js 是一个 dsh bundle 插件:它通过 webServer.tapIndex 把 polyfill 注入 dsh 自己返回的 index.html。装进 harness 后 不需要任何额外进程 ,手机直接访问 dsh 端口即可。 0.2.1 起插件的 bundle patch 会把 dsh w…

在 GitHub 查看完整 README →
皮肤/UIdeepseekdshdsh-pluginharnesslanmobileobsplugin

分类