dsh-mobile 0.6.1 → 0.6.2
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 +7 -0
- package/CONTRIBUTORS.md +1 -0
- package/README.en.md +3 -34
- package/README.md +3 -34
- package/apps/mobile/README.md +120 -0
- package/apps/mobile/release.json +5 -0
- package/docs/CLIENT_MODULES.en.md +2 -2
- package/docs/CLIENT_MODULES.md +2 -2
- package/docs/SLOW_CONNECTIONS.en.md +1 -1
- package/docs/SLOW_CONNECTIONS.md +1 -1
- package/lib/client.js +2 -2
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +40 -42
- package/lib/index.mjs.map +1 -1
- package/lib/mobile-compat.js +1 -1
- package/lib/mobile-compat.js.map +1 -1
- package/lib/mobile-layout.js +2 -1
- package/lib/mobile-layout.js.map +1 -1
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes are recorded here. GitHub Releases provide the downloadable packages and generated commit notes.
|
|
4
4
|
|
|
5
|
+
## 0.6.2 - 2026-10-08
|
|
6
|
+
|
|
7
|
+
- Supply missing `AbortSignal.throwIfAborted()` and cancellation reasons before DSH starts on older WebViews. Preserve native implementations, cancellation and the first supplied reason, fixing the reported model/provider and other client API failures caused by the missing method. Thanks @luoyangchan for [#187](https://github.com/saya-ch/dsh-mobile/issues/187).
|
|
8
|
+
- Keep the mobile shell within the viewport when the browser does not support `dvh`, so DSH's existing conversation area retains a scroll range. Portrait/landscape touch checks cover this missing-feature case; the Android 13 devices in #187 still need confirmation from their actual WebViews.
|
|
9
|
+
- Release the npm plugin and Android App independently. Plugin updates retain the existing signed APK when native code is unchanged; App downloads use the published App descriptor, and plugin update notes follow the npm version. Android remains 0.6.1 (build 77) for this plugin update.
|
|
10
|
+
- Keep release history in this changelog, simplify both project READMEs and clarify which component needs updating.
|
|
11
|
+
|
|
5
12
|
## 0.6.1 - 2026-10-08
|
|
6
13
|
|
|
7
14
|
- Reorganize the remote HTTPS origin, external proxy and managed Caddy forms with native radio groups, responsive fields, separate actions and matching Chinese, English and Italian labels. Thanks @abworks-dev for [#184](https://github.com/saya-ch/dsh-mobile/pull/184).
|
package/CONTRIBUTORS.md
CHANGED
|
@@ -68,6 +68,7 @@ GitHub's Contributors graph counts commits on the default branch; issue reports
|
|
|
68
68
|
| [@jillkayat](https://github.com/jillkayat) | [#10](https://github.com/saya-ch/dsh-mobile/issues/10) |
|
|
69
69
|
| [@jueruibo](https://github.com/jueruibo) | [#101](https://github.com/saya-ch/dsh-mobile/issues/101) |
|
|
70
70
|
| [@KMGTPEZY](https://github.com/KMGTPEZY) | [#95](https://github.com/saya-ch/dsh-mobile/issues/95) |
|
|
71
|
+
| [@luoyangchan](https://github.com/luoyangchan) | [#187](https://github.com/saya-ch/dsh-mobile/issues/187) |
|
|
71
72
|
| [@LWping](https://github.com/LWping) | [#94](https://github.com/saya-ch/dsh-mobile/issues/94) |
|
|
72
73
|
| [@oliverwan97](https://github.com/oliverwan97) | [#26](https://github.com/saya-ch/dsh-mobile/issues/26) |
|
|
73
74
|
| [@optttt](https://github.com/optttt) | [#111](https://github.com/saya-ch/dsh-mobile/issues/111) |
|
package/README.en.md
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
> DSH Mobile is a DeepSeek Harness community plugin; the native app supports Android only.
|
|
33
33
|
>
|
|
34
|
-
> **Current stable release: 0.6.
|
|
34
|
+
> **Current stable release: 0.6.2**. Improve loading and scrolling on older WebViews, with independent plugin and app updates. [Release notes](https://github.com/saya-ch/dsh-mobile/releases/tag/v0.6.2).
|
|
35
35
|
>
|
|
36
|
-
> **Upgrade reminder**:
|
|
36
|
+
> **Upgrade reminder**: the plugin and Android app update independently. Web UI and connection fixes usually require only a plugin update; update the app for native changes or when it reports that its version is too old. [Compatibility notes](#compatibility).
|
|
37
37
|
|
|
38
38
|
<p align="center">
|
|
39
39
|
<a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.6.1/dsh-mobile-android-v0.6.1.apk"><img src="https://raw.githubusercontent.com/saya-ch/dsh-mobile/main/assets/brand/app-icon-rounded.svg" alt="DSH Mobile Android app icon" width="72" height="72"></a><br>
|
|
@@ -60,37 +60,6 @@ It also lets you customize the phone from a DSH conversation: `/mobile <what you
|
|
|
60
60
|
|
|
61
61
|
A paired device can operate DSH on the computer and must be treated as fully trusted. Enable LAN access only on trusted networks, and use a reliable HTTPS channel for remote access. Revoke a lost phone from the computer immediately.
|
|
62
62
|
|
|
63
|
-
## Mobile improvements in 0.5.5
|
|
64
|
-
|
|
65
|
-
<details>
|
|
66
|
-
<summary>Released composer, Back and rotation improvements</summary>
|
|
67
|
-
|
|
68
|
-
At widths up to 720px, an inactive composer retains a scrollable 72px draft preview, leaving more room for the conversation; editor or toolbar focus restores the expanded view. Text, references, and attachments remain intact, and Send, Queue, Steer, and Stop controls have touch targets of at least 44px. Existing DSH and app mechanisms retain submission and IME behavior.
|
|
69
|
-
|
|
70
|
-
Model-search and pairing-page input sizes are corrected, and Android Back navigates the model menu one level at a time. Rotation and window resizing retain the page, references and unsent images; a known **Removed on computer** status survives later checks. Update both the plugin and app. Unsent attachments may still be lost after app-process termination.
|
|
71
|
-
|
|
72
|
-
</details>
|
|
73
|
-
|
|
74
|
-
## 0.6.1 update
|
|
75
|
-
|
|
76
|
-
- **Remote settings**: clearer HTTPS origin, external-proxy and managed-Caddy form groups, fields and actions, including narrow-window layouts.
|
|
77
|
-
- **Builds and checks**: pinned Caddy inputs, Windows/Linux double-build comparison and isolated TLS, pairing, API, WebSocket and cleanup tests; corrected Windows Git Bash discovery and test-failure classification. [Caddy status](docs/CADDY_MANAGED.en.md)
|
|
78
|
-
- **Android app**: version-aligned 0.6.1 (build 77) with unchanged native features and pairing protocol, using the established release signer. Existing pairings do not need to be recreated.
|
|
79
|
-
|
|
80
|
-
Thanks [@abworks-dev](https://github.com/abworks-dev) for [#184](https://github.com/saya-ch/dsh-mobile/pull/184) and [#185](https://github.com/saya-ch/dsh-mobile/pull/185). Official managed Caddy installation remains unavailable. See the complete [changelog](CHANGELOG.md#061---2026-10-08).
|
|
81
|
-
|
|
82
|
-
## 0.6.0 update
|
|
83
|
-
|
|
84
|
-
This update focuses on module management, app personalization and mobile access. See the complete [changelog](CHANGELOG.md#060---2026-10-07).
|
|
85
|
-
|
|
86
|
-
- **Connections and loading**: retry transient static-resource failures, and separate long-running DSH API waits from ordinary transport timeouts. API and write requests are not replayed. [Slow-link guide](docs/SLOW_CONNECTIONS.en.md)
|
|
87
|
-
- **Mobile layout**: a compact composer with reachable controls while the keyboard is open or text is enlarged; independent mobile font size, touch-browser Enter for newlines, and narrow-panel Back to conversation.
|
|
88
|
-
- **Android experience**: choose the mascot or six whale-mark colors; improved scanner preview, focus and zoom. Fixed device order with Move up / Move to top and a drawer-toggle hold shortcut; startup still prefers the last-used computer.
|
|
89
|
-
- **Module management**: separate computer defaults and device choices with boot/dependency checks. No plugin uninstall or automatic conversation reload; an explicit recovery action handles outdated selections. [User guide](docs/CLIENT_MODULES.en.md)
|
|
90
|
-
- **Networks and compatibility**: explicit extra trusted source networks for managed LAN; selected missing WebView API fallbacks and improved extension deadlines/cancellation. [Trusted networks](docs/TRUSTED_NETWORKS.en.md) · [WebView notes](#app-or-mobile-browser)
|
|
91
|
-
|
|
92
|
-
> **Managed Caddy installation is not available yet.** Source integration and isolated TLS checks are complete, but trusted pinned binaries have not been distributed. Existing external proxies and other channels are unaffected. [Status and requirements](docs/CADDY_MANAGED.en.md)
|
|
93
|
-
|
|
94
63
|
## Quick start
|
|
95
64
|
|
|
96
65
|
Install the plugin on the computer, then pair the Android app or a mobile browser. Choose the installation path for your DSH host.
|
|
@@ -446,7 +415,7 @@ On macOS, local network, cloudflared, self-hosted FRP and the own reverse proxy
|
|
|
446
415
|
|
|
447
416
|
Existing apps (0.3.3 and later) do not need re-pairing. cpolar users should use app 0.3.15 or later because earlier apps may time out before a slow first load over the free route finishes; earlier apps also use a different status-bar strategy. The 0.4.0 app adds the multi-device list, startup behavior, and computer-side revocation status; older apps continue to connect to their saved single device. App 0.1.3 or earlier requires reinstalling and pairing again.
|
|
448
417
|
|
|
449
|
-
|
|
418
|
+
The current stable Android app is 0.6.1 (build 77), retaining 0.6.0's native features and pairing/renewal protocol without requiring re-pairing. Plugin and app version numbers do not need to match; connections check protocol and minimum-version requirements. Features with additional native requirements state the app version they need.
|
|
450
419
|
|
|
451
420
|
GitHub Release APKs use a stable signing certificate, so an older official APK with the same signer can be upgraded in place while retaining pairings. A locally built Debug APK with a different signer cannot be overwritten by the official APK; plan to pair again when switching between them.
|
|
452
421
|
|
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
> DSH Mobile 是 DeepSeek Harness 社区插件,原生 App 仅支持 Android。
|
|
33
33
|
>
|
|
34
|
-
> **当前正式版本:0.6.
|
|
34
|
+
> **当前正式版本:0.6.2**。补齐旧 WebView 的加载与滚动兼容,插件与 App 独立更新。[更新记录](https://github.com/saya-ch/dsh-mobile/releases/tag/v0.6.2)。
|
|
35
35
|
>
|
|
36
|
-
>
|
|
36
|
+
> **升级提醒**:插件与 Android App 独立更新。网页与连接修复通常只需更新插件;涉及原生功能或提示 App 版本过旧时,再更新 App。[兼容说明](#兼容性)。
|
|
37
37
|
|
|
38
38
|
<p align="center">
|
|
39
39
|
<a href="https://github.com/saya-ch/dsh-mobile/releases/download/v0.6.1/dsh-mobile-android-v0.6.1.apk"><img src="https://raw.githubusercontent.com/saya-ch/dsh-mobile/main/assets/brand/app-icon-rounded.svg" alt="DSH Mobile 安卓应用图标" width="72" height="72"></a><br>
|
|
@@ -60,37 +60,6 @@ DSH Mobile 是一个 DeepSeek Harness 插件,让手机浏览器或 Android App
|
|
|
60
60
|
|
|
61
61
|
配对设备可以操作电脑上的 DSH,应视为完全受信任的设备。局域网只在可信网络开启;远程访问应使用可靠的 HTTPS 通道。手机丢失时,请立即从电脑端撤销设备。
|
|
62
62
|
|
|
63
|
-
## 0.5.5 移动体验改进
|
|
64
|
-
|
|
65
|
-
<details>
|
|
66
|
-
<summary>已发布版本的输入栏、返回键与旋转改进</summary>
|
|
67
|
-
|
|
68
|
-
屏幕宽度不超过 720px 时,未编辑的输入栏保留可滚动的 72px 草稿预览,为会话留出更多空间;编辑区或工具栏获得焦点后恢复展开。文字、引用和附件保留,发送、排队、引导与停止按钮的触摸区域至少为 44px。提交和输入法行为继续由既有 DSH 与 App 机制处理。
|
|
69
|
-
|
|
70
|
-
模型搜索框与配对页的输入字号已补齐,Android 返回键可逐级退出模型菜单。App 旋转和调整窗口大小时保留当前页面、引用与未发送图片,已收到的“电脑端已移除”状态不会被后续检测覆盖。请同步更新插件与 App;App 进程终止后,未发送附件仍可能丢失。
|
|
71
|
-
|
|
72
|
-
</details>
|
|
73
|
-
|
|
74
|
-
## 0.6.1 更新
|
|
75
|
-
|
|
76
|
-
- **远程配置**:重新整理 HTTPS 地址、自备代理与托管 Caddy 的表单分组、字段和操作按钮,小窗口下也能清楚区分配置方式。
|
|
77
|
-
- **构建与验证**:固定 Caddy 构建输入,增加 Windows/Linux 双构建一致性及隔离 TLS、配对、API、WebSocket 和清理检查,修正 Windows Git Bash 路径与测试失败分类。[Caddy 状态](docs/CADDY_MANAGED.md)
|
|
78
|
-
- **Android App**:同步为 0.6.1(build 77),原生功能与配对协议不变,沿用正式签名;已有配对无需重建。
|
|
79
|
-
|
|
80
|
-
感谢 [@abworks-dev](https://github.com/abworks-dev) 的 [#184](https://github.com/saya-ch/dsh-mobile/pull/184) 与 [#185](https://github.com/saya-ch/dsh-mobile/pull/185)。托管 Caddy 仍未开放正式安装;完整记录见 [CHANGELOG](CHANGELOG.md#061---2026-10-08)。
|
|
81
|
-
|
|
82
|
-
## 0.6.0 更新
|
|
83
|
-
|
|
84
|
-
本次更新聚焦模块管理、App 个性化与移动访问体验;完整记录见 [CHANGELOG](CHANGELOG.md#060---2026-10-07)。
|
|
85
|
-
|
|
86
|
-
- **连接与加载**:重试临时失败的静态资源请求,长时间 DSH API 操作不再被普通传输超时截断;不重放 API 或写入请求。[慢链路说明](docs/SLOW_CONNECTIONS.md)
|
|
87
|
-
- **移动布局**:输入栏更紧凑,改善键盘打开和大字号时的按钮可达性;支持独立移动字号、触屏浏览器 Enter 换行,以及窄屏面板“返回会话”。
|
|
88
|
-
- **Android 体验**:可选鲸鱼娘及六种鲸鱼标志配色;改进扫码预览、对焦与缩放。设备列表支持固定顺序、上移/置顶,长按左上角抽屉按钮可切换电脑;启动仍优先连接最近使用的电脑。
|
|
89
|
-
- **模块管理**:电脑默认与本设备选择分别保存,检查启动必需模块和依赖,不卸载插件、不自动刷新当前会话。旧选择失效时提供本设备恢复入口。[操作指南](docs/CLIENT_MODULES.md)
|
|
90
|
-
- **网络与兼容**:托管局域网可追加明确的可信来源网段;补齐部分旧 WebView 缺失 API,完善扩展调用超时与取消。[可信网段](docs/TRUSTED_NETWORKS.md) · [WebView 说明](#app-与手机浏览器)
|
|
91
|
-
|
|
92
|
-
> **托管 Caddy 尚未开放安装。**代码与隔离 TLS 验证已完成,但可信固定二进制尚未分发;现有自备代理和其他通道不受影响。[状态与条件](docs/CADDY_MANAGED.md)
|
|
93
|
-
|
|
94
63
|
## 快速开始
|
|
95
64
|
|
|
96
65
|
先在电脑安装插件,再用 Android App 或手机浏览器配对。按你使用的 DSH 选择安装方式。
|
|
@@ -447,7 +416,7 @@ macOS 上局域网、cloudflared、自建 FRP 与自有反向代理可用;Funn
|
|
|
447
416
|
|
|
448
417
|
现有 App(0.3.3 及更新)无需重新配对;cpolar 用户应使用 0.3.15 或更新 App,较早版本可能在免费线路的慢速首次加载完成前超时;更早的 App 还使用不同的状态栏策略。App 0.4.0 才支持多设备列表、启动行为设置和电脑端撤销状态同步;旧版 App 仍可连接已保存的单台设备。App 0.1.3 及更早版本需卸载重装并重新配对。
|
|
449
418
|
|
|
450
|
-
0.6.1(build 77
|
|
419
|
+
Android App 当前正式版为 0.6.1(build 77),原生功能与配对、续期协议延续 0.6.0,已有配对无需重建。插件和 App 的版本号不要求相同;连接按协议及最低版本要求检查,具体原生功能另有要求时会说明所需 App 版本。
|
|
451
420
|
|
|
452
421
|
GitHub Release 的正式 APK 使用固定签名,可从同一签名的旧正式版原位升级并保留配对。自行构建的 Debug APK 若使用不同签名,不能直接覆盖安装正式版;切换前请准备重新配对。
|
|
453
422
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# DeepSeek Harness Android App
|
|
2
|
+
|
|
3
|
+
[简体中文](README.zh-CN.md) · [Back to the project](../../README.en.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness is the display name of this lightweight, community-maintained Android WebView shell. It does not bundle a second DSH frontend. The app and mobile browsers load the same authenticated HTTPS origin, so both receive the same DSH features plus live-editable `mobile.css` presentation and `mobile.js` functionality.
|
|
6
|
+
|
|
7
|
+
Android is the only supported native target. The iOS client remains an unpublished local experiment and is outside the build, release, and support scope.
|
|
8
|
+
|
|
9
|
+
The current stable app is **0.6.1** (build 77). The app and npm plugin update independently; plugin web UI or connection fixes do not require reinstalling the APK. Install a new signed release APK for native updates or when the app reports that its version is too old. Older official APKs with the same signer retain pairing during in-place upgrades; a differently signed Debug build cannot overwrite the official app.
|
|
10
|
+
|
|
11
|
+
## 0.6.1 update
|
|
12
|
+
|
|
13
|
+
The app is rebuilt with matching release metadata. Native functionality, package identity and pairing/renewal protocol are unchanged from 0.6.0, using the established release signer. This release improves the computer-side remote settings and Caddy build/test tooling; it does not enable official managed Caddy installation. See the [release notes](../../CHANGELOG.md#061---2026-10-08).
|
|
14
|
+
|
|
15
|
+
## 0.6.0 updates
|
|
16
|
+
|
|
17
|
+
- Fixed list order with new pairings appended. Move up / Move to top affect presentation only; startup still prefers the last-used computer.
|
|
18
|
+
- The list's **Settings → App icon** offers the mascot and six whale-mark colors without changing package identity or paired data.
|
|
19
|
+
- Proportionally cropped scanner preview, camera-supported continuous focus, pinch/double-tap zoom and 48dp zoom controls.
|
|
20
|
+
- Hold the top-left drawer toggle inside the app to return to the list. **Settings → General → Switch computer** remains available.
|
|
21
|
+
|
|
22
|
+
These native features require app 0.6.0 or later. See the [release notes](../../CHANGELOG.md#060---2026-10-07) for plugin module management, mobile font size and compatibility improvements.
|
|
23
|
+
|
|
24
|
+
## Use the app
|
|
25
|
+
|
|
26
|
+
1. Install and enable the plugin using the [project quick start](../../README.en.md#quick-start). For a command-line LAN installation, run the setup command shown there; plugin-market users can complete LAN setup in **Mobile Access** instead.
|
|
27
|
+
2. Install the signed Android APK from [GitHub Releases](https://github.com/saya-ch/dsh-mobile/releases).
|
|
28
|
+
3. With no paired computers, choose **Local network** or **Remote access**. For LAN, create a pairing key or link under **Mobile Access → Local network**. For remote access, configure a provider and generate its pairing QR code. Scan the corresponding QR code or paste its link in the app.
|
|
29
|
+
4. Name the computer after pairing. The app stores each LAN or remote pairing as a device record: LAN pins its private CA; ordinary remote paths use platform-trusted public HTTPS certificates; the self-signed FRP entry pins a remote CA. No provider app is needed on the phone.
|
|
30
|
+
|
|
31
|
+
The **Paired computers** list shows each computer's name, connection type, address, reachability and last connection. Tap a row to connect; long-press or use its **More** button to connect, rename, check, re-pair or delete the local record. The list's settings offer **Open DSH directly** (the default, using the last-used eligible computer even when several are paired) and **Show device list**. In the app's DSH page, **Settings → General → Switch computer** returns to the list. Existing LAN and remote credentials migrate without re-pairing. A revoked computer remains listed for re-pairing or deletion; temporary unreachability is not treated as revocation.
|
|
32
|
+
|
|
33
|
+
Startup options are under the list's **Settings → Startup behavior**. Deleting a local device does not revoke its authorization on the computer; use the computer's Mobile Access device controls for revocation.
|
|
34
|
+
|
|
35
|
+
### Connection recovery and certificates
|
|
36
|
+
|
|
37
|
+
The managed self-hosted FRP path uses a public-CA HTTPS domain or IPv4 origin and requires Android app 0.3.3 or later. The existing-frps path, introduced in 0.4.6, can use the same public-CA pairing or a public-IPv4 self-signed entry that requires app 0.4.6 or later. See the [attachment guide](../../docs/ATTACH_EXISTING_FRPS.en.md); older supported apps continue to work with LAN, cpolar, and Tailscale Funnel.
|
|
38
|
+
|
|
39
|
+
See the [self-hosted FRP guide](../../docs/SELF_HOSTED_FRP.en.md) for manual and automatic VPS deployment, host-key verification, cleanup, and troubleshooting.
|
|
40
|
+
|
|
41
|
+
After the first pairing, the app encrypts its device records, including revocable long-lived tokens and any pinned CA, with Android Keystore. On a later launch it sends a stored token only to its exact saved Origin to renew a short Web session before opening DSH. If the computer receives another LAN address, the app scans the default port, matches the stable DSH installation identifier, and updates the saved origin automatically. A rotating remote address such as a free cpolar URL cannot be discovered through its expired predecessor; scan the computer's current remote QR code to validate the new Origin with a one-time pairing token. The app never sends the stored device token to that new Origin, and discovery never exposes device or Session credentials.
|
|
42
|
+
|
|
43
|
+
Before pairing, the app reads separate version metadata to distinguish an outdated app, an outdated plugin, and an unsupported protocol. A legacy plugin without that endpoint continues through the original flow. When direct launch is selected, the app attempts the saved connection within a bounded recovery budget and returns to the device list if it cannot reconnect. Automatic retries run only for transient network or provider failures. Native app screens automatically follow the Android system locale in Simplified Chinese, English, or Italian without a separate language switch. Plugin-owned UI inside the WebView follows DSH's selected locale. DSH does not currently expose Italian, but the dictionaries are ready to activate without another plugin change when it does.
|
|
44
|
+
|
|
45
|
+
When automatic recovery renews a Session, the app keeps the existing DSH page if its interface is still mounted. A page that did not finish starting or whose renderer stopped must be reopened; unsaved in-page state cannot be recovered in that case.
|
|
46
|
+
|
|
47
|
+
The app keeps the live WebView when rotating, resizing the window or changing keyboard availability, preserving the page's scroll position, references and unsent images. It requests new layout and Insets without reloading. Android still recreates the Activity for language, font-scale or system-theme changes; process termination and renderer failure can also discard unpersisted page state. This follows the [Android WebView state-management guidance](https://developer.android.com/develop/adaptive-apps/cookbook/webview-state).
|
|
48
|
+
|
|
49
|
+
Once the app receives a computer-side revocation notification, later probes cannot replace **Removed on computer** with an expiry or network status. Re-pairing obtains a new credential before the row becomes usable again. A device revoked while offline may still show **Pairing expired**, because the computer deletes its token record and returns the same generic failure as for an unknown token.
|
|
50
|
+
|
|
51
|
+
LAN discovery listens to DNS-SD/mDNS and periodic UDP announcements at the same time, sends an active UDP query on port `3443`, and retains bounded HTTPS scans of visible private Wi-Fi and phone-hotspot `/24` networks as a compatibility fallback. Every discovery path carries metadata only and results are merged by stable installation identifier, so a changed address updates the existing device. After choosing **Local network**, the setup screen offers **Scan QR code** (point the camera at the computer's QR code), Scan, a result list, and a manual address field (enter `https://IP:port` when discovery fails, e.g. across subnets, on a non-default port, or behind a firewall); select one DSH before entering its key. For a browser's first connection, open the **Copy pairing link** link on the phone (the pairing code is prefilled), or visit `/mobile-access/pair` on the shown HTTPS origin and enter the 43-character pairing code after the generated key's final dot.
|
|
52
|
+
|
|
53
|
+
The private CA is not discovery data. After explicit LAN or self-signed FRP pairing, Android retrieves the gateway CA from the chosen HTTPS Origin without sending a device credential, checks its validity and SHA-256 fingerprint against the pairing key, and stores it with the encrypted device credential. Native requests and WebView then trust only a valid leaf signed by that pinned CA for the exact Origin; other TLS errors are cancelled. For a public-CA remote entry, the gateway serves no private CA and Android uses platform trust instead. A leaf renewed under the same CA needs no re-pairing; an expired, replaced, or mismatched CA must never be silently accepted and requires a new pairing. No private CA is installed in Android's system trust settings.
|
|
54
|
+
|
|
55
|
+
## Why use the app
|
|
56
|
+
|
|
57
|
+
- No browser address or tab bars.
|
|
58
|
+
- System Back dismisses supported page layers before same-origin WebView history and exits the app at the root. Model submenus return to their parent before closing.
|
|
59
|
+
- File selection, same-origin downloads and sharing use narrow native implementations; no extra native toolbar appears above the WebView.
|
|
60
|
+
- The app remains a shell around the same Web UI and protocol used by browsers.
|
|
61
|
+
|
|
62
|
+
A mobile browser remains an alternative for LAN and publicly trusted remote entries. The self-signed FRP entry requires the 0.4.6 Android app: ordinary browsers do not trust its private CA automatically.
|
|
63
|
+
|
|
64
|
+
On WebView 151 or later, the app gives its own HTTP cache a 64 MiB minimum quota so large versioned DSH scripts can be reused across page loads. Older WebViews keep their default quota; the app never lowers a larger existing quota.
|
|
65
|
+
|
|
66
|
+
To remove one computer, delete its row from the device list. A full reset uses Android system app information → clear app data (labels vary by system). It deletes all pairings, cookies, cache and Web storage and requires pairing again; do not use it as the first response to an ordinary reconnection failure.
|
|
67
|
+
|
|
68
|
+
## Security properties
|
|
69
|
+
|
|
70
|
+
| Control | Android behavior |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| Transport | HTTPS origins only; cleartext traffic is disabled. |
|
|
73
|
+
| TLS | LAN pins its pairing-key CA privately. The self-signed FRP entry requires a remote CA pin in app 0.4.6 or later. Both accept only an otherwise-untrusted, valid leaf for the exact Origin. Public-CA remote entries use platform trust; every other TLS error is cancelled. |
|
|
74
|
+
| Origin | Only scheme, normalized host, and port persist. Ordinary paths, queries, and fragments do not. |
|
|
75
|
+
| Navigation | Same-origin main frames stay inside; user-initiated external HTTPS links open in the system browser. |
|
|
76
|
+
| Permissions | File input uses the system document picker without storage permission. Camera permission is requested for QR scanning or photo capture; microphone permission is requested for DSH voice input. |
|
|
77
|
+
| Downloads | Foreground GET from the exact origin only; authentication control paths are never downloads. |
|
|
78
|
+
| Data | Android Keystore encrypts device records, including tokens, origins and pinned CAs; Web storage stays in the app sandbox. Deleting a device removes its record only; system clear-app-data removes all pairings and Web data. |
|
|
79
|
+
| Backup | App backup is disabled; TLS private keys and signing keys must remain outside the repository. |
|
|
80
|
+
|
|
81
|
+
The network security configuration does not trust user-installed CAs. For LAN, the plugin signs a new leaf for the selected interface address while the app retains the stable CA pin. For the self-signed FRP entry, the computer-side CA lasts five years and its public-IPv4 leaf lasts 397 days; the leaf can rotate under the same CA, but CA expiry or replacement requires a new fingerprint check and re-pairing. These are certificate lifetimes, not an unattended-availability guarantee.
|
|
82
|
+
|
|
83
|
+
## Mobile extension bridge
|
|
84
|
+
|
|
85
|
+
The authenticated page can call the Android bridge through `dshMobile` extensions. It uses an `androidx.webkit` WebMessage listener, checks the exact configured top-level origin and `isMainFrame` on every message, and never uses `addJavascriptInterface`. Inbound messages are capped at 1 MiB, clipboard text at 256 KiB, binary results at 8 MiB, and replies at 12 MiB. The bridge does not expose cookies, device tokens, pairing keys, CA private keys, or arbitrary Android APIs.
|
|
86
|
+
|
|
87
|
+
Available actions include `files.pick`, `camera.capture`, `share`, `clipboard.read`, `clipboard.write`, `notification.notify`, `notification.settings` and `mobile.switch-computer`. DSH keeps its file-attachment action in Add; Mobile adds camera capture there when the current attachment owner accepts images. The separate `files.pick` follows the caller's MIME types and returns at most 8 MiB through the bridge; that is not a limit on DSH's file selector. Camera capture requests permission when used, writes a full-resolution JPEG through `FileProvider` and returns a browser `File`.
|
|
88
|
+
|
|
89
|
+
Task reminders use Host completion events and explicit pending-input cards while the page remains alive. Enable notifications or open system settings from DSH **Settings → General** inside the app. Lock-screen text is generic, different tasks do not replace each other and tapping opens the app. Completion reminders require SSE and have no offline event replay; Cloudflare Quick Tunnels do not support the stream. See [channel limits](../../docs/CLOUDFLARE_TUNNEL.en.md#quick-tunnel-feature-limits).
|
|
90
|
+
|
|
91
|
+
Only one file-selection or camera interaction runs at a time, with a five-minute deadline. Cancellation, WebView destruction, timeout and stale-session results are cleaned up or rejected. Browsers use corresponding Web APIs and return `unsupported` when unavailable.
|
|
92
|
+
|
|
93
|
+
From 0.4.7, the app uses plain Enter for a new draft line only when an inset-backed on-screen keyboard is visible, Android reports no hardware keyboard, and an active session composer is focused. The Send button still submits a multiline draft. Floating keyboards, unknown state, older apps, and mobile browsers retain DSH's original Enter behavior; physical keyboards can still use Shift+Enter for a line break.
|
|
94
|
+
|
|
95
|
+
From 0.6.0, the main composer in touch-primary browsers uses Enter to add a line to a nonempty draft and does nothing for an empty draft. DSH retains menus, composition and modified shortcuts. An external keyboard on a touch-primary browser uses that same rule; a non-touch desktop is unchanged. General settings offers a mobile font size of 12–32px, default 16px, saved for the current address only; editable inputs retain a 16px minimum.
|
|
96
|
+
|
|
97
|
+
DSH records through `getUserMedia` and sends audio to the configured computer-side DSH speech provider for transcription, not browser-native SpeechRecognition or the extension bridge. The app requests microphone permission on first use and grants audio-only capture for the paired HTTPS Origin. Computer components, model and network must be available; permission does not guarantee transcription. Same-origin client plugins share the page's permissions, so grant recording only when you trust them.
|
|
98
|
+
|
|
99
|
+
Computer-side extensions are separate: their `host.mjs` runs as trusted local Node.js code on the DSH host, while `mobile.js` calls its scoped actions and routes. The app bridge cannot edit or upload extension source files.
|
|
100
|
+
|
|
101
|
+
The client validates the extension manifest and revisioned resource URLs. File changes trigger an authenticated server-sent event so the phone can refresh immediately; 45-second visible and 5-minute hidden polling remains a recovery fallback. Every UI activation is pinned to its Host, script, stylesheet, and asset generation. Failed Host staging keeps the current version; failed client activation closes that extension and retries instead of mixing generations.
|
|
102
|
+
|
|
103
|
+
## Build
|
|
104
|
+
|
|
105
|
+
Requirements: Android Studio or Android SDK 36 and JDK 17. The repository includes the Gradle 9.7.1 Wrapper.
|
|
106
|
+
|
|
107
|
+
```powershell
|
|
108
|
+
Set-Location apps/mobile/android
|
|
109
|
+
./gradlew.bat :app:lintDebug :app:testDebugUnitTest :app:assembleDebug -x :app:lintAnalyzeDebugUnitTest -x :app:lintAnalyzeDebugAndroidTest
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The debug APK is written to `app/build/outputs/apk/debug/app-debug.apk`. GitHub Releases build a signed release APK with a stable signing key stored only in repository secrets; signing keys and passwords never enter the source tree or build artifacts.
|
|
113
|
+
|
|
114
|
+
## Acceptance
|
|
115
|
+
|
|
116
|
+
Shared URL-policy tests cover origin normalization, pairing entry, same-origin navigation and download paths. PJW110 with Android 16 and WebView 151 was used to verify model-menu Back, rotation with draft/reference/image retention, known revocation through checks and restart, and re-pairing the same device. That evidence uses an isolated HTTPS instance over USB, not a public tunnel. A real VPS plus phone end-to-end test of the self-signed FRP entry has not been recorded; other devices, cutouts, font scaling, TLS failures, file input and downloads still require device-specific acceptance.
|
|
117
|
+
|
|
118
|
+
A 0.5.6 development build used to prepare 0.6.0 additionally verified in-place Debug upgrade with paired data retained, all seven Launcher choices, two isolated computers, explicit order surviving later connections, scanner buttons/double-tap zoom and camera release on this device. Physical pinch, real QR recognition, older-Android fallback and process-death restoration are not represented as completed device checks.
|
|
119
|
+
|
|
120
|
+
Apache-2.0 licensed. See [LICENSE](../../LICENSE).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Mobile page modules
|
|
2
2
|
|
|
3
|
-
[中文](CLIENT_MODULES.md) · [Back to README](../README.en.md#
|
|
3
|
+
[中文](CLIENT_MODULES.md) · [Back to README](../README.en.md#optional-modules-and-advanced-configuration)
|
|
4
4
|
|
|
5
|
-
> DSH Mobile 0.6.0
|
|
5
|
+
> DSH Mobile plugin 0.6.0 and later provide module management in General settings. Plugin and app version numbers do not need to match.
|
|
6
6
|
|
|
7
7
|
Choose which client components the dedicated mobile page loads. This does not uninstall computer plugins, stop their services, or restrict device permissions. A paired device remains a trusted DSH operator.
|
|
8
8
|
|
package/docs/CLIENT_MODULES.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# 移动页面模块
|
|
2
2
|
|
|
3
|
-
[English](CLIENT_MODULES.en.md) · [返回 README](../README.md
|
|
3
|
+
[English](CLIENT_MODULES.en.md) · [返回 README](../README.md#可选模块与高级配置)
|
|
4
4
|
|
|
5
|
-
> DSH Mobile 0.6.0
|
|
5
|
+
> DSH Mobile 插件 0.6.0 起在通用设置中提供模块管理入口;插件与 App 的版本号不必相同。
|
|
6
6
|
|
|
7
7
|
用“移动页面模块”选择专用移动页面要加载的客户端组件。它不卸载电脑上的插件,不停止插件服务,也不是设备权限隔离;已配对设备仍是受信任的 DSH 操作者。
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@ The remote page may open and `/mobile-access/health` may respond normally while
|
|
|
6
6
|
|
|
7
7
|
## Identify the stage that fails
|
|
8
8
|
|
|
9
|
-
First
|
|
9
|
+
First record the DSH, DSH Mobile plugin and Android app versions. On the computer, check the current channel under **Mobile Access → Connection diagnostics**, then inspect DSH startup logs and the browser's developer tools under Network → WS and update the component involved. The plugin and app release independently; their version numbers do not need to match. Remove Tokens, Cookies, and complete pairing URLs before sharing logs.
|
|
10
10
|
|
|
11
11
|
- **WebSocket never connects**: check for `101 Switching Protocols` and errors such as `401`, `403`, `404`, or `502`. Authentication, Host/Origin checks, proxy upgrade support, paths, and version differences can all cause this. Heartbeat adjustments do not resolve these failures. Allow blocked third-party plugin paths individually in Connection diagnostics; DSH's built-in paths do not need to be added again.
|
|
12
12
|
- **The request gets 101 but connections keep closing**: record the interval and compare the same page and Session through LAN and remote access. If a long Session repeatedly disconnects only through the remote channel while downloads saturate the link, investigate the heartbeat and initialization deadlines below. Browser close code `1006` means an abnormal end and does not identify which layer disconnected.
|
package/docs/SLOW_CONNECTIONS.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## 先判断重连发生在哪一步
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
先记录 DSH、DSH Mobile 插件和 Android App 的版本,再在电脑端 **移动访问 → 连接诊断** 检查当前通道;查看 DSH 启动日志和浏览器开发者工具的 Network → WS,按问题涉及的组件更新。插件与 App 独立发版,版本号不必相同。分享日志时去掉 Token、Cookie 和完整配对地址。
|
|
10
10
|
|
|
11
11
|
- **WebSocket 没有连接成功**:检查请求是否获得 `101 Switching Protocols`,并留意 `401`、`403`、`404`、`502` 等错误。认证、Host/Origin、反向代理升级支持、连接路径或版本差异都可能造成这种情况。调整心跳不能解决这些问题;第三方插件被拦截的路径可在连接诊断中按需允许,不必把 DSH 内置路径全部重新添加。
|
|
12
12
|
- **已获得 101,但连接反复关闭**:记录关闭间隔,并对比同一页面、同一会话的局域网与远程访问。如果只在远程打开长会话时频繁断开,同时下载长时间占满链路,才进一步检查下面的心跳和初始化等待时间。浏览器显示 `1006` 表示连接异常结束,本身不能确定是哪一层断开。
|
package/lib/client.js
CHANGED
|
@@ -5171,8 +5171,8 @@ window.__ModuleLoader__.load({
|
|
|
5171
5171
|
function clientReleaseInfo(data) {
|
|
5172
5172
|
const latestVersion = releaseVersion(data.latestVersion);
|
|
5173
5173
|
const androidVersion = releaseVersion(data.androidVersion);
|
|
5174
|
-
const
|
|
5175
|
-
const androidDownloadUrl =
|
|
5174
|
+
const expectedAndroidDownloadUrls = androidVersion === void 0 ? [] : ["v", "android-v"].map((prefix) => `${GITHUB_RELEASES_URL}/download/${prefix}${androidVersion}/dsh-mobile-android-v${androidVersion}.apk`);
|
|
5175
|
+
const androidDownloadUrl = typeof data.androidDownloadUrl === "string" && expectedAndroidDownloadUrls.includes(data.androidDownloadUrl) ? data.androidDownloadUrl : GITHUB_RELEASES_URL;
|
|
5176
5176
|
return {
|
|
5177
5177
|
updateAvailable: data.updateAvailable === true && latestVersion !== void 0,
|
|
5178
5178
|
...latestVersion === void 0 ? {} : { latestVersion },
|