dsh-remote-control Plugin: Remotely Controlling Another Desktop in DSH

Introduction

When using DeepSeek Harness (DSH), you often encounter scenarios where you need to take over a session from another computer or phone, respond to approval requests, or view conversation history. Traditional approaches typically rely on cloud accounts or manual file transfers, which introduce an extra intermediary and raise privacy and security concerns.

DSH’s design philosophy is “everything is a plugin,” and the kangronghuuu/dsh-remote-control plugin is a remote control capability built around this philosophy. Instead of depending on third-party cloud services, it enables two DSH desktops to discover and pair with each other directly over a local network, Tailscale tailnet, or a self-hosted Relay, achieving point-to-point session takeover.

Plugin Overview

dsh-remote-control is a DSH client plugin for viewing and controlling sessions on other paired desktops from the DSH Devices panel or a mobile web page. It is maintained by Kangrong Hu, licensed under MIT, and requires DSH 0.2.x and Node.js 20+.

The core value proposition: no cloud account intermediary required. Once paired, you can directly read and write remote sessions over LAN or Tailnet, with support for HITL approvals, file previews, message queues, and notifications.

Installation & Activation

Install from the DSH Plugins page by adding the plugin package to your current profile:

cd ~/.dsh/profiles/<your-profile>
pnpm add dsh-remote-control-plugin --registry=https://registry.npmjs.org/

After installation, enable the bundle on the Plugins page (or via plugin_manager set_bundle). Restart DSH after making host-side changes, and refresh the GUI page after making client-side changes.

Devices Panel & Chat Features

Once enabled, a Devices panel appears in the DSH sidebar, with two tabs: Chat and Settings.

Chat Tab

In Chat, select a paired device, then choose one of its sessions to perform the following:

  • Send a prompt: type content and press Enter to send (Shift+Enter for a new line)
  • Queue/steer messages: use the Queue / Steer toggle at the top when the session is running; the queue list below allows you to steer or discard pending messages
  • Long session navigation: use Load earlier messages, up/down arrows, or Turn n/m to jump
  • Approvals & questions: approval cards and question cards initiated by the remote session appear locally; click Allow or Deny
  • Attachments: supports Ctrl+V paste, drag-and-drop, or clicking Attach; images render as thumbnails, other files open a preview/download
  • New session: click New in the chat header
  • Model & permission presets: the model selector, permission presets, and plan mode below also apply to the remote session

The chat UI rendering is consistent with the mobile page: supports Markdown (tables, code blocks, links), collapsible tool calls (with parameters and output), colored diffs, copy buttons, collapsed cards, and ×N collapsing for repeated progress lines.

Settings Tab

Settings contains three collapsible cards:

  • Service: displays service status, tunnel URL, and its QR code
  • Pairing: shows the pairing code and QR code, with Rotate code and Rotate + sign out devices buttons
  • Notifications: configure notification channels and fields

Mobile Web Page

The same Host provides a mobile-friendly web page accessible at http://<host>:57330 (or the tunnel/Tailnet URL). The page pairs with the Host via a 6-digit pairing code or QR code, and uses an HttpOnly Cookie to remember the device. The mobile client offers the same chat features as the desktop, with the UI optimized for small screens.

Device Pairing & Trust Model

The pairing flow is as follows:

  1. The Host broadcasts itself on the LAN; if Tailscale is installed, it probes tailnet neighbors every few seconds
  2. Select the other device in the Devices panel and click Request
  3. A request is displayed, including the initiator’s name, account, and a 6-digit SAS code
  4. Both parties confirm the SAS and click Allow

Invocations use request signatures, scoped by path (sessions:list, transcript:read, prompt:send, stop, config:read, config:write, files:write) and rate-limited. Approval records are stored with 0600 permissions in the DSH home directory. Clicking Revoke immediately revokes a device’s permissions. Records from older versions that lack identity keys are marked as needsReapproval rather than failing silently.

Tailnet membership is used for reachability only and does not constitute a trust basis. The plugin maintains its own trust system on top of identity verification, SAS checks, and scoping.

Cross-Network Reachability

The plugin requires no public IP or open ports, and automatically selects the best transport channel based on reachability:

  • LAN: both parties are on the same subnet
  • Tailnet: both parties are on the same Tailscale tailnet (WireGuard handles transport; the plugin adds an encapsulation layer)
  • Relay: a self-hosted or joined Relay URL
  • Tunnel: uses cloudflared quick tunnels, with signature verification on download

Each device records the addresses it has actually seen (LAN + Tailnet). Broadcasting cannot override a working tailnet address; after a failure, it automatically switches to candidate addresses.

Encryption

The pairing process generates an ephemeral X25519 key pair between both parties. After HKDF derivation, AES-256-GCM is used to encrypt each invocation’s encapsulation. Ephemeral keys never leave the process. After either side restarts, a signature-authenticated handshake request switches the lane without requiring re-pairing. Handshake proofs are bound to the sender’s nonce, enabling lane reconstruction even if both sides’ pairing nonces differ.

Reachability Modes & Service Configuration

The Host’s listen address is always bound to 0.0.0.0:57330; the externally broadcast URL is determined by the service provider:

  • lan-only: http://<lan-ip>:57330, used when the phone is on the same network
  • tunnel: https://<random>.trycloudflare.com, used when neither LAN nor tailnet is available; cloudflared signature is verified on download
  • tailnet (auto): https://<host>.<tailnet>.ts.net, automatically used when Tailscale is installed and certificates are enabled (when publicUrl is empty)
  • relay: a custom Relay URL, used when accessible by both parties

All of the above can be started/stopped and scanned via QR code in Devices → Settings → Service, and is also scriptable via the /remote-control/api/service API.

Configuration

Plugin settings are stored in $DSH_HOME/remote-control-settings.json (default: ~/.dsh):

{
  "hitl": { "takeover": "claim" },
  "publicUrl": "https://desktop-example.tailnet.ts.net",
  "trustedHosts": ["desktop-example.tailnet.ts.net"],
  "notify": {
    "kind": "smtp",
    "events": ["approval", "question"],
    "baseUrl": "https://desktop-example.tailnet.ts.net",
    "to": "you@example.com",
    "from": "you@example.com",
    "smtpHost": "smtp.gmail.com",
    "smtpPort": 587,
    "smtpUser": "you@gmail.com",
    "smtpPass": "password"
  }
}

Use Cases & Caveats

This plugin is suitable for the following scenarios:

  • Taking over a session, responding to approvals, or steering a conversation from a phone or another desktop
  • Achieving point-to-point control over a local network or Tailscale, avoiding cloud accounts
  • Unified management of session viewing and interaction across multiple DSH desktops

Caveats:

  • The plugin runs with the permissions of the current DSH process; review the source code and license before installing
  • After pairing, the device has access to remote sessions—ensure network reachability and trust settings meet your security requirements
  • The choice of network mode (LAN/Tailnet/Relay/Tunnel) affects configuration and connection behavior

Summary

The dsh-remote-control plugin provides DSH with cloud-free, intermediary-free remote control capabilities through the Devices panel and a mobile web page. It supports HITL approvals, file previews, message queues, notifications, and multiple network modes, enabling point-to-point session read/write and takeover over a local network or Tailscale.

  • Plugin homepage: https://www.skillhub.cn/plugins/kangronghuuu/dsh-remote-control
  • Source repository: https://github.com/kangronghuuu/dsh-remote-control
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye