looeton/dsh-plugin-proxy-env ↗★ 0
dsh-plugin-proxy-env
DeepSeek Harness plugin: inject proxy environment variables at startup and self-check the whole proxy chain
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:looeton/dsh-plugin-proxy-env说明文档
阅读完整 README ↗配置项
通过 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
| 键 | 默认 | 说明 |
|---|---|---|
enable | true | 总开关 |
proxyUrl | 自动 | 完整代理地址;留空则按 port → Windows 系统代理 → 已导出的环境变量顺序解析 |
host | 127.0.0.1 | 本地代理主机 |
port | 0 | 直接指定端口 |
noProxy | 见上 | NO_PROXY 内容 |
override | false | 是否覆盖已存在的同名变量 |
patchGlobalDispatcher | true | 动态 import undici,把全局 dispatcher 换成 EnvHttpProxyAgent,让运行时的 Node 请求也走代理 |
selfCheck | true | 启动时自检 |
writeReport | true | 写 $DSH_HOME/proxy-env/report.json |
tool | true | 注册 proxy_env_check 工具 |
probeUrl | https://www.google.com | 只有走代理才通的探针 |
directProbeUrl | https://example.com | 直连探针 |
dnsHost | example.com | fake-ip 检测域名 |
timeoutMs | 15000 | 单个探针超时 |
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
| Key | Default | Purpose |
|---|---|---|
enable | true | master switch |
proxyUrl | auto | full proxy URL; when empty the order is port → Windows system proxy → exported env var |
host | 127.0.0.1 | local proxy host |
port | 0 | explicit port |
noProxy | see above | NO_PROXY contents |
override | false | overwrite existing variables |
patchGlobalDispatcher | true | dynamically import undici and switch the global dispatcher to EnvHttpProxyAgent, so runtime Node requests use the proxy too |
selfCheck | true | run the check at startup |
writeReport | true | write $DSH_HOME/proxy-env/report.json |
tool | true | register the proxy_env_check tool |
probeUrl | https://www.google.com | only reachable through the proxy |
directProbeUrl | https://example.com | reachable directly |
dnsHost | example.com | host used for the fake-ip check |
timeoutMs | 15000 | per-probe timeout |