dsh-mobile 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,9 +2,22 @@
2
2
 
3
3
  Notable changes to DSH Mobile are recorded here. GitHub Releases remain the source for downloadable packages and complete generated commit notes.
4
4
 
5
+
6
+ ## 0.3.9 - 2026-09-04
7
+
8
+ - Add one-click VPS deployment for self-hosted FRP (PR #38, thanks @qzyqmzn): fill in the SSH user, port, and key in the control panel and the plugin installs frps, Caddy, firewall rules, and a Let's Encrypt IP certificate over pinned SSH with user-confirmed host fingerprints. Server-side cleanup removes only DSH Mobile-owned artifacts through a reviewable uninstall script. Public IPv4 origins are accepted on both the panel and the Android app.
9
+ - Improve the `/mobile` customization command: inject the current mobile customization state (whether `mobile.css` / `mobile.js` exist and which extensions are installed) into the agent guide so earlier work is not overwritten blindly, teach the agent how to restore the built-in default appearance by removing those files, and require syntax and schema self-checks before it reports completion.
10
+ - Verify the mobile frontend, connection, and trust contracts against DeepSeek Harness 0.1.2-alpha.5, 0.1.2-rc.1, and 0.1.3-alpha.1 through the existing upstream-source CI gate; no plugin code change was required. Extend the DSH peer ranges with the `^0.1.3-0` family so fresh installs resolve against 0.1.3 prereleases.
11
+ - Shrink the composer dock stats strip on phones and link the community WeChat Mini-Program client in the README (thanks @StrawberryAO). Existing 0.3.3-0.3.8 Android apps and paired devices remain compatible.
12
+
13
+ ## 0.3.8 - 2026-09-03
14
+
15
+ - Preserve the WeChat Mini-Program compatibility changes contributed in PR #34 by @StrawberryAO while deriving an unset upstream from the active DSH WebServer port. Standalone Web defaults, Desktop's configured port, and Desktop's bind-conflict retry port therefore use the same proxy target.
16
+ - Accept the observed `allowed-origin,undefined` WebSocket Origin form while rejecting mixed values that include an untrusted Origin.
17
+
5
18
  ## 0.3.7 - 2026-09-02
6
19
 
7
- - Fix the Windows DSH Desktop startup failure reported in [#22](https://github.com/saya-ch/dsh-mobile/issues/22): capture subprocess output through the callback API instead of relying on `execFile` promisify metadata that a host wrapper may omit. Thanks @XChen446 for the precise 0.3.6 stack trace.
20
+ - Fix the Windows DSH Desktop startup failure reported in [#22#22](https://github.com/saya-ch/dsh-mobile/issues/22): capture subprocess output through the callback API instead of relying on `execFile` promisify metadata that a host wrapper may omit. Thanks @XChen446 for the precise 0.3.6 stack trace.
8
21
  - Apply the same output handling to Windows SID resolution, private-file ACLs, route selection, and firewall diagnostics/setup. Invalid SID output and ACL failures still reject the operation; a failed SID lookup can be retried and Windows permission commands have bounded execution time.
9
22
  - Retain the 0.3.6 removal of the exact DSH version allowlist. Existing 0.3.3-0.3.6 Android apps and paired devices remain compatible; the 0.3.7 APK updates version metadata only.
10
23
 
@@ -16,7 +29,7 @@ Notable changes to DSH Mobile are recorded here. GitHub Releases remain the sour
16
29
 
17
30
  ## 0.3.5 - 2026-09-01
18
31
 
19
- - Fix [#26](https://github.com/saya-ch/dsh-mobile/issues/26): prevent mobile startup from remaining on “Loading plugins” over LAN or remote access when DSH sends the WebSocket upgrade response and initial snapshot together. The gateway now preserves that snapshot without relaxing its 16 KiB response-header limit. Thanks @oliverwan97 for the detailed report.
32
+ - Fix [#26#26](https://github.com/saya-ch/dsh-mobile/issues/26): prevent mobile startup from remaining on “Loading plugins” over LAN or remote access when DSH sends the WebSocket upgrade response and initial snapshot together. The gateway now preserves that snapshot without relaxing its 16 KiB response-header limit. Thanks @oliverwan97 for the detailed report.
20
33
 
21
34
  ## 0.3.4 - 2026-08-31
22
35
 
@@ -39,7 +52,7 @@ Notable changes to DSH Mobile are recorded here. GitHub Releases remain the sour
39
52
 
40
53
  ## 0.3.2 - 2026-08-29
41
54
 
42
- - Special thanks to @JackRushante for [#16](https://github.com/saya-ch/dsh-mobile/pull/16): the secure Android media bridge, image attachments, localization foundation, bounded extension requests, and Funnel lifecycle hardening. This release retains all four original commits and their author metadata.
55
+ - Special thanks to @JackRushante for [#16#16](https://github.com/saya-ch/dsh-mobile/pull/16): the secure Android media bridge, image attachments, localization foundation, bounded extension requests, and Funnel lifecycle hardening. This release retains all four original commits and their author metadata.
43
56
  - Move image selection and camera capture into a dedicated top row of the composer command menu, without focusing the message editor.
44
57
  - Push extension and `/mobile` changes to authenticated phones immediately, while retaining bounded polling as a network-recovery fallback.
45
58
  - Bind each mobile UI to its matching Host, script, style, and asset generation; retain the previous Host through a bounded refresh window, fail closed on client activation errors, and tighten scoped requests against encoded path traversal.
@@ -49,7 +62,7 @@ Notable changes to DSH Mobile are recorded here. GitHub Releases remain the sour
49
62
 
50
63
  ## 0.3.1 - 2026-08-28
51
64
 
52
- - Credit @BlueandwhiteXD ([#15](https://github.com/saya-ch/dsh-mobile/pull/15)) for the Android keyboard inset report and fix incorporated into the 0.3 mobile layout.
65
+ - Credit @BlueandwhiteXD ([#15#15](https://github.com/saya-ch/dsh-mobile/pull/15)) for the Android keyboard inset report and fix incorporated into the 0.3 mobile layout.
53
66
 
54
67
  ## 0.3.0 - 2026-08-28
55
68
 
package/README.en.md CHANGED
@@ -19,14 +19,14 @@
19
19
 
20
20
  > DSH Mobile is a DeepSeek Harness community plugin; the native app supports Android only.
21
21
  >
22
- > **0.3.7 update**: fix a Windows DSH Desktop startup crash when capturing system-command output, including the related route-selection and firewall-diagnostic paths. The 0.3.6 DSH version policy and private-file protections remain intact. [Details](CHANGELOG.md).
22
+ > **0.3.9 update**: thanks to @qzyqmzn for one-click VPS deployment of self-hosted FRP fill in SSH details in the panel and frps, Caddy, and certificates install automatically; `/mobile` customization now reads the current mobile state before editing and self-checks afterwards; DeepSeek Harness 0.1.3-alpha.1 is supported. [Details](CHANGELOG.md).
23
23
  >
24
- > **Upgrade reminder**: Windows DSH Desktop users should update to plugin 0.3.7. Existing 0.3.3-0.3.6 apps and paired devices remain compatible without re-pairing. [Compatibility notes](#compatibility).
24
+ > **Upgrade reminder**: Windows DSH Desktop users should update to plugin 0.3.9. Existing 0.3.3-0.3.8 apps and paired devices remain compatible without re-pairing. [Compatibility notes](#compatibility).
25
25
 
26
26
  <p align="center">
27
- <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.7/dsh-mobile-android-v0.3.7.apk"><img src="assets/brand/app-icon-rounded.svg" alt="DSH Mobile Android app icon" width="72" height="72"></a><br>
28
- <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.7/dsh-mobile-android-v0.3.7.apk"><strong>Download Android app 0.3.7</strong></a><br>
29
- <sub><a href="https://github.com/saya-ch/dsh-mobile/releases/tag/v0.3.7">Release notes and checksums</a></sub>
27
+ <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.9/dsh-mobile-android-v0.3.9.apk"><img src="assets/brand/app-icon-rounded.svg" alt="DSH Mobile Android app icon" width="72" height="72"></a><br>
28
+ <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.9/dsh-mobile-android-v0.3.9.apk"><strong>Download Android app 0.3.9</strong></a><br>
29
+ <sub><a href="https://github.com/saya-ch/dsh-mobile/releases/tag/v0.3.9">Release notes and checksums</a></sub>
30
30
  </p>
31
31
 
32
32
  DSH Mobile is a DeepSeek Harness plugin that lets a mobile browser or the Android app connect over a protected LAN or an optional Tailscale Funnel, cpolar, or self-hosted FRP remote path. Local and remote access keep the same sessions, Workspaces, messages, and tools while using separate switches and paired-device stores without modifying DeepSeek Harness source.
@@ -113,12 +113,12 @@ Remote providers may impose bandwidth and connection limits: the [cpolar Free pl
113
113
  1. Open **Mobile Access → Remote** in the lower-left corner of DeepSeek Harness and choose a provider:
114
114
  - **Tailscale Funnel**: select **Enable remote access**, complete the one-time Tailscale sign-in on the official page, follow the panel prompt to allow Funnel, then return to DSH and wait until the connection is ready.
115
115
  - **cpolar**: select **Install official component**, sign in to the cpolar dashboard and obtain an Authtoken, paste it, then select **Save and connect**. The component is downloaded into the plugin's private directory only after confirmation.
116
- - **Self-hosted FRP (advanced)**: expand **Self-hosted connection**, enter the VPS, frps port, shared token, and your HTTPS domain; apply the generated restricted frps + Caddy template on the VPS, then install the official `frpc` on demand and verify the path. This requires Android app 0.3.3 or later.
116
+ - **Self-hosted FRP (advanced)**: expand **Self-hosted connection**, enter the VPS, frps port, shared token, and public HTTPS origin. The origin may use your domain or the VPS public IPv4 address (for example, `https://203.0.113.10` — substitute your own real address; documentation ranges are rejected). Apply the restricted template manually or enter an SSH user, port, and local private-key path for automatic deployment. Automatic deployment supports Ubuntu/Debian with systemd, uses OpenSSH keys or an agent, refuses password auth, and does not overwrite Caddy configuration it does not manage; both deployment and server cleanup display the SSH host keys for verification against the VPS console before continuing. IPv4 mode obtains a roughly six-day Let's Encrypt IP certificate and installs daily automatic renewal. Install the official `frpc` on demand and verify the path afterward. A reviewable uninstall script or one-click server cleanup removes only DSH Mobile-owned services and configs. This requires Android app 0.3.3 or later.
117
117
  2. When the panel reports that remote access is ready, select **Create remote pairing QR code**.
118
118
  3. In the Android app, open **Remote access** and scan the QR code to create its separate pairing.
119
119
  4. The app keeps device trust and reconnects automatically. Disable remote access when it is not needed; LAN access remains unchanged.
120
120
 
121
- Tailscale Funnel has broad reach but may be unreliable from mainland China. Its runtime ties the public listener to the parent process and a bounded control channel; parent exit, channel closure, or an explicit stop ends the current generation and cleans up its resources. cpolar is better suited to mainland networks, while self-hosted FRP fits users who already have a VPS and domain and want to avoid public-provider bandwidth quotas. The plugin validates pinned on-demand components, stores their configuration and programs entirely under `$DSH_HOME/mobile-access/`, and can remove them completely from the panel.
121
+ Tailscale Funnel has broad reach but may be unreliable from mainland China. Its runtime ties the public listener to the parent process and a bounded control channel; parent exit, channel closure, or an explicit stop ends the current generation and cleans up its resources. cpolar is better suited to mainland networks, while self-hosted FRP fits users who already have a VPS and want to avoid public-provider bandwidth quotas. An unregistered domain on a mainland-China VPS may be intercepted by the cloud provider; public IPv4 mode avoids that dependency. The plugin validates pinned on-demand components, stores their configuration and programs entirely under `$DSH_HOME/mobile-access/`, and can remove them completely from the panel.
122
122
 
123
123
  Self-hosted FRP generates only one HTTP vhost to the DSH loopback gateway. It exposes no arbitrary FRP configuration, TCP/UDP proxy, or FRP plugin. The VPS plaintext vhost must bind to `127.0.0.1`, with Caddy providing public HTTPS; the plugin rejects a publicly reachable plaintext port and reports readiness only after public discovery identifies the current computer.
124
124
 
@@ -164,6 +164,10 @@ The examples above, applied:
164
164
 
165
165
  The Android app is a thin Kotlin WebView shell and contains no frontend copy; mobile browsers load the same page. For compatibility diagnosis, append `?frontend=stock` to the browser URL to temporarily use the previous desktop-page adaptation.
166
166
 
167
+ > **Community client (unofficial)**: [WeChat Mini-Program client](https://github.com/StrawberryAO/dsh-mobile-minapp)
168
+ > A native WeChat Mini-Program that reuses the Mobile Access pairing and Remote stream protocol (requires dsh-mobile ≥ 0.3.8).
169
+ > Because WeChat release builds enforce a domain allow-list (ICP-registered HTTPS origins only), it currently works via WeChat DevTools / real-device debugging; see its README.
170
+
167
171
  ## How it works
168
172
 
169
173
  ```mermaid
@@ -182,7 +186,7 @@ Three layers: the Host face for discovery, pairing, HTTPS, loopback proxying, an
182
186
  - Use the LAN listener only on a trusted home, office, or hotspot network; do not add your own port forwarding.
183
187
  - A remote origin is publicly reachable, but unpaired requests cannot enter DSH; turn the remote switch off when it is not needed.
184
188
  - cpolar downloads a pinned official build only after confirmation and verifies its size and SHA-256. It installs no system service, PATH entry, or startup task, and plugin cleanup removes its managed files.
185
- - Self-hosted FRP downloads pinned official `frpc` only after confirmation and verifies the origin, exact size, SHA-256, archive paths, and executable version. The shared token never appears in status, diagnostics, or logs. Copying the server template places it on the system clipboard, so clear the clipboard after use; cleanup removes only plugin-managed local files and does not change the VPS.
189
+ - Self-hosted FRP downloads pinned official `frpc` only after confirmation and verifies the origin, exact size, SHA-256, archive paths, and executable version. The shared token never appears in status, diagnostics, or logs. Copying the server template places it on the system clipboard, so clear the clipboard after use; local cleanup removes only plugin-managed files, while the VPS is cleaned separately with the uninstall script or one-click server cleanup. Automatic deployment and server cleanup both display the SSH host keys, which must be verified against the VPS console before continuing.
186
190
  - A paired device is a fully trusted DeepSeek Harness operator and can run tools on the computer; revoke lost devices from the computer.
187
191
  - The LAN gateway listens only while Mobile Access is enabled; with it off, DSH keeps running normally on the computer.
188
192
 
@@ -190,25 +194,17 @@ See [SECURITY.md](SECURITY.md).
190
194
 
191
195
  ## Compatibility
192
196
 
193
- DSH Mobile 0.3.6 no longer blocks startup by exact DSH version and has verified the mobile frontend and connection interfaces in DSH 0.1.2-alpha.3/alpha.4. Existing 0.3.3-0.3.5 apps do not need re-pairing; the 0.3.6 Android build changes version metadata only. Earlier apps use a different status-bar strategy, so updating both is recommended. App 0.1.3 or earlier requires reinstalling and pairing again.
197
+ The table below lists, for each plugin version, the DeepSeek Harness version it is verified to support (earlier 0.1.x releases are compatible as well). Starting with 0.3.6 the plugin no longer rejects a DSH version by number alone; newer unlisted versions are covered by CI's contract checks. History lives in [CHANGELOG.md](CHANGELOG.md).
194
198
 
195
- | DSH Mobile | Verified DeepSeek Harness releases |
199
+ | DSH Mobile plugin | Verified DeepSeek Harness version |
196
200
  | --- | --- |
197
- | `0.3.6` | `0.1.0-rc.5`, `rc.6`, `rc.7`, `0.1.1-rc.2`, and `0.1.2-alpha.1` through `alpha.4`; unlisted versions are no longer rejected by version alone |
198
- | `0.3.5` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1`, `0.1.2-alpha.2` |
199
- | `0.3.4` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1`, `0.1.2-alpha.2` |
200
- | `0.3.3` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1` |
201
- | `0.3.2` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1` |
202
- | `0.3.1` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1` |
203
- | `0.3.0` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2`, `0.1.2-alpha.1` |
204
- | `0.2.2` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2` |
205
- | `0.2.1` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2` |
206
- | `0.2.0` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2` |
207
- | `0.1.4` | `0.1.0-rc.5`, `0.1.0-rc.6`, `0.1.0-rc.7`, `0.1.1-rc.2` |
208
-
209
- The plugin no longer uses a runtime version allowlist. CI continuously checks the frontend, connection, and trust interfaces used from the DSH main branch, so adaptation is required only when those interfaces actually change. If a future DSH update causes a real display or connection failure, update DSH Mobile and include diagnostics in the report.
210
-
211
- 0.3.4 fixes duplicate directory-picker registration in Windows [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop). It reuses the desktop host's in-page directory browser; standalone Web launches still let phones select workspaces on the computer. Mobile access through Desktop requires compatibility mode and browser access enabled, with Mobile's upstream address matching Desktop's listening port.
201
+ | `0.3.9` | `0.1.3-alpha.1` |
202
+ | `0.3.6`-`0.3.8` | `0.1.2-rc.1` |
203
+ | `0.3.4`, `0.3.5` | `0.1.2-alpha.2` |
204
+ | `0.3.0`-`0.3.3` | `0.1.2-alpha.1` |
205
+ | `0.1.4`, `0.2.x` | `0.1.1-rc.2` |
206
+
207
+ Existing 0.3.3-0.3.8 apps do not need re-pairing. Earlier apps use a different status-bar strategy, so updating both is recommended. App 0.1.3 or earlier requires reinstalling and pairing again.
212
208
 
213
209
  ## Uninstall
214
210
 
package/README.md CHANGED
@@ -26,14 +26,14 @@
26
26
 
27
27
  > DSH Mobile 是 DeepSeek Harness 社区插件,原生 App 仅支持 Android。
28
28
  >
29
- > **0.3.7 更新**:修复 Windows DSH Desktop 获取系统命令输出时的启动崩溃,同步完善网卡选择与防火墙诊断;保留 0.3.6 的 DSH 版本开放策略和私有文件权限保护。[详细记录](CHANGELOG.md)。
29
+ > **0.3.9 更新**:感谢 @qzyqmzn 贡献自建 FRP VPS 一键部署,在控制面板填写 SSH 信息即可自动安装 frps、Caddy 与证书;`/mobile` 定制不再盲改,会先读取手机端现状并自检;同时支持 DeepSeek Harness 0.1.3-alpha.1。[详细记录](CHANGELOG.md)。
30
30
  >
31
- > **升级提醒**:Windows DSH Desktop 用户请更新至插件 0.3.7;现有 0.3.3-0.3.6 App 可继续使用,无需重新配对。[兼容说明](#兼容性)。
31
+ > **升级提醒**:Windows DSH Desktop 用户请更新至插件 0.3.9;现有 0.3.3-0.3.8 App 可继续使用,无需重新配对。[兼容说明](#兼容性)。
32
32
 
33
33
  <p align="center">
34
- <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.7/dsh-mobile-android-v0.3.7.apk"><img src="assets/brand/app-icon-rounded.svg" alt="DSH Mobile 安卓应用图标" width="72" height="72"></a><br>
35
- <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.7/dsh-mobile-android-v0.3.7.apk"><strong>下载 Android App 0.3.7</strong></a><br>
36
- <sub><a href="https://github.com/saya-ch/dsh-mobile/releases/tag/v0.3.7">版本说明与校验文件</a></sub>
34
+ <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.9/dsh-mobile-android-v0.3.9.apk"><img src="assets/brand/app-icon-rounded.svg" alt="DSH Mobile 安卓应用图标" width="72" height="72"></a><br>
35
+ <a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.3.9/dsh-mobile-android-v0.3.9.apk"><strong>下载 Android App 0.3.9</strong></a><br>
36
+ <sub><a href="https://github.com/saya-ch/dsh-mobile/releases/tag/v0.3.9">版本说明与校验文件</a></sub>
37
37
  </p>
38
38
 
39
39
  DSH Mobile 是一个 DeepSeek Harness 插件,让手机浏览器或 Android App 通过局域网,或可选的 Tailscale Funnel、cpolar、自建 FRP 远程通道连接电脑,继续使用同一份会话、工作区、消息和工具。局域网与远程访问分别启停、分别管理设备,且都不修改 DeepSeek Harness 源码。
@@ -120,12 +120,12 @@ dsh plugin --profile web add dshmarket
120
120
  1. 在 DeepSeek Harness 左下角打开 **移动访问 → 远程**,选择一种连接方式:
121
121
  - **Tailscale Funnel**:点击 **启用远程访问**,在打开的官方页面完成一次 Tailscale 登录;按面板提示继续允许 Funnel,然后返回 DSH 等待连接就绪。
122
122
  - **cpolar**:点击 **安装官方组件**,登录 cpolar 控制台取得 Authtoken,粘贴后点击 **保存并连接**。组件只会在确认后下载到插件私有目录。
123
- - **自建 FRP(高级)**:展开 **自建连接**,填写 VPS、frps 端口、共享 Token 和自己的 HTTPS 域名;复制插件生成的受限 frps + Caddy 模板到 VPS,再按提示安装官方 `frpc` 并验证连接。需要 Android App 0.3.3 或更高版本。
123
+ - **自建 FRP(高级)**:展开 **自建连接**,填写 VPS、frps 端口、共享 Token 和公开 HTTPS 地址;公开地址可以是自己的域名,也可以直接是 VPS 公网 IPv4(例如 `https://203.0.113.10`,请换成你自己的真实地址,文档示例网段会被拒绝)。可以复制受限模板手动部署,也可以填写 SSH 用户、SSH 端口和本机私钥路径,点击 **部署 frps + Caddy** 自动部署。自动部署支持 Ubuntu/Debian + systemd,使用 OpenSSH 密钥或 ssh-agent,不接受密码,也不会覆盖非 DSH Mobile 管理的 Caddyfile;部署与清理前都会展示服务器主机指纹,需到 VPS 控制台核对后才能继续。公网 IP 模式会申请约 6 天有效的 Let’s Encrypt IP 证书并配置每日自动续期。部署完成后再安装官方 `frpc` 并验证连接。不再需要服务器时可用“复制 VPS 卸载脚本”或一键清理,只删除 DSH Mobile 自己的服务与配置。需要 Android App 0.3.3 或更高版本。详见[自建 FRP 使用指南](docs/SELF_HOSTED_FRP.md)。
124
124
  2. 状态变为“远程访问已就绪”后,点击 **生成远程配对二维码**。
125
125
  3. 在 Android App 中进入 **远程访问**,扫描二维码完成独立配对。
126
126
  4. 此后 App 会保存设备信任并自动重连;不使用时可以关闭远程访问,局域网连接不会受影响。
127
127
 
128
- Tailscale Funnel 覆盖范围广,但在中国大陆网络下可能不稳定。其运行组件把公开监听生命周期绑定到父进程和受限控制通道;父进程退出、控制通道关闭或显式停止时会结束当前代次并清理资源。cpolar 更适合国内网络;自建 FRP 适合已有 VPS 和域名、希望避开公共服务带宽限制的用户。插件会校验按需下载的固定版本组件,配置与程序均保存在 `$DSH_HOME/mobile-access/`,可随时在面板中彻底清除。
128
+ Tailscale Funnel 覆盖范围广,但在中国大陆网络下可能不稳定。其运行组件把公开监听生命周期绑定到父进程和受限控制通道;父进程退出、控制通道关闭或显式停止时会结束当前代次并清理资源。cpolar 更适合国内网络;自建 FRP 适合已有 VPS、希望避开公共服务带宽限制的用户。中国大陆 VPS 上的未备案域名可能被云厂商拦截,此时可使用公网 IPv4 模式。插件会校验按需下载的固定版本组件,配置与程序均保存在 `$DSH_HOME/mobile-access/`,可随时在面板中彻底清除。
129
129
 
130
130
  自建 FRP 只生成一个指向 DSH 回环网关的 HTTP vhost,不提供任意 FRP 配置、TCP/UDP 代理或 FRP 插件。VPS 的明文 vhost 必须只监听 `127.0.0.1`,由 Caddy 提供公网 HTTPS;插件会拒绝可从公网访问的明文端口,并在公开发现接口确认连接到当前电脑后才显示“已就绪”。
131
131
 
@@ -172,6 +172,10 @@ Tailscale Funnel 覆盖范围广,但在中国大陆网络下可能不稳定。
172
172
 
173
173
  Android App 只是 Kotlin WebView 薄壳,不内置另一份网页;手机浏览器访问的是同一页面。需要排查兼容性时,可在浏览器地址后追加 `?frontend=stock`,临时回到旧的桌面页面适配模式。
174
174
 
175
+ > **社区客户端(非官方)**:[微信小程序客户端](https://github.com/StrawberryAO/dsh-mobile-minapp)
176
+ > 原生微信小程序实现,复用「移动访问」的配对与 Remote 流协议(需 dsh-mobile ≥ 0.3.8)。
177
+ > 因微信正式版强制「合法域名」(需 ICP 备案的自有 HTTPS 域名),目前需通过微信开发者工具 / 真机调试使用,详见其 README。
178
+
175
179
  ## 工作原理
176
180
 
177
181
  ```mermaid
@@ -191,7 +195,7 @@ flowchart LR
191
195
  - 局域网监听只用于可信家庭、办公网络或可信热点;不要自行做端口转发。
192
196
  - 远程地址可从公网到达,但未配对请求无法进入 DSH;不使用时应关闭远程开关。
193
197
  - cpolar 仅在用户确认后下载固定官方版本并校验大小和 SHA-256;不会安装系统服务、写入 PATH 或设置开机启动,插件清理会删除其托管文件。
194
- - 自建 FRP 仅在用户确认后从官方 Release 下载固定版本 `frpc`,校验来源、精确大小、SHA-256、压缩包路径和可执行文件版本;共享 Token 不会出现在状态、诊断或日志中。复制服务器模板时 Token 会进入系统剪贴板,请粘贴后及时清除;清理只删除插件管理的本机文件,不会修改 VPS
198
+ - 自建 FRP 仅在用户确认后从官方 Release 下载固定版本 `frpc`,校验来源、精确大小、SHA-256、压缩包路径和可执行文件版本;共享 Token 不会出现在状态、诊断或日志中。复制服务器模板时 Token 会进入系统剪贴板,请粘贴后及时清除;本机清理只删除插件管理的文件,VPS 需要用面板提供的卸载脚本或一键清理单独清除。自动部署与一键清理前都会展示 SSH 主机指纹,必须到 VPS 控制台核对后才能继续。
195
199
  - 配对设备拥有控制电脑端 DeepSeek Harness 的能力,应视为完全可信设备;丢失手机后应在电脑端撤销设备。
196
200
  - 移动网关开启时才监听局域网;关闭后 DeepSeek Harness 仍正常在电脑本机运行。
197
201
 
@@ -199,25 +203,17 @@ flowchart LR
199
203
 
200
204
  ## 兼容性
201
205
 
202
- DSH Mobile 0.3.6 不再按 DSH 精确版本号阻止启动,并已验证 DSH 0.1.2-alpha.3/alpha.4 的移动前端与连接接口。现有 0.3.3-0.3.5 App 无需重新配对;0.3.6 Android App 仅同步版本信息,功能行为不变。更早的 App 使用不同的状态栏策略,建议同步升级;App 0.1.3 及更早版本需卸载重装并重新配对。
203
-
204
- | DSH Mobile | 已验证的 DeepSeek Harness |
205
- | ------------ | ------------------------------------------------------------------------- |
206
- | `0.3.6` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1` 至 `alpha.4`;未列版本不再仅因版本号被拒绝 |
207
- | `0.3.5` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1`、`0.1.2-alpha.2` |
208
- | `0.3.4` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1`、`0.1.2-alpha.2` |
209
- | `0.3.3` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1` |
210
- | `0.3.2` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1` |
211
- | `0.3.1` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1` |
212
- | `0.3.0` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2`、`0.1.2-alpha.1` |
213
- | `0.2.2` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2` |
214
- | `0.2.1` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2` |
215
- | `0.2.0` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2` |
216
- | `0.1.4` | `0.1.0-rc.5`、`0.1.0-rc.6`、`0.1.0-rc.7`、`0.1.1-rc.2` |
217
-
218
- 插件不再使用运行时版本白名单;CI 会持续检查 DSH 主分支真实使用的前端、连接与信任接口,只有接口变化才需要适配。未来 DSH 更新若出现实际显示或连接异常,请升级 DSH Mobile 并提交诊断信息。
219
-
220
- 0.3.4 修复 Windows [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) 的目录选择器重复注册问题:复用桌面宿主的页面内目录浏览器,普通 Web 启动仍保留手机选择电脑工作区的能力。Desktop 连接手机时需使用兼容模式并启用浏览器访问,Mobile 的上游地址应与 Desktop 的监听端口一致。
206
+ 下表列出各插件版本验证支持到的 DeepSeek Harness 版本(早于该版本的 0.1.x 均兼容)。0.3.6 起插件不再按版本号拒绝启动,未列出的更新版本由 CI 契约检查兜底。历史记录见 [CHANGELOG.md](CHANGELOG.md)。
207
+
208
+ | DSH Mobile 插件 | 验证支持的 DeepSeek Harness 版本 |
209
+ | --- | --- |
210
+ | `0.3.9` | `0.1.3-alpha.1` |
211
+ | `0.3.6`-`0.3.8` | `0.1.2-rc.1` |
212
+ | `0.3.4`、`0.3.5` | `0.1.2-alpha.2` |
213
+ | `0.3.0`-`0.3.3` | `0.1.2-alpha.1` |
214
+ | `0.1.4`、`0.2.x` | `0.1.1-rc.2` |
215
+
216
+ 现有 0.3.3-0.3.8 App 无需重新配对;更早的 App 使用不同的状态栏策略,建议同步升级;App 0.1.3 及更早版本需卸载重装并重新配对。
221
217
 
222
218
  ## 卸载
223
219
 
package/SECURITY.md CHANGED
@@ -26,7 +26,8 @@ The maintainer will acknowledge a complete report within seven days. Publication
26
26
  - cpolar is downloaded only after confirmation from a pinned official artifact whose size and SHA-256 are verified. Its Authtoken is stored in a private, self-update-disabled configuration under `$DSH_HOME/mobile-access/`, never returned by the admin API or written to logs. Cleanup removes the managed executable, configuration, logs, and independent remote device registry.
27
27
  - Self-hosted FRP accepts only a VPS address, frps control port, operator-generated high-entropy shared token, and standard-port public HTTPS origin. The plugin validates the token's length and format; the operator remains responsible for its entropy. It generates one HTTP vhost pointed at the plugin's ephemeral loopback gateway; arbitrary FRP configuration, TCP/UDP forwarding, FRP plugins, services, PATH entries, and startup tasks are not supported.
28
28
  - The generated frps template binds its plaintext vhost to `127.0.0.1` and expects Caddy to provide public HTTPS. Before starting `frpc`, the plugin rejects a vhost port reachable through the configured VPS address. It reports readiness only when the public discovery response carries this computer's exact non-secret installation identifier.
29
- - The FRP token stays in a private file under `$DSH_HOME/mobile-access/`, is never returned by status or diagnostic responses, and is never logged. Copying the generated server template intentionally places the token on the system clipboard and into the VPS configuration; clear the clipboard after use and protect the VPS file. The FRP cleanup action removes the managed `frpc`, local token, runtime configuration, staging files, and logs, but VPS files remain the user's responsibility.
29
+ - The FRP token stays in a private file under `$DSH_HOME/mobile-access/`, is never returned by status or diagnostic responses, and is never logged. Copying the generated server template intentionally places the token on the system clipboard and into the VPS configuration; clear the clipboard after use and protect the VPS file. The FRP cleanup action removes the managed `frpc`, local token, runtime configuration, staging files, and logs. Server-side artifacts are removed only through the reviewable uninstall script or the separately confirmed one-click VPS cleanup, both of which delete solely DSH Mobile-owned files, services, and tagged firewall rules.
30
+ - Automatic VPS deployment and one-click VPS cleanup first read the server's SSH host keys and require the operator to confirm every `SHA256:` fingerprint against the VPS console before any authenticated connection. All SSH/SCP channels pin `StrictHostKeyChecking=yes` to a temporary known_hosts file built from the confirmed keys; unknown, rotated, or extra keys abort the operation instead of being silently accepted. SSH credentials themselves are key-or-agent only, never passwords; the private key path is convenience state in the current browser profile, and key material is never uploaded or logged.
30
31
  - Disabling remote access stops the selected provider process without affecting LAN access. Resetting remote access also removes provider state and the independent remote device registry.
31
32
  - Treat every paired device as a fully trusted operator. Stock DSH methods reached through the authenticated loopback proxy may read configuration or run tools with the desktop user's authority.
32
33
  - Treat `mobile.js` as application code with the paired page's same-origin authority. Restrict write access to trusted host-side DSH sessions and review generated API calls or browser-permission use.
package/cordis.patch.yml CHANGED
@@ -26,7 +26,6 @@
26
26
  initiallyEnabled: false
27
27
  listenHost: 127.0.0.1
28
28
  listenPort: 3443
29
- upstreamOrigin: http://127.0.0.1:3080
30
29
  allowedCidrs: [127.0.0.0/8]
31
30
  tls:
32
31
  mode: disabled
@@ -0,0 +1,75 @@
1
+ # 自建 FRP 使用指南
2
+
3
+ 自建 FRP 适合已有 VPS、希望避开公共隧道带宽限制的用户。手机经 VPS 上的 Caddy 进入加密 FRP 隧道,再到达电脑上的 DSH;FRP 只负责传输,仍需完成 DSH 配对才能进入。
4
+
5
+ ```text
6
+ 手机 App
7
+ -> HTTPS(域名或公网 IPv4)
8
+ -> VPS 上的 Caddy
9
+ -> 127.0.0.1:7080(frps HTTP vhost,仅回环)
10
+ -> 加密 FRP 隧道
11
+ -> 运行 DSH 的电脑
12
+ ```
13
+
14
+ ## 两种入口
15
+
16
+ - **域名模式**:公开地址是自己的域名,Caddy 自动申请并续期证书。
17
+ - **公网 IPv4 模式**:公开地址直接是 VPS 公网 IPv4(例如你自己的 VPS 地址),插件用 Certbot 申请约 6 天有效的 Let's Encrypt IP 证书,并安装每日自动续期定时器。注意:文档示例地址(如 `203.0.113.10`)和内网、保留地址会被拒绝,必须填写真实可路由的公网 IP。
18
+
19
+ 需要 Android App 0.3.3 或更高版本(远程自定义入口);旧版 App 仍可用局域网、cpolar 和 Tailscale。
20
+
21
+ ## 手动部署 vs 自动部署
22
+
23
+ - **手动部署**:在面板复制受限模板,把 frps 部分存为 `/etc/dsh-mobile/frps.toml`,把 Caddy 片段存为 `/etc/caddy/dsh-mobile-dsh.caddy`,并确保主 Caddyfile 里有且仅需这一行:`import /etc/caddy/dsh-mobile-dsh.caddy`(没有 Caddyfile 就新建一个只写这一行)。复制操作本身不改变任何东西。公网 IPv4 还需要按模板里的注释步骤用 Certbot 申请一次 IP 证书(Caddy 自己签发不了 IP 证书);域名模式 Caddy 全自动。
24
+ - **自动部署**:填写 SSH 用户、端口和本机私钥路径(留空则用 ssh-agent 或 SSH 配置),点击一键部署。要求 Ubuntu/Debian + systemd,只接受密钥登录,不接受密码。
25
+
26
+ 点部署按钮前,面板会列出自动部署将在 VPS 上做的全部改动:从官方 APT 源安装 Caddy、安装 Python venv 与 Certbot、创建 `dsh-mobile` 系统用户(已存在则复用,卸载时保留)、frps 配置与服务、Caddy 片段加主文件里的一行 import、证书续期定时器、在 UFW 放行 FRP 控制端口与 80/443。**主 Caddyfile 里你自己的内容永远不会被改写或合并**:没有 Caddyfile、空文件或官方默认文件时才写入这一行 import;其他情况部署直接停止并告诉你手动加这一行。
27
+
28
+ ## 主机指纹核对(每次必做)
29
+
30
+ 自动部署与一键清理在建立 SSH 连接前都会先读取服务器主机指纹并展示给你:
31
+
32
+ 1. 点击部署/清理后,面板先显示服务器当前的 `KEYTYPE SHA256:…` 指纹列表。
33
+ 2. 到 VPS 服务商控制台(或首次开通时收到的邮件/控制台信息)核对指纹一致。
34
+ 3. 一致才点确认继续;不一致或无法核对时取消——插件不会静默接受未知主机密钥,部署期间密钥发生变化也会自动中止。
35
+
36
+ SSH 用户、端口和私钥路径只保存在当前浏览器的 `localStorage`(键名 `dsh-mobile.frp-vps-form.v1`)方便下次填写;共享 Token 从不进 `localStorage`;私钥文件本身不会上传到任何地方。
37
+
38
+ ## 清理 VPS
39
+
40
+ 本机“彻底移除 FRP”只删除电脑端的 frpc、Token 与配置,不动 VPS。清理 VPS 有两种方式,都只删除 DSH Mobile 明确拥有的文件、服务与带标记的防火墙规则:
41
+
42
+ 1. **复制卸载脚本**:点“复制 VPS 卸载脚本”,审阅后以 root 身份在 VPS 上执行。脚本会停用并删除 frps 服务与证书续期定时器、删除配置/二进制/证书文件与 Caddy 片段、从主 Caddyfile 里删掉那一行 import(你自己的内容原样保留;文件删空时留一句占位注释)、删除带 DSH Mobile 标记的 UFW 规则。只有本次部署创建的 `dsh-mobile` 系统用户才会被删除,之前就存在的会被保留并明确告知。
43
+ 2. **一键清理**:点“清理 VPS 上的 DSH Mobile”,同样先核对主机指纹,确认后通过 pinned SSH 执行同样的脚本。
44
+
45
+ 公网 IPv4 模式还会删除对应的 Let's Encrypt IP 证书(域名模式的证书由 Caddy 自动管理,无需处理)。
46
+
47
+ ## 运维排障
48
+
49
+ VPS 上:
50
+
51
+ ```bash
52
+ sudo systemctl status dsh-mobile-frps.service caddy dsh-mobile-cert-renew.timer
53
+ sudo journalctl -u dsh-mobile-frps.service -u caddy -n 200 --no-pager
54
+ sudo ss -lntp
55
+ curl -vk https://PUBLIC_HOST/
56
+ ```
57
+
58
+ 本机优先看插件日志(`$DSH_HOME/mobile-access/logs/dsh-mobile.log`,JSONL,超 5 MB 轮转,自动脱敏 Token 与密钥)与面板诊断报告。Windows 杀毒软件可能隔离 frpc;如确有拦截,只为已校验的组件目录设置最小范围例外。
59
+
60
+ ## 限制
61
+
62
+ - 中国大陆 VPS 上的未备案域名可能被云厂商拦截,此时改用公网 IPv4 模式。
63
+ - IPv4 证书是短期证书,必须保持续期定时器与 Caddy 正常运行。
64
+ - SSH 表单按浏览器配置文件保存,换浏览器或清理站点数据后需重填(私钥与密码从不保存)。
65
+ - VPS 的 SSH 目前不支持 IPv6 地址。
66
+ - frps 明文 vhost 必须只监听 `127.0.0.1`;插件会拒绝公网可达的明文端口,并在公开发现接口确认是当前电脑后才显示“已就绪”。
67
+
68
+ ## 手动端到端验证清单(发布前)
69
+
70
+ - [x] Ubuntu IP 模式:已部署 VPS 上一键重部署 → 公网 IP 就绪 → App 级 discovery 返回当前电脑(2026-09-03,腾讯云实测)。
71
+ - [ ] Ubuntu 域名模式:全新 VPS 一键部署 → 公网域名就绪 → App 远程配对 → 收发消息。
72
+ - [x] 既有 Caddy 共存:在已有自有站点 + import 行的 Caddyfile 上部署,确认自有内容逐字节保留、import 恰好一行、validate 通过(2026-09-03,腾讯云实测;并发写有 flock 互斥)。
73
+ - [x] 指纹变更中止:未确认密钥集合部署/清理直接 `vps_host_key_mismatch` 中止且零网络碰触(单元测试锁定;真机指纹全量核对通过)。
74
+ - [x] 一键清理:部署后执行一键清理,服务、文件、定时器、标记防火墙规则、系统用户、LE 证书均已移除,自有 Caddy 本体保留(2026-09-03,腾讯云实测)。
75
+ - [x] 卸载脚本审阅:仅触碰 DSH Mobile 拥有的路径与规则(单元测试断言 + 真机复核)。