Skip to main content

dsh-mobile

61Stars4Forks0Issues0Watchers

Bring DeepSeek Harness to mobile browsers and Android apps, securely access your computer's sessions and workspaces via home or office LAN, with support for on-demand mobile interface customization and extending computer capabilities.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
Apache-2.0
Branch
main
androiddeepseek-harnessdsh-pluginlanmobilewebview

Install

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

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 saya-ch/dsh-mobile for me: review the repository at https://github.com/saya-ch/dsh-mobile 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 Positioning

Bring DeepSeek Harness from your computer to mobile browsers or Android Apps, continuing to use the same sessions, workspaces, messages, and tools over a protected LAN; no DSH source code modifications, no public network exposure.

Core Capabilities

  • Continue computer work on mobile: Same sessions, workspaces, messages, and tools sync in real-time; computer runs only DSH frontend, mobile is just another client
  • Three device pairing methods: QR code, pairing link, one-time key; device trust persists after successful pairing, app reopen won't require re-entry
  • Automatic LAN discovery and adaptation: Listen for DNS-SD/mDNS and periodic UDP announcements (default 3 second interval), typically auto-recovers after Wi-Fi, hotspot, or IP changes
  • Independent HTTPS and certificate pinning: Self-signed CA only binds fingerprint when distributing Android App; mobile browsers need manual trust on first use
  • Session-level loopback proxy and device/session authorization: Device tokens only store SHA-256 digest; pairing/session/active request limits are adjustable; paired devices have equal权限 to computer DSH
  • Dialogue-driven mobile customization: In DSH session, /mobile <request> lets agent directly modify mobile.css, mobile.js or extension directories under $DSH_HOME/mobile-access/, taking effect on mobile within seconds
  • Mobile Extensions mechanism: Write host.mjs (computer Node.js permissions) + mobile.js/css (mobile scripts) in extra local directories; mobile uses api.host.invoke() / api.host.fetch() to call computer capabilities (file R/W, command execution, etc.)

Technical Implementation

  • Language: TypeScript (compiles to ESM .mjs, also produces Client-side browser bundle for mobile-layout.js); companion Android App is Kotlin WebView thin shell
  • Key Dependencies: @deepseek-ai/cordis (Cordis host container), @deepseek-ai/schemastery (config and extension manifest schema), bonjour-service (mDNS / DNS-SD service publication), qrcode (generate pairing QR code SVG), selfsigned (self-signed CA and server certificates)
  • Architecture Pattern: Three-layer facet — Host face (src/plugin.ts registers Cordis plugin, mounts loopback management routes /mobile-access/... on WebServer and paired external HTTPS gateway at /api/mobile-access/...; depends on webServer + commands) + Client face (src/client.ts + src/mobile-layout.ts, injected immediately when DSH web profile starts with platform=web, replaces desktop layout module with mobile version) + Android App (same HTTPS URL, WebView in App exposes dshMobile Bridge for controlled native capabilities like file picker, camera scan, share, clipboard, notifications)
  • Entry File: src/plugin.ts:39 with name='dsh-mobile', inject=['webServer','commands'], apply(ctx, config); works with src/index.ts exposing all sub-modules (including MobileAccessGateway, AccessController, MobileAccessService, assertSupportedDshVersion, parseGatewayConfig, etc.); Client entry points are src/mobile-layout.ts and src/client.ts

Use Cases

Install and use when you need to continue using DeepSeek Harness from your computer on the sofa at home, when switching from Wi-Fi to mobile hotspot, or when traveling to hotel/office LANs, and want to advance tasks in the same session and workspace. Common setup: computer always runs DSH Web, mobile scans QR code once to pair, then opens Android App or browser anytime; paired devices can execute tools, read/write workspace files, call local scripts on computer for automation.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH Host (@deepseek-ai/dsh-host-webserver)0.1.0-rc.5 / 0.1.0-rc.6 / 0.1.0-rc.7assertSupportedDshVersion enforces validation of this range on startup; fails directly if not passed; no fallback startup
@deepseek-ai/dsh-commands0.1.0-rc.6 or 0.1.0-rc.7Provides /mobile <request> dialogue command, depends on its ctx.commands.register
@deepseek-ai/dsh-llm0.1.0-rc.6 or 0.1.0-rc.7/mobile calling agent.steer needs its createUserMessage and boundContextSummary
React^18.2.0Only peer for Client face (used for createElement rendering bridge UI)
Node.js^22.19.0 or >=24.0.0engines field in package.json:66
Platform (host)macOS / Windows / LinuxCross-platform; selfsigned/bonjour-service/qrcode are pure JS with no native modules; setup on Windows adds two extra inbound firewall rules for LocalSubnet only via PowerShell
Android AppAndroid (Kotlin WebView)Only supported mobile native App; get APK via GitHub Release; pairing uses fixed CA in App and device token encrypted with Android Keystore

Installation

dsh plugin --profile web add github:saya-ch/dsh-mobile

After installation, you must run dsh plugin --profile web exec dsh-mobile setup to complete the first-time self-signed CA + LAN selection; then restart DSH, and you can generate keys/QR codes from the "Mobile Access" card in the bottom-left corner.

Configuration Options

ConfigTypeDescriptionDefault
setupFileHidden fieldManaged config file absolute path written by setup command; used for automatic network adapter followingDefault $DSH_HOME/mobile-access/setup.json in cordis.patch.yml
listenHost / listenPortString / PortLAN listen address; numeric port only; mutually exclusive with publicOrigin127.0.0.1 / 3443
upstreamOriginStringDSH Web listening source that loopback proxy bridges to, must be loopback HTTP with porthttp://127.0.0.1:3080
publicOrigin / publicAuthoritiesString arrayExternal HTTPS hostname set for device side; non-loopback listen requires explicit valuesNone (setting publicOrigin disables listenPort/publicAuthorities)
allowedCidrsCIDR arrayClient subnets allowed for direct connection; required for non-loopback listenLoopback default 127.0.0.0/8, ::1/128
stateFilePathDevice registry persistence file (only stores token digest and revocation timestamp)Required
controlFileHidden fieldOn/off status file for DSH plugin card$DSH_HOME/mobile-access/control.json
customCssFile / customScriptFilePathOptional custom mobile.css / mobile.js for mobile, takes effect on saveDefault located at $DSH_HOME/mobile-access/
mobileLayoutFileHidden fieldBrowser bundle injected into mobile by Host faceDefault ./mobile-layout.js
instanceIdSHA-256Stable installation identifier for LAN discovery/binding CA; not an auth secretDefault SHA-256 of stateFile path
pairingCaFilePathCA certificate absolute path distributed to Android installer and bound with fingerprint; must be self-signed CA for instanceIdAuto-written by managed setup
initiallyEnabledBooleanControls plugin toggle on first launch (overridden by plugin card persistence)false
tlsSub-objectServer TLS source: mode: 'provided' (self-provided cert/key, optional intermediate CA) or mode: 'disabled' (loopback only)Auto-signed by managed setup
pairingTtlMs / deviceTtlMs / sessionTtlMsMillisecondsPairing code, device token, session validity period120000 / 90 days / 8 hours
maxDevices / maxSessions / maxConnections / maxActiveRequests / maxWebSocketsIntegerConcurrency and persistence resource limits32 / 64 / 64 / 32 / 16
maxBodyBytes / upstreamTimeoutMsBytes / MillisecondsSingle loopback proxy request body limit / upstream loopback proxy timeout160 MiB / 30000
rateLimitWindowMs / maxPairingAttempts / maxRateLimitKeysIntegerRate limit window, pairing failure limit, rate limit key table limit60000 / 8 / 256

Note: The "hidden fields" in the table above (stateFile, controlFile, setupFile, customCssFile, customScriptFile, mobileLayoutFile, pairingCaFile) are marked as hidden in the Schema by default and don't need manual editing by regular users; plugin market installation + dsh-mobile setup one command generates defaults. If adjustment is needed, mainly modify the config: sub-key of the mobile-access line in cordis.patch.yml, or use setup --address <IP> --port <port> to redirect setupFile.

FAQ

Q: I don't see the "Mobile Access" card in the UI after installation?

A: First confirm you've run dsh plugin --profile web exec dsh-mobile setup to write $DSH_HOME/mobile-access/setup.json, and have restarted DSH; if still not showing, check if DSH Host version is in the whitelist 0.1.0-rc.5/rc.6/rc.7; the plugin throws errors directly on incompatibility instead of starting in degraded mode, and startup logs will show unsupported DeepSeek Harness version ....

Q: First access from mobile browser shows certificate not trusted?

A: This is expected behavior. The LAN gateway uses self-signed HTTPS; you need to manually trust this device certificate in the mobile browser, or use the Android App (the App's private trust store automatically accepts that CA and won't write to system trust store).

Q: Auto-discovery can't find my computer, QR code pairing doesn't work?

A: First explicitly bind IP on computer with dsh plugin --profile web exec dsh-mobile setup --address 192.168.x.x; if multiple NIC addresses aren't on the same subnet, you can also point to https://IP:port for manual connection; on Windows, setup adds inbound firewall rules only for LocalSubnet by default—review if blocked by firewall.

Q: Device credentials lost, or lending a used phone to someone else—how to revoke?

A: Paired devices have full operation permissions on computer DSH and must be treated as fully trusted. On loss/transfer, delete the device from the computer plugin card (deletion immediately invalidates it); if needed, run dsh plugin --profile web exec dsh-mobile purge --yes to clear all data under $DSH_HOME/mobile-access/ and rotate all tokens.

Q: mobile.css / mobile.js changes not taking effect?

A: Mobile pulls the saved version within 5 seconds—confirm the file was actually written to $DSH_HOME/mobile-access/, not redirected to read-only/isolated location by the system; also, mobile.js must mount to root using window.dshMobile.register(({ root }) => { ... }) form, otherwise the plugin runtime won't invoke it.

Q: Why does the plugin refuse to start when my computer has a different DSH version?

A: See src/compatibility.ts — the plugin forcibly restricts to 3 verified DSH versions; failure immediately exits to avoid "barely usable" state when desktop page or layout contracts have changed. After upgrading DSH Host, please also upgrade dsh-mobile.

Q: How to distinguish between multiple computers on the same network?

A: Each computer automatically gets a stable instanceId (from SHA-256 of stateFile path); after Android App QR scan or LAN scan, it matches the same computer using this ID, won't mix up same-named instances across multiple computers; you can also see the current instanceId in the "Mobile Access" card.

Q: Does uninstalling dsh-mobile leave data behind?

A: Yes. remove only exits the process without touching $DSH_HOME/mobile-access/ (certificates, device registry, control state, custom files, extensions are all there); to completely clear certificates, devices, and custom files, first run dsh plugin --profile web exec dsh-mobile purge --yes, then remove. On Windows, purge also removes the two firewall rules added during setup.

Learning Curve

Advanced — installation + setup itself is just two commands, but safe usage requires understanding the security model "paired devices are fully trusted, shouldn't be exposed to public network, must be revoked on loss"; to leverage /mobile customization and extension capabilities requires familiarity with $DSH_HOME/mobile-access/ directory conventions and host.mjs local user permission boundaries; multi-NIC/firewall scenarios require knowing how to use setup --address for explicit binding.

Known Issues & Limitations

  • Alpha phase: only latest prerelease maintained; early alphas don't receive security fixes (SECURITY.md:5-7)
  • iOS client unreleased: only Android App in Release scope; iOS remains local experiment, not entering build or Release (README.md:24, apps/mobile/README.zh-CN.md:7)
  • Mobile gateway must relax CSP: DSH upstream HTML carries inline JS, uses new Function to revive Schemastery callbacks, dynamic styles—so gateway CSP currently includes script-src 'self' 'unsafe-inline' 'unsafe-eval' and style-src 'self' 'unsafe-inline'; other directives still tightened to HTTPS-only, but script injection risk not zeroed (SECURITY.md:30-32), depends on upstream DSH introducing nonce / stable hash / external bootstrap resources before tightening
  • Forced DSH version whitelist: src/compatibility.ts:2-6 only includes 0.1.0-rc.5/rc.6/rc.7, other versions fail on startup; after upgrading DSH, dsh-mobile must be upgraded simultaneously
  • When depending on 0.0.0.0 intranet listen, publicAuthorities must be explicitly provided: cannot use loopback defaults; and once publicOrigin is set, TLS must remain mode: 'provided', cannot be disabled (src/config.ts:211, 238-240)
  • Self-signed CA must be individually distributed to Android in LAN: Android App only trusts CA bound to its own instanceId fingerprint, doesn't call Android system trust store; browsers need manual trust (SECURITY.md:19-22)
  • Device registry uses temporary file atomic rename write, file size limit 1 MiB, device limit default 32 (src/storage.ts:89,302); cannot bypass JsonDeviceStore for direct multi-instance writes
  • mobile-access must be writable after setup to $DSH_HOME/mobile-access/; read-only filesystem/unwritable HOME causes setup to throw; when multiple profiles coexist, their independent stateFile and controlFile paths are injected via cordis.patch.yml

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/saya-ch/dsh-mobile)

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