looeton/dsh-plugin-proxy-env0

dsh-plugin-proxy-env

DeepSeek Harness plugin: inject proxy environment variables at startup and self-check the whole proxy chain

包名
dsh-plugin-proxy-env
版本
0.1.1
许可证
MIT
最近更新
2026年9月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:looeton/dsh-plugin-proxy-env

配置项

通过 patch 行或 profile 的 cordis.patch.yml 传入:

- id: proxy-env
  config:
    proxyUrl: http://127.0.0.1:7897   # 留空则自动探测
    noProxy: localhost,127.0.0.1,::1,api.deepseek.com
    selfCheck: true
    tool: true
默认说明
enabletrue总开关
proxyUrl自动完整代理地址;留空则按 port → Windows 系统代理 → 已导出的环境变量顺序解析
host127.0.0.1本地代理主机
port0直接指定端口
noProxy见上NO_PROXY 内容
overridefalse是否覆盖已存在的同名变量
patchGlobalDispatchertrue动态 import undici,把全局 dispatcher 换成 EnvHttpProxyAgent,让运行时的 Node 请求也走代理
selfChecktrue启动时自检
writeReporttrue$DSH_HOME/proxy-env/report.json
tooltrue注册 proxy_env_check 工具
probeUrlhttps://www.google.com只有走代理才通的探针
directProbeUrlhttps://example.com直连探针
dnsHostexample.comfake-ip 检测域名
timeoutMs15000单个探针超时

Configuration

- id: proxy-env
  config:
    proxyUrl: http://127.0.0.1:7897   # empty = auto-detect
    noProxy: localhost,127.0.0.1,::1,api.deepseek.com
    selfCheck: true
    tool: true
KeyDefaultPurpose
enabletruemaster switch
proxyUrlautofull proxy URL; when empty the order is port → Windows system proxy → exported env var
host127.0.0.1local proxy host
port0explicit port
noProxysee aboveNO_PROXY contents
overridefalseoverwrite existing variables
patchGlobalDispatchertruedynamically import undici and switch the global dispatcher to EnvHttpProxyAgent, so runtime Node requests use the proxy too
selfChecktruerun the check at startup
writeReporttruewrite $DSH_HOME/proxy-env/report.json
tooltrueregister the proxy_env_check tool
probeUrlhttps://www.google.comonly reachable through the proxy
directProbeUrlhttps://example.comreachable directly
dnsHostexample.comhost used for the fake-ip check
timeoutMs15000per-probe timeout