minatoAI/dsh-net-proxy-plugin ↗★ 0
dsh-net-proxy-plugin
Fallback network proxy for DeepSeek Harness: detects system proxies, probes overseas connectivity (Google/GitHub), routes dsh outbound HTTP through a working local proxy when direct access fails.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:minatoAI/dsh-net-proxy-plugin说明文档
阅读完整 README ↗使用
启动后代理检测自动进行。首次探测需要几秒钟(直连 + 各候选 × 目标,每个最多 probeTimeoutMs);此窗口内发起的一次直连请求可能失败,下一次重试就会命中已激活的代理。
- 激活成功:dsh 日志输出
dsh-net-proxy: activated (system, ...)与probe done摘要。 - Web UI 输入
/net-proxy查看当前状态(激活的代理、来源、激活时间、直连可达性),/net-proxy refresh立即重检。
配置
在 profile 的 cordis.patch.yml 里覆盖 net-proxy 行:
- id: net-proxy
config:
targets: [https://www.google.com/generate_204, https://github.com]
probeTimeoutMs: 5000
reprobeIntervalMs: 300000
bypassHosts: [localhost, 127.0.0.1, ::1, api.deepseek.com, "*.deepseek.com"]
extraProxies: [http://127.0.0.1:7890]
probePorts: [7890, 7897, 10809]
activation: auto
| 字段 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
targets | https://www.google.com/generate_204, https://github.com | 连通性探测目标 |
probeTimeoutMs | 5000 | 单次探测超时 |
reprobeIntervalMs | 300000 | 周期复检间隔;0 关闭 |
bypassHosts | localhost, 127.0.0.1, ::1, api.deepseek.com, *.deepseek.com | 激活后仍直连的主机(精确 / *.domain 通配 / *) |
extraProxies | [] | 手动指定的代理,优先于自动发现 |
probePorts | 7890, 7897, 7891, 10809, 10808, 8888, 8080 | 扫描的本地端口 |
activation | auto | auto:直连失败才启用;always:有可用代理即启用 |
fetchTimeoutMs | 30000 | net-proxy web 提供方超时 |
maxResponseBytes | 5000000 | net-proxy web 提供方响应上限 |
maxRedirects | 5 | net-proxy web 提供方同源重定向上限 |