Cjrrrrrrrr/dsh-plugins

dsh-hiddify

不打开 Hiddify 桌面版也能用它:七个工具起停内核、切换分流模式(重建配置并重启内核)(外网走代理/国内与内网直连)、经 Clash 控制面轮换出口节点,并经代理做多引擎检索与网页抓取。仅 Windows。

工具与能力academic-searchcordis-plugindeepseek-harness

dsh-hiddify

Drive a local Hiddify installation from DeepSeek Harness — without opening its desktop GUI. The plugin runs HiddifyCli.exe in standalone mode to start and stop the core, hot-switch split-tunnel modes, rotate exit nodes, and search or fetch pages through the proxy.

Part of Cjrrrrrrrr/dsh-plugins. Windows only.

What it solves

NeedHow this plugin does it
Drive Hiddify without its GUIRuns HiddifyCli.exe build + run --full-config in standalone mode; the desktop app does not need to be running
Reach the internet and the LAN at oncePrivate-network ip_cidr → direct rules go first in route.rules, plus a system-proxy ProxyOverride allow-list as a second line of defence
Control split-tunnellinghiddify_mode hot-switches between global / cn-bypass / direct
Change exit nodehiddify_nodes drives the core's Clash REST control plane (PUT /proxies/select) — no restart
Search from behind the proxyhiddify_search queries several engines concurrently, de-duplicates across them, sends foreign engines through the proxy and domestic ones direct
Archive a page's texthiddify_fetch fetches through the proxy and converts the page to plain text

Seven tools

ToolWhat it does
hiddify_statusCore PID, ports, mode, system-proxy state and selected node — plus a live three-way connectivity test (foreign / domestic / LAN)
hiddify_startStart the core; mode / port / systemProxy / lanDirect can be overridden per call
hiddify_stopStop the core (turns the system proxy off too by default, so nothing is left pointing at a dead port)
hiddify_modeHot-switch the split-tunnel mode
hiddify_nodesList nodes, select one, return to auto, or measure latency
hiddify_searchMulti-engine search
hiddify_fetchFetch a page's text through the proxy

Requirements

  • Windows (uses taskkill, reg, powershell and Get-NetRoute).
  • Hiddify installed, with a subscription already added in the client. The plugin drives Hiddify's own HiddifyCli.exe; it does not ship or replace it.
  • No administrator rights. The system proxy is written under HKCU only.

Install

dsh plugin add github:Cjrrrrrrrr/dsh-plugins#path:/packages/dsh-hiddify

Then set two paths. The defaults point at the author's own install location, and Hiddify has no fixed install path — edit both lines in your profile patch before starting the core:

- id: hiddify
  name: '@local/dsh-hiddify'
  config:
    cliPath: 'C:\path\to\Hiddify\HiddifyCli.exe'
    workDir: 'C:\path\to\Hiddify'

Configuration

KeyDefaultMeaning
cliPathE:\Hiddify\HiddifyCli.exeFull path to HiddifyCli.exe
workDirE:\HiddifyHiddify's working directory
profilePath''Subscription config JSON. Empty = the newest *.json by mtime under %APPDATA%\hiddify\hiddify\configs\
port12399Local mixed proxy port (HTTP + SOCKS5 on one port)
clashPort6756Clash REST control plane
modecn-bypassglobal / cn-bypass / direct
lanDirecttruePut private-network ip_cidr rules first in route.rules
systemProxyfalseAlso switch the Windows system proxy on when starting
dataDir''Runtime state and generated configs. Empty = <plugin>/data

The three split-tunnel modes

Moderoute.finalRulesUse
globalselectLAN direct onlyEverything foreign through the proxy
cn-bypassselectLAN direct + .cn direct + geoip-cn/geosite-cn directRecommended: domestic and LAN direct, foreign through the proxy
directdirectLocal proxy port onlyTemporarily off

Private networks stay direct in every mode, so the LAN never drops: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16, 100.64.0.0/10, fc00::/7, fe80::/10, ::1/128. Internal suffixes: localhost, .local, .lan, .internal, .home.arpa, .arpa (resolved by the system resolver, dns-local).

Verified behaviour

Measured on Windows on 2026-10-16:

ItemResult
HiddifyCli.exe build -c <subscription> -o out.jsonExit code 0, produced a 32-node sing-box config
HiddifyCli.exe run -c out.json --full-configLogged CORE STARTED, mixed port listening — standalone works
Through the proxy: google / duckduckgo / raw.githubusercontentHTTP 204 / 200 / 200
Direct: baidu / qqHTTP 200 / 200 (LAN gateway reachable)
Core Clash control plane /proxies40 entries, 32 selector candidates, PUT node switch takes effect
Node rotation recovering a throttled engineBing returned unrelated results on a German node; after switching to Singapore-001, Bing and DuckDuckGo both returned 10/10 relevant hits
-d/--hiddify settings fileSome fields are ignored (only Region was read; BypassLAN/MixedPort/DNSOptions were not) — which is why this plugin rewrites the sing-box JSON after build instead
Desktop app running at the same timeCollides on 16450 (dns-in) and 6756 (clash) — the plugin moves dns-in to port + 51 and retries once if startup fails

Search engines measured through the proxy (2026-10-16)

EngineStatusNote
DuckDuckGo (html.duckduckgo.com/html/)WorksPrimary; repeated queries get rate-limited by exit IP (HTTP 202/403) — rotating the node restores it
DuckDuckGo LiteWorksSame, simpler markup
Bing (mkt=zh-CN&ensearch=0)Worksmkt is required; with only setlang it returns an empty result page
BaiduUnstable200 when direct, but quickly serves a security-verification page — not used for text extraction by default
360 SearchUnstableResults are so.com/link?m=… redirects; the real URL needs following
SogouNoReturns a 5.6 KB block page
GoogleNoReturns a JS wall (enablejs), no results
Brave / Startpage / Mojeek / Ecosia / Yandex / YepNo429 / 403 / JS wall / no results
Public SearXNG instances (20 sampled)NoAlmost all 429 or 403
MarginaliaPartialReachable, but very low recall for Chinese queries

Conclusion: the engines that actually work from outside are DuckDuckGo (plus Lite) and Bing, and both rate-limit or poison results by exit IP. The search layer therefore self-checks relevance and automatically rotates the node and retries when the hit count is too low.

Layout

lib/index.js   Cordis plugin — registers the seven tools
lib/core.js    HiddifyCli control layer (find subscription / build / inject split-tunnel / start & stop / Clash API)
lib/net.js     system-proxy switch + three-way connectivity probe
lib/proxy.js   zero-dependency CONNECT-tunnel HTTP client
lib/search.js  multi-engine search + HTML-to-text
test/          end-to-end smoke test, seven-tool mock-host test, and a long-running-core helper
data/          runtime state, generated configs and logs (created at run time)

Known limits

  • Windows only — depends on taskkill, reg, powershell and Get-NetRoute.
  • The system proxy is changed under HKCU only and needs no administrator rights. TUN mode is not enabled by this plugin: it needs administrator rights and the Wintun driver, so hiddify_start uses the system proxy plus a local port instead.
  • hiddify_fetch extracts text only — no JavaScript rendering, so single-page apps yield just their skeleton.
  • No Google in the search layer: it is behind a JS wall and no workaround was implemented.

License

MIT