Introduction¶
The DeepSeek Harness (DSH) desktop version’s main Web service listens on 127.0.0.1:19387 by default. The official documentation advises against binding the main service to 0.0.0.0 to prevent the control plane from being exposed to the network. Consequently, mobile browsers cannot directly open workspaces and chat interfaces belonging to the same session as the desktop version.
If you wish to continue a current desktop session (streaming responses, Markdown rendering, tool call cards, image uploads) on your mobile phone within the same Wi-Fi or Tailscale network, you need to establish a separate key-protected channel alongside the desktop process and provide copyable access information in the settings. dsh-link, a community-maintained DSH client plugin, follows this approach.
What is this¶
dsh-link (GitHub: paayton/dsh-link, maintained by paayton) is a mobile H5 bridge plugin for DeepSeek Harness. It adds a Link tab to the desktop version’s settings page and launches an independent HTTP/WebSocket listener on the local machine. This allows mobile browsers to open a minimalist H5 interface to interact with actively running sessions on the Mac desktop version (workspace sidebar, basic chat, streaming responses, etc.).
The plugin is structured as a dual-segment Cordis plugin (a segment within the host process + a client segment for the desktop settings page). The H5 static assets require zero build steps and have zero third-party runtime dependencies. The current package version is 0.1.0, licensed under MIT, and is strongly bound to DSH desktop version 0.2.0-rc.2 (see compatibility below).
Core Features¶
The following summary is based on the capabilities described in the README and does not exceed the repository’s documentation.
Desktop Link Settings Tab¶
The client segment displays network status, connection keys, mobile access addresses, and operation instructions within Settings → Link. The control plane route /m/link/* is bound only to the loopback interface and authenticates via the desktop’s cookie (connection.admit), preventing sensitive operations like key generation from being exposed to the LAN.
Independent LAN Listening and Three Route Types¶
The host segment does not reuse the desktop’s main webServer but instead starts an independent listener on 127.0.0.1:19388 by default (bind address and port are configurable). Routes are isolated by audience:
| Prefix | Audience | Authentication | Exposure |
|---|---|---|---|
/m |
Mobile Browser (Static H5) | Public (No sensitive data) | Loopback + LAN |
/m/api/* |
Mobile H5 (Data + WebSocket) | Connection Key (Mandatory on LAN side) | Loopback + LAN |
/m/link/* |
Desktop Settings Page | Cookie | Loopback Only |
The LAN side only serves static H5 and read-only/chat APIs; it does not expose the full desktop control plane.
H5 Chat Experience¶
The H5 interface (src/public/) is a mobile-first single page application featuring: Markdown body text, thought blocks, tool call cards (expandable parameters/outputs), incremental streaming, pagination for earlier history, a session sidebar (filter/collapse/slide-out, settings panel), interruptible sending, and light/dark themes. It supports PWA “Add to Home Screen.” Static assets use content-hashed ETags, allowing seamless upgrades without version number changes when returning to the foreground or via scheduled self-checks.
Image Upload¶
After selecting a photo or taking a picture on the phone, the client compresses it to a 1568px long edge. It then exchanges it for a DSH fileUploads receipt via /m/api/upload and sends it with the prompt. Images in history and tool results are fetched and displayed via /m/api/attachment. If the profile does not inject fileUploads, the upload interface returns 503, but other functions remain operational.
Implementation Details (Relevant to Usage)¶
- Initial history comes from the
snapshotframe of thefollowstream; earlier messages are paginated using/m/api/messages?beforeSeq=. - The WebSocket server is a zero-dependency implementation developed specifically for the plugin (
ws-mini.ts) to adapt to environments where thewspackage cannot be resolved underlink:installations. - The host segment TypeScript is compiled to
dist/; changes to H5 files insrc/public/*take effect immediately upon saving, while changes to the host require a desktop restart.
Installation and Activation¶
Installation steps follow the repository README. You need to obtain the plugin source directory first, then link it into the desktop profile:
git clone https://github.com/paayton/dsh-link.git
# 1) Link plugin to profile (pnpm link)
dsh plugin --profile desktop add ./dsh-link
# 2) Add dsh-link to the dsh.profile.bundles array in ~/.dsh/profiles/desktop/package.json
# 3) Hot reload profile in desktop version (editing package.json triggers this) to take effect
To uninstall: Remove "dsh-link" from dsh.profile.bundles and execute:
dsh plugin --profile desktop remove dsh-link
Configuration is written in the config section of cordis.patch.yml:
| Key | Default | Description |
|---|---|---|
lanEnabled |
true |
Whether to enable independent listening |
lanPort |
19388 |
Listening port |
bindHost |
127.0.0.1 |
Bind address; change to "0.0.0.0" for mobile access via intranet/Tailscale |
Changing to 0.0.0.0 exposes the key-protected read-only/chat port to the local network. Intranet HTTP is plaintext; the README recommends using it only on trusted networks, or using Tailscale if security requirements exist. Be sure to generate a connection key in Settings → Link before connecting a mobile phone.
Typical Usage: Mobile Connection¶
After setting bindHost to 0.0.0.0 and enabling LAN listening:
- Open Settings → Link in the desktop version, click “Generate Key” and copy it.
- Connect the mobile phone and Mac to the same Wi-Fi, or log into the same Tailscale account.
- Open the address listed in the Link tab on the mobile browser, e.g.,
http://<intranet_IP_or_Tailscale_name>:19388/m/. - Enter the key (it will be saved automatically), enter the session sidebar, and start chatting.
If you encounter 404 errors or throwIfAborted errors after modifying host code or adding new APIs, the README requires restarting the desktop version (reorganizing the profile alone is insufficient to reload the host segment).
Use Cases and Notes¶
Who it is for: Developers running the DSH desktop version on Mac who want to follow the same session, view tool cards and streaming output in a mobile browser, and can accept intranet or Tailscale access methods.
Version: dsh-link 0.1.x corresponds to DeepSeek Harness desktop version 0.2.0-rc.2. The plugin relies on internal DSH APIs (sessionController, fileUploads, Cordis context, etc.). If interface errors occur after upgrading the desktop version, you need to sync the @deepseek-ai/* devDependency versions in the plugin repository and run pnpm typecheck.
Security and Permissions: The host segment runs with the same full permissions as the desktop version within the DSH process. Although the independent listener protects the chat port with a connection key, setting bindHost to 0.0.0.0 still exposes this port to the LAN. Read the source code and MIT license before installation; generate and use keys only on trusted networks.
Troubleshooting Quick Reference (Excerpt from README):
| Symptom | Resolution |
|---|---|
| Key gate prompt invalid | Re-enter the key on mobile after regenerating it on desktop |
404 on /m/api/upload etc. |
Restart desktop version to load new host code |
| Mobile cannot connect | Check if bindHost is 0.0.0.0 and if the port is lanPort |
Conclusion¶
dsh-link complements desktop DSH’s session access on the mobile side using a “Settings Tab + Independent LAN Service + Mobile H5” approach. The functional boundaries and route design are detailed specifically in the README. To view categories and summaries, you can open the community directory page; for source code, configuration options, and test instructions, see the GitHub repository.
- Directory Page: https://www.skillhub.cn/plugins/paayton/dsh-link
- GitHub: https://github.com/paayton/dsh-link