Skip to main content

dsh-pocket

273Stars22Forks7Issues0Watchers

Add a QR code entry to DSH for screen sharing. Users scan the QR code with their phone to view and operate DeepSeek Harness on the computer in real-time. Connects directly over LAN or via cloudflared tunnel for public networks.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
GPL-2.0
Branch
main
deepseekdeepseek-harnessdeepseek-harness-plugindshdsh-plugindsh-plugin-marketdsh-pluginsmobile

Install

cmdweb profile
$ dsh plugin --profile web add dsh-pocket

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin shaobeichen/dsh-pocket for me: review the repository at https://github.com/shaobeichen/dsh-pocket first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Add a mobile entry point to DeepSeek Harness on your computer: scan the QR code on your phone to see the same interface as your computer in the browser, view outputs, send tasks, and approve actions.

Core Features

  • LAN QR Code Direct Connection: After the plugin starts, it automatically launches a proxy. Scan the QR code in the settings page to access DSH on your computer via the same WiFi
  • Public Network QR Code Penetration (usable from anywhere): One-click cloudflared tunnel setup generates a random public URL, accessible from 4G or any network to connect back to your computer
  • Dual Password Isolation: Public network and LAN each have independent 8-digit passwords; public network password auto-refreshes each time it's enabled, invalidating old links immediately
  • WebSocket Real-Time Screen Sync: Streaming output and event channel passthrough; when content is output on the computer, the phone scrolls in sync, with bidirectional operation support
  • Mobile UI Adaptation: Narrow screens automatically switch to drawer layout, including status bar safe area and full-width session optimization
  • Traffic Compression: Large JSON responses are automatically compressed using gzip/brotli streaming; long sessions can be compressed from ~17MB to ~1MB, making phone loading faster
  • Tunnel Auto-Recovery: After DSH restarts, the cloudflared subprocess is recycled; the plugin will automatically relaunch the previous public tunnel on next startup based on persistent markers
  • One-Click Update/Self-Restart: Settings page can detect new versions and automatically restart the host process (detached handoff, no port conflicts)

Technical Implementation

  • Language: JavaScript (ESM + partial CJS) / includes inline HTML injection scripts
  • Key Dependencies: @deepseek-ai/cordis (host framework, peerDependencies), qrcode (generates QR code data URL), cloudflared (downloaded at runtime, public tunnel dependency)
  • Architecture Pattern: Single-package single-plugin, after injecting DSH Host, starts a 0.0.0.0 reverse proxy (default 3081) via lib/index.js#apply to rewrite inbound request Host/Origin and forward loopback to local DSH; also registers settings page RPC via ctx.connection.rpc.handle on /dsh-pocket loopback channel
  • Entry Files: lib/index.js (Cordis apply), bin/dsh-pocket.mjs (standalone CLI), client/index.jsx (settings page React entry)

Use Cases

Scenarios like on the way home from work, during business trips, or moving from living room to study: when you're not at your computer but want to see what stage your computer's agent has reached, want to send new tasks to the computer's agent, or approve an operation. Another use case is locking your computer screen and making your phone the only control terminal, saving the hassle of setting up remote desktop or SSH.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
Node.js>= 22Declared in package.json#engines
DeepSeek Harness (DSH)Version compatible with @deepseek-ai/cordis ^4.0.1Repository does not explicitly declare specific DSH version in package.json
PlatformmacOS / Windows / LinuxCross-platform; first time enabling public network on Windows, downloading cloudflared is slower (single-threaded), can manually install or use proxy
Native ModulesNoneAll pure JS dependencies, cloudflared for public tunnel is a binary, downloaded on-demand to $DSH_HOME/dsh-pocket/bin/ on first enable

Installation

dsh plugin --profile web add github:shaobeichen/dsh-pocket

Configuration

No additional configuration required. After the plugin starts, all adjustable options (LAN password toggle, password refresh, public tunnel toggle, one-click update/restart) are completed via UI in the "Mobile Access" tab of DSH's settings page. Internal files written:

  • $DSH_HOME/dsh-pocket/settings.json: LAN access password toggle (enabled by default, can be disabled via UI)
  • $DSH_HOME/dsh-pocket/token: Public network access password (rewritten automatically each time public network is enabled)
  • $DSH_HOME/dsh-pocket/token-lan: LAN access password (manually refreshed in settings page)
  • $DSH_HOME/dsh-pocket/tunnel-auto.json: Public tunnel "enabled" marker for auto-recovery after DSH restarts
  • $DSH_HOME/dsh-pocket/cloudflared(.exe): cloudflared binary cache downloaded when public network is first enabled

FAQ

Q: Where do I access it after installation?

A: After restarting dsh web, go to DSH's "Settings" page. The left sidebar will have an additional "Mobile Access" entry (same level as "General Settings" and "Models"). The LAN QR code appears immediately without any configuration.

Q: What's the difference between LAN and public network modes?

A: LAN requires phone and computer on the same WiFi; access goes through the internal network with low latency and no data usage. Public network mode obtains a random trycloudcloudflare.com subdomain via cloudflared tunnel, usable from 4G or any network, but the URL and access password change each time it's enabled.

Q: Is the access password required?

A: Public network links always require an 8-digit password (auto-refreshes each time enabled, old links immediately invalidated). LAN password is enabled by default and can be one-click disabled in the settings page LAN section - after disabling, devices on the same network can scan to connect directly (public network unaffected).

Q: Why didn't it take effect after installation/update?

A: You must restart the dsh web process; the running process still loads the old plugin code. There's a "One-Click Restart" button in the settings page (except for desktop environment), or restart dsh web in terminal before accessing.

Q: What to do if public network mode reports error 1033?

A: Usually caused by local proxy/VPN (Clash, Surge, v2ray, sing-box, etc. TUN/enhanced mode) cutting off the cloudflared tunnel. First try disabling only the proxy's TUN mode; if that doesn't work, completely exit the proxy software; still not working? Add direct routing rules to the proxy to allow argotunnel.com / trycloudflare.com; if network is truly unreachable, use "mobile hotspot + LAN mode" which works exactly the same.

Q: How to handle port 3081 being occupied?

A: When an old dsh-pocket process is still holding the port, the plugin automatically tries the next port (up to 10 consecutive). If still conflicting, manually end the old process: macOS/Linux use lsof -ti :3081 | xargs kill -9, Windows use netstat -ano | findstr :3081 to find LISTENING PID then taskkill /PID <PID> /F.

Q: Can it be used on DSH Desktop?

A: QR code screen sync works fine on desktop version, but one-click update and one-click restart are managed by DSH Desktop itself; this plugin actively disables these two features to avoid conflicts. Desktop "advanced" mode doesn't support mobile access yet (page will be overlaid with a hint), need to switch back to "compatibility" mode in desktop settings and restart.

Q: How to upgrade to 1.x version?

A: Use dsh plugin --profile web update dsh-pocket --latest -w (with --latest to cross ^0.x range to 1.x). After update completes, remember to restart dsh web for new code to take effect.

Difficulty Level

Beginner — After installing and restarting DSH, scan the QR code to use; when encountering proxy/port or other anomalies, check items one by one according to the README troubleshooting table. No concepts or configuration items need to be understood.

Known Issues & Limitations

  • DSH Desktop "advanced" mode doesn't support mobile access yet (desktop advanced combo disables web ui-layout, mobile page gets compatibility patch but no desktop layout service). Settings page will automatically overlay a hint guiding user to switch to compatibility mode
  • Public network tunnel depends on machine's outbound to Cloudflare edge nodes (*.argotunnel.com, *.trycloudflare.com and Cloudflare edge IPs). Proxy/VPN TUN/enhanced mode often cuts off tunnel connections (manifests as error 1033)
  • If residual Homebrew bottle format cloudflared (ELF interpreter as @@HOMEBREW_PREFIX@@ placeholder) remains in cache directory on Linux, startup will directly report ENOENT; plugin detects bad cache by reading ELF file header and discards it, automatically re-downloading
  • Web Push Notifications have been removed: depends on overseas services like Google FCM, directly blocked in mainland China, regular users can't use it
  • Installation package doesn't declare specific DSH host version range in package.json#engines or peerDependencies, only declares need for compatibility with @deepseek-ai/cordis ^4.0.1

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/shaobeichen/dsh-pocket)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory