minatoAI/dsh-net-proxy-plugin0

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.

包名
dsh-net-proxy-plugin
版本
0.1.0
许可证
MIT
最近更新
2026年8月30日

安装

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

使用

启动后代理检测自动进行。首次探测需要几秒钟(直连 + 各候选 × 目标,每个最多 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
字段默认说明
enabledtrue总开关
targetshttps://www.google.com/generate_204, https://github.com连通性探测目标
probeTimeoutMs5000单次探测超时
reprobeIntervalMs300000周期复检间隔;0 关闭
bypassHostslocalhost, 127.0.0.1, ::1, api.deepseek.com, *.deepseek.com激活后仍直连的主机(精确 / *.domain 通配 / *
extraProxies[]手动指定的代理,优先于自动发现
probePorts7890, 7897, 7891, 10809, 10808, 8888, 8080扫描的本地端口
activationautoauto:直连失败才启用;always:有可用代理即启用
fetchTimeoutMs30000net-proxy web 提供方超时
maxResponseBytes5000000net-proxy web 提供方响应上限
maxRedirects5net-proxy web 提供方同源重定向上限