LoserFox/marisa-distro--plugins-dsh-model-proxy7

dsh-model-proxy

Route DSH model/web requests through HTTP_PROXY at the transport layer and export the same proxy to agent shell children without rewriting model API endpoints.

包名
dsh-model-proxy
版本
0.1.2
许可证
MIT
最近更新
2026年8月25日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LoserFox/marisa-distro#4aa96256d0af09fa65e64679a1c7826342e9ded2&path:plugins/dsh-model-proxy

配置

在 Web 设置页打开「插件 → 插件配置 → 模型代理」即可修改;Host 确认写入后立即同时 更新模型/Web 请求的 transport 和 Agent shell 继承的 HTTP_PROXY。也可以在 profile 的 cordis.yml 里给本插件配置以下字段,全部可选:

字段含义默认
proxy上游代理 URL:socks5://socks5h://http://https://(不含认证信息),或 directHTTP_PROXYHTTPS_PROXYALL_PROXY;都没有时用 http://127.0.0.1:10808
noProxy命中则直连的主机列表(追加到环境变量 NO_PROXY 之上)[]

环境变量示例:

$env:HTTP_PROXY = 'http://127.0.0.1:10808'

user:pass 的代理仍受 transport 支持,但只应通过上述标准代理环境变量提供, 避免认证信息进入浏览器可读的 Host 设置快照。

显式配置 direct 时插件不做任何事。Web 设置会拒绝非法 URL;启动配置中的 非法 URL 会记 warning 并保持直连。 插件不会设置或改写 DEEPSEEK_BASE_URL:DeepSeek endpoint 始终由适配器保持为 https://api.deepseek.com(除非用户自己在模型设置中覆盖)。

插件会把最终解析出的代理写入宿主进程的 HTTP_PROXY,因此 DSH 的本地 subprocess seam 会把它保留给 Agent 发起的 pwsh / bash tool call。插件卸载时 恢复原环境值。代理 URL 可能携带认证信息,因此启用该行为意味着模型启动的 本地子进程可以读取该代理配置;它不会得到模型 API key。