dsh-net-proxy
DeepSeek Harness network-proxy plugin: route the agent's own network requests (web_search / web_fetch / external APIs) through a configured HTTP/HTTPS-CONNECT/SOCKS5 proxy, persisted and auto-applied at startup, with a settings UI.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mafeis/dsh-net-proxy说明文档
阅读完整 README ↗dsh-net-proxy
DeepSeek Harness 网络代理插件:让 agent 自己发起的网络请求(web_search / web_fetch / 外部 API)走你配置的 HTTP / HTTPS-CONNECT / SOCKS5 代理,配置持久化、启动即自动生效,并提供可视化设置页。
- 服务端:包装 agent 进程的全局
fetch,让所有请求走代理(手写转发,无第三方代理依赖)。 - 配置存储在
$DSH_HOME/net-proxy.json,设置页经同源路由/_dsh/net-proxy读写,改动即时生效、无需重启。 NO_PROXY默认排除本地回环。
安装
dsh plugin --profile web add github:mafeis/dsh-net-proxy
安装后重启 dsh web,在 设置 → 网络代理 里启用并填写代理地址(如 127.0.0.1:7890)。
也可手动在 profile 的 cordis.patch.yml 加入:
- insert:
- id: net-proxy
name: 'dsh-net-proxy'
配置字段(net-proxy.json)
| 字段 | 默认 | 含义 |
|---|---|---|
enabled | false | 是否启用代理 |
protocol | http | http(含 CONNECT 隧道)或 socks5 |
host / port | 127.0.0.1 / 7890 | 代理地址 |
username / password | 空 | 可选认证 |
noProxy | ["127.0.0.1","localhost","::1"] | 命中则直连 |
许可证
MIT
变更记录
v0.2.5
index.js的设置路由 handler 抽到lib/routes.js(纯函数,新增 4 项单测,共 24 项全绿)。client.js拆组件:把NetProxySection的巨型 return 拆为Header/StatusBadge/StatusToggle/ProbeResult纯展示子组件(渲染等价、不动 UMD 结构)。- 新增 eslint 门禁(
eslint.config.js+npm run lint,接入 CI;--legacy-peer-deps适配私有@deepseek-ai/*peer);加.gitignore。
v0.2.4
- 继续工程化拆分: 拆为 (连接/隧道与 ByteStream、HTTP/1.1 请求、HTTP/2 请求、入口与协议分发), 变为纯 re-export 聚合入口;行为不变,20/20 全绿。