mafeis/dsh-net-proxy
Route agent network requests through a local HTTP/CONNECT/SOCKS5 proxy.
Listed
4
Tools
Bundle verified
Preview
What it does
Route agent network requests through a local HTTP/CONNECT/SOCKS5 proxy.
Best for
- DSH agents whose web searches, fetches, or external API calls must pass through a local HTTP/CONNECT or SOCKS5 proxy.
- Environments that need proxy authentication, persistent settings, and configurable direct-connect exclusions.
- Users who want proxy changes to take effect without restarting DSH.
Not ideal for
- Users whose agent already has unrestricted direct network access and needs no proxy routing.
- Traffic outside the agent process; the plugin specifically wraps network requests initiated by the agent.
- Scenarios requiring a remote proxy management service rather than a locally configured proxy endpoint.
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
- 继续工程化拆分:
proxy-fetch.js拆为lib/proxy/{conn,http11,http2,request}.js(连接/隧道与 ByteStream、HTTP/1.1 请求、HTTP/2 请求、入口与协议分发),proxy-fetch.js变为纯 re-export 聚合入口;行为不变,20/20 全绿。
v0.2.3
- 抽取
lib/proxy/body.js的公共响应体解码 sink(makeBodyController),去重 HTTP/1.1 与 HTTP/2 的「按编码建解码器 → dec data/end/error → 收尾」逻辑;行为不变,新增 3 项单测(共 20 项全绿)。
v0.2.1
-
ByteStream分帧读取加固(修复 SOCKS5 CONNECT 头+BND 同帧时 BND 被吞的 bug),新增bytes/config单元测试(共 17 项全绿)。 -
lib/config.js拆为纯配置函数(无 schemastery 依赖,可在无 peer 的本地直接测试);Configschema 移回index.js。
v0.2.0
- 工程化重构:
proxy-fetch.js拆分叶子模块lib/proxy/{errors,no-proxy,parse}.js;删除死代码(顶层readExactly/readHead);抽取createDecoder消除 HTTP/1.1 与 HTTP/2 解压重复;新增@typedef NetProxyConfig类型契约;修复 probe CLI 的--proxy http://...解析。 - 新增 CI(GitHub Actions)与单元测试覆盖(HTTP/SOCKS5 真实连通验证)。
Frequently Asked QuestionsFAQ
Use the verified command dsh plugin --profile default add github:mafeis/dsh-net-proxy in a DSH-enabled shell. The command resolves the public package metadata and keeps the plugin attached to the catalog identity shown on this page.
Compatibility follows the bundle and profile status shown above. If a profile is not detected, keep the plugin disabled there and check the repository documentation before enabling it in production.
The GitHub link and activity metadata are the source of truth for releases and maintenance. Revisit this page after a new release to confirm the catalog has observed the latest version.