
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-host-router
Advanced tools
dsh 外挂式网络路由:按 hostname 给 dsh 请求分流——勾选的域名走本地代理(Clash 等),其余直连。内置嗅探,自动扫描 dsh 访问过的 hostname,设置页勾选即生效(保存即热生效,免重启)。纯外挂:dependencies 空,运行时零 require,全靠宿主 ctx 注入;不碰 settings.yaml provider 配置。
dsh 外挂式网络路由插件:按 hostname 给 dsh 的请求分流——勾选的域名走本地代理(Clash 等),其余直连。内置嗅探,自动记录 dsh 访问过的 hostname,设置页勾选即生效。
| dsh-llm-proxy | dsh-host-router | |
|---|---|---|
| 路由维度 | 按模型(解出 baseURL host) | 按 hostname 通用 |
| 覆盖范围 | 仅 LLM 请求 | LLM + 市场目录 + 截图源 + 任意 dsh 网络请求 |
| 配置 | dsh Config(live) | 独立 config.json(重启生效) |
| 扫描清单 | 无 | 嗅探 + 主动扫(读 settings.yaml provider) |
dsh plugin --profile web add D:/ai/dsh/dsh-host-router
重启 dsh web(托盘退出 → 启动)。
~/.dsh/settings.yaml 的 baseURL)+ 常见境外兜底,批量直连探测,标出"直连不通→建议代理"。~/.dsh/host-router/config.json。~/.dsh/host-router/config.json:
{
"proxyHost": "127.0.0.1",
"proxyPort": 7897,
"proxiedHosts": ["api.openai.com", "awesome-dsh-plugin.com"],
"sniff": true
}
proxiedHosts 命中(含子域后缀 xxx.example.com 命中 example.com)走代理;loopback 永远直连。
node scripts/build.mjs
跨平台(Windows/macOS/Linux)。工具链定位:优先本机 node_modules(标准 npm install 流程);本开发机故意不装 devDeps,自动回退复用 D:/ai/dsh/dsh/dsh-capture/node_modules 借来的 tsc/tsdown(host tsc + client tsdown factory bundle)。可用 DSH_CAPTURE_NODE_MODULES 指定工具链目录。npm publish 前会自动执行本脚本(prepublishOnly)。
globalThis.fetch 替换(保留原引用,dispose 时还原):白名单 host → undici fetch + ProxyAgent(Clash 等);其余 → 原内置 fetch 原样直连;loopback 永远直连。~/.dsh/host-router/log.txt),喂设置页清单。clientFactory pipelining:0:避 Clash 关 idle 隧道复用死连接。/save 写完 config.json 立刻重建 myFetch(毫秒级,免重启)。settings.section slot + React(纯 createElement),host webServer.register 前缀路由 /api/dsh-host-router/*(loopback-only 鉴权)。dependencies: {},运行时零 require,宿主 ctx 注入;不碰 settings.yaml provider 配置。配置走独立 ~/.dsh/host-router/config.json,而非 dsh 的 schemastery Config(live)。收益:省掉 settings binder(~460 行,绑 dsh 内部 API),稳、轻、跟 dsh 版本解耦。代价只是「live 重载为整体重建 myFetch」——而 /save 已经做到保存即生效,免重启。
MIT
FAQs
dsh 外挂式网络路由:按 hostname 给 dsh 请求分流——勾选的域名走本地代理(Clash 等),其余直连。内置嗅探,自动扫描 dsh 访问过的 hostname,设置页勾选即生效(保存即热生效,免重启)。纯外挂:dependencies 空,运行时零 require,全靠宿主 ctx 注入;不碰 settings.yaml provider 配置。
We found that dsh-host-router demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.