Customer-machine access plugin for deepseek-harness-gateway: opens a single outbound WebSocket to the gateway and relays the machine local dsh web UI over that tunnel using pairing-code + HMAC auth, so no inbound port, port mapping, or public IP is needed.
Install
# from npm (prebuilt)
dsh plugin --profile web add @januory/dsh-gateway-agent
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:januory/deepseek-harness-gateway#path:/plugins/dsh-gateway-agent
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
The customer-machine access plugin for deepseek-harness-gateway.
What it is
dsh-gateway-agent is a DeepSeek Harness plugin installed in the dsh that runs on a customer machine. It opens a single outbound WebSocket to the gateway and bridges the machine's local dsh web UI over that same tunnel — so the machine needs no inbound port, port mapping, or public IP.
Requirements
- A DeepSeek Harness installation (web profile) on the machine.
- The gateway server (see
../../apps/gateway) running and reachable from the machine, e.g.wss://gateway.example.com/agent. - A pairing code issued by the gateway administrator.
Install
dsh plugin --profile web add ./plugins/dsh-gateway-agent
(Once published, this becomes dsh plugin --profile web add @januory/dsh-gateway-agent.)
Usage
- Ask the gateway administrator for a pairing code.
- Open the machine's dsh web UI and go to Settings → 网关接入 (Gateway access).
- Enter the gateway address (
wss://<gateway-host>/agent) and the pairing code, then click 发起入网申请 (Request onboarding). - After the machine is approved at the gateway, the plugin reconnects automatically and keeps the tunnel alive — the machine is then operable from the gateway portal.
Configuration
The plugin persists its configuration as JSON at $DSH_HOME/dsh-gateway-agent/config.json:
| Key | Description |
|---|---|
gatewayUrl |
The gateway WebSocket endpoint, e.g. wss://gateway.example.com/agent. |
pairingCode |
The pairing code issued by the gateway administrator. |
dshPort |
The local dsh web port to bridge (default 3080). |
Values entered in the 网关接入 UI are saved here; the plugin auto-connects on boot when gatewayUrl is already set.
How it works
The plugin runs as a dsh host plugin (Node) plus a small settings card in the browser client. On the host side it dials gatewayUrl, completes a pairing-code + HMAC challenge-response, then relays browser requests and WebSocket streams from the gateway to the machine's loopback dsh web (127.0.0.1:<dshPort>), injecting an operator cookie minted in-process via the dsh Connection service. Each relayed request is re-declared as one consistent same-origin loopback request: besides rewriting Host, the agent sets Origin (and any Referer) to http://127.0.0.1:<dshPort>, so third-party handlers that require Origin === Host — such as the plugin market's POST routes — work over the tunnel too.
See the project README for the full architecture.
Daemon supervision (optional, off by default)
Tick Settings → 网关接入 → 守护进程服务 and the machine’s dsh lifecycle (start / stop / restart) is owned by a standalone supervisor process, so the gateway portal’s machine catalog can control it remotely.
Leave it unticked if you do not need remote lifecycle control — nothing else changes.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 8835
Remote control of a dsh web workspace from phone or PC: QR-code pairing through a token-gated channel, SSE real-time sync, and separate mobile and full desktop GUI modes.
zhu1090093659/dsh-web#packages/dsh-ssh★ 8835
SSH ops panel for DSH: web terminal, SFTP transfer with progress, local port forwarding, and one-command cluster execution across hosts; agents share the same host config.
saya-ch/dsh-mobile★ 479
Access DeepSeek Harness from the Android app or a mobile browser with secure LAN and remote connections, persistent device pairing, and a customizable mobile interface.
liguobao/ds-harness-remote★ 345
Multi-device remote access for DeepSeek Harness: continue an active session from your phone, tablet, browser, or another computer over an end-to-end encrypted channel (Noise IK + adaptive relay/WebRTC transport), with device authorization, ApiProxy-only remote capabilities, and read-only file preview via dsh-file-viewer — no shell, remote desktop, or write access.
ZSeven-W/dsh-ios★ 326
A live iOS Simulator or USB-connected iPhone inside the conversation: 22 agent tools for booting, building, driving the UI by accessibility identity or OCR text, list-row actions and SwiftUI preview hot reload, plus a streaming sidebar panel you can tap and drag on.
wenbin-wb/dsh-bridge★ 199
Remote and mobile access for DeepSeek Harness: provides LAN QR code connection, Cloudflare/custom tunnels, WeChat, QQ, Feishu, Telegram bot integration, and security authentication.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.