wenbin-wb/dsh-bridge
wenbin-wb/dsh-bridgeDeepSeek Harness 远程与移动端接入插件:提供局域网扫码直连、Cloudflare 与自建公网隧道,以及微信、QQ、飞书、Telegram 机器人交互,内置安全认证与访问控制。
Listed in awesome-dsh-plugin · DeepSeek Harness plugin
Current release: v0.5.0 · Distributed through GitHub Releases
English | 中文
dsh-full-remote is a plugin for DeepSeek Harness. It places an authenticated reverse proxy in front of the Harness Web server, so the Web UI can be used through a public tunnel or from a device on the local network while privileged APIs such as settings, credentials, and directory browsing remain available.
and session navigation; page-lifetime drafts, offline guards and no write replay.
connection pool, activity-aware expiry and visibility-aware, non-overlapping polling.
and loopback-only proxy-management boundary.
Fifteen paired local HTTP rounds against the previous already-gzipped version; these are cumulative request times, not LCP or real mobile page-load measurements.
Scenario · Baseline → 0.5.0 candidate · Meaning Cold HTML + 4 entry assets · 42.08 → 25.61 ms; 415,637 → 415,534 B · −39.1% HTTP time, only 0.025% fewer body bytes 40 warm static requests · 424.68 → 28.15 ms; upstream requests 40 → 0 · −93.4% HTTP time, not 100% less downstream traffic 40 conditional requests · Body 0 → 0 B; headers 6,360 → 9,800 B · Both already return 304; candidate avoids upstream but adds metadata 10 synthetic dynamic JSON requests · 8.82 → 10.25 ms · 16.2% slower locally; no API caching Real React components, simulated 60 s · Hidden RPCs 50 → 0; slow visible RPCs 48 → 20 · Normal visible RPCs stay 50; not a battery-life claim
Full method, same-encoding controls, limits and reproduction: English benchmark · 中文完整报告.
curl -fLO https://github.com/JUANWANG-BUAA/dsh-full-remote/releases/download/v0.5.0/dsh-full-remote-0.5.0.tgz
dsh plugin --profile web add ./dsh-full-remote-0.5.0.tgz
dsh --profile webIn Settings → Reverse proxy, press Start proxy, then Start Cloudflare quick tunnel and scan the generated QR code. The invite is one-time and never contains the standing access token. For a controlled network, point an existing SSH, frp, ngrok, Tailscale, or cloudflared tunnel at the proxy target shown in the panel instead.
The quick tunnel is optional and temporary, not a managed production deployment. Read Security model before exposing a listener to the Internet. For composition details, see Compatibility and composition.
Desktop control panel · Mobile workspace ·
Task cockpit inbox · Cockpit question form ·
DeepSeek Harness binds its Web server to a loopback address and only accepts privileged requests when the Host and Origin headers refer to a loopback address. When the UI is reached through a generic tunnel, these headers carry the public hostname and the trust check fails. The page loads, but the following methods return 403:
settings.*credentials.*host.listDirectoryApproach · Result Generic tunnel (SSH port forward, Caddy, binding 0.0.0.0) · Page loads; settings.* / credentials.* / host.listDirectory return 403 LAN-only plugin without authentication · Usable on the local network; not suitable for public exposure Password prompt without header rewriting · Requests are authenticated, but the privileged APIs remain blocked
The plugin inserts a reverse proxy between the tunnel and the Harness Web server. The proxy:
Host and Origin to 127.0.0.1 before forwarding, so theprivileged APIs pass Harness's trust check;
forwarded;
negotiate Brotli/gzip when eligible (not SSE or WebSocket);
stopping the proxy, changing the listen address, rotating the token, and managing device sessions.
Because the rewrite disables Harness's original trust check for remote clients, the plugin provides its own access-control layer in its place. This layer is described under Security model.
The plugin can optionally start a temporary Cloudflare quick tunnel. Any managed tunnel (cloudflared, ngrok, frp, SSH, Tailscale) can also point at the local endpoint it publishes.
flowchart LR
A[Phone or remote browser] --> B[Public tunnel<br>cloudflared / ngrok / frp / SSH]
B --> C[dsh-full-remote<br>127.0.0.1:3081<br>authentication + header rewrite]
C --> D[DeepSeek Harness Web<br>127.0.0.1:3080]plugin's listener (127.0.0.1:3081 by default).
invite, or an existing device session. Requests that fail authentication do not reach the backend.
Host/Origin to loopback, removes untrustedheaders, and forwards the request to the Harness Web server at 127.0.0.1:3080. Compressible HTTP responses (HTML/JS/CSS/JSON/SVG, ≥1 KB) may use Brotli/gzip; SSE and WebSocket are not compressed. Eligible hashed /assets/* files receive private immutable caching and bounded device-isolated server variants. HTML/API are not stored in that static cache. See HTTP transport and the benchmark.
settings.describe / update / replace / mutatecredentials.describe / set / unsethost.listDirectory / pickDirectory / openPathagentPreset.*, llm.discoverModels0600; reveal androtation are performed from the local panel
credential, and only a hash is persisted. Devices can be renamed or revoked from the panel, which also shows each device's source IP (at login and most recently seen).
approved from the local panel
expiry). Same-IP browser retries within 60 s reuse the original device session so a flaky tunnel dropping the redirect cannot deadlock the phone into the token form or spawn a duplicate device. The link does not contain the standing token.
trustForwardedFor to use real client IPs from a trusted localtunnel in CIDR / rate-limit / audit via its rightmost X-Forwarded-For value; CF-Connecting-IP is a separate Cloudflare-only opt-in, and loopback or malformed forwarded values are never trusted
settings.describe with the same Host/Originrewrite the proxy uses
start, stop, WebSocket open/deny/reject) with an in-panel viewer for recent events and JSON export; rotates past 8 MB, keeping one previous generation
tlsCertFile / tlsKeyFile)/_dsh_reverse_proxy/healthzper remote IP
stripped; upstream set-cookie is removed
/assets/* use private immutable browser caching and a device-scoped encoded LRU (8 MiB / 128 entries / at most five minutes). ETag hits can return 304; authentication/CIDR precede hits. The server-side static cache excludes API, HTML, Set-Cookie and unknown Vary responses; browser caching still respects upstream policy.compressResponses: false / cacheHashedAssets: false. See HTTP transport for the contract and the benchmark for measured gains and regressions.get a https://…trycloudflare.com address — no public IP or port forwarding required
cloudflaredPath → PATH → a pinned(2026.8.2), SHA256-verified download cache; failed checksums are discarded
(rate limiting / CIDR / audit see real client IPs) and reverts when the tunnel stops; the tunnel forwards to the proxy listener, so the token gate, approval and audit all keep applying
the QR, scan from the phone (the panel shows it and the Origin can still override it)