tonyAmadeus/dsh-proxy-switch ↗★ 0

dsh-proxy-switch

DSH 出站代理开关:本地路由器按模式在 Clash 与直连之间自动选路,界面一键切换,无需重启。Outbound proxy switch for DeepSeek Harness: local router picks Clash or direct per mode, with an in-UI switch. 在界面提供直连与Clash代理切换,适合需要灵活控制网络出站流量的用户。

パッケージ
dsh-proxy-switch
互換性
未検証
Cordis ピア範囲
~4.0.5
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/10/17

同名パッケージの別リポジトリ

インストール

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

ドキュメント

README 全文を読む ↗

使用

对话输入框旁会多一个 🌐 按钮:

模式行为何时用
自动(默认)探测 Clash(1 秒缓存):在线 → 走 Clash;离线 → 直连日常
直连一律直连明确不开 Clash
走 Clash一律走 Clash,不自动回退必须确保走节点

切换即时生效——路由器在每条连接上重读模式文件,不需要重启 DSH。 面板底部会显示 Clash 在线/未运行、路由器在线/离线。


配置

默认配置在插件的 cordis.patch.yml。要覆盖,在 profile 的 cordis.patch.yml 里加一条同 id 的 patch 条目(profile 是 ~/.dsh/profiles//):

- id: dsh-proxy-switch
  config:
    routerPort: 17897
    clashPort: 7897
字段默认值说明
routerPort17897本地路由器监听端口(.env 要指向它)
clashPort7897Clash / Mihomo 的混合端口(Clash Verge Rev 默认 7897,原版 Clash 常见 7890)
modeFile$DSH_HOME/proxy-mode.txt模式文件(auto / direct / clash)
logFile$DSH_HOME/dsh-proxy-switch.log运行日志(超 512KB 自动截断)

$DSH_HOME 默认是 ~/.dsh,可用环境变量覆盖。