dsh-mobile 0.6.10 → 0.6.12
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 +25 -0
- package/CONTRIBUTORS.md +24 -6
- package/README.en.md +22 -19
- package/README.md +22 -19
- package/SECURITY.md +9 -0
- package/apps/mobile/README.md +71 -90
- package/apps/mobile/README.zh-CN.md +131 -0
- package/apps/mobile/release.json +3 -3
- package/docs/ATTACH_EXISTING_FRPS.en.md +1 -1
- package/docs/ATTACH_EXISTING_FRPS.md +1 -1
- package/docs/CADDY_MANAGED.en.md +7 -7
- package/docs/CADDY_MANAGED.md +7 -7
- package/docs/CLIENT_MODULES.en.md +2 -0
- package/docs/CLIENT_MODULES.md +2 -0
- package/docs/CLOUDFLARE_TUNNEL.en.md +1 -1
- package/docs/CLOUDFLARE_TUNNEL.md +1 -1
- package/docs/CPOLAR_SUBDOMAIN.en.md +1 -1
- package/docs/CPOLAR_SUBDOMAIN.md +1 -1
- package/docs/DSH_0.1.5_LAN.md +1 -1
- package/docs/EXTENSION_WORKERS.en.md +2 -2
- package/docs/EXTENSION_WORKERS.md +2 -2
- package/docs/MOBILE_COMPOSER_TOOLBAR.en.md +10 -4
- package/docs/MOBILE_COMPOSER_TOOLBAR.md +10 -4
- package/docs/README.md +4 -2
- package/docs/SELF_HOSTED_FRP.en.md +2 -2
- package/docs/SELF_HOSTED_FRP.md +2 -2
- package/docs/SELF_HOSTED_ORIGIN.en.md +3 -1
- package/docs/SELF_HOSTED_ORIGIN.md +3 -1
- package/docs/SKIN_COMPATIBILITY.en.md +1 -0
- package/docs/SKIN_COMPATIBILITY.md +1 -0
- package/docs/SLOW_CONNECTIONS.en.md +12 -0
- package/docs/SLOW_CONNECTIONS.md +12 -0
- package/lib/client.js +234 -37
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +34 -3
- package/lib/index.mjs +402 -209
- package/lib/index.mjs.map +1 -1
- package/lib/mobile-compat.js +5 -1
- package/lib/mobile-compat.js.map +1 -1
- package/package.json +6 -1
- package/packages/question-fixes/package.json +1 -1
package/docs/CADDY_MANAGED.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
## 适用条件
|
|
8
8
|
|
|
9
|
-
托管 Caddy 为自建连接管理 HTTPS
|
|
9
|
+
托管 Caddy 为自建连接管理 HTTPS 代理和证书,不提供内网穿透。你需要自己的域名、可由腾讯云 DNSPod 凭据修改的 DNS-01 验证记录,以及能到达运行 DSH 电脑的公网 HTTPS 入站端口。电脑位于可管理的路由器之后时,需要把公网端口映射到本机 Caddy 端口;云主机则需检查安全组和主机防火墙。DNS-01 只验证域名控制权,不会打通 CGNAT、校园网隔离或没有入站权限的网络;这类网络可选择 Cloudflare Tunnel、cpolar,或已有 VPS 上的 FRP。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
当前面板只支持 `tencentcloud` DNS 模块与腾讯云 DNSPod 凭据,不支持把其他 DNS 服务商的密钥填入此模式。使用 Cloudflare DNS 的用户可以继续使用 Cloudflared,无需为本功能迁移 DNS;不要把 Cloudflared 连接器 Token 填入腾讯云密钥栏。
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
Android App / 浏览器 → 公网 HTTPS 域名(Caddy 终止 TLS)
|
|
@@ -27,7 +27,7 @@ Android App / 浏览器 → 公网 HTTPS 域名(Caddy 终止 TLS)
|
|
|
27
27
|
1. 在电脑端打开 **移动访问 → 远程 → 自建连接 → 自有反向代理**,选择 **托管 Caddy**。
|
|
28
28
|
2. 点击 **安装托管 Caddy** 并确认下载。插件从固定的 [DSH Mobile 组件分发](https://github.com/saya-ch/dsh-mobile/releases/tag/caddy-component-2.11.7-tencentcloud-0.4.3-r1) 下载,核对完整大小、SHA-256、Caddy 核心与 DNS 模块版本;来源不可用或校验失败时不会执行文件。
|
|
29
29
|
3. 填写公网 HTTPS 地址,例如 `https://dsh.example.com`,选择腾讯云 DNSPod,填写具有所需区域权限的 `SecretId` 和 `SecretKey`,再设置本机 HTTPS 端口,例如 `8443`。让域名解析到你的公网入口,并按需将公网 TCP 443 映射至电脑的 8443。
|
|
30
|
-
4. 点击 **保存并启动 Caddy
|
|
30
|
+
4. 点击 **保存并启动 Caddy**。组件已安装不等于连接就绪:只有电脑端经公网 HTTPS 验证证书,并确认入口属于当前 DSH 实例后,面板才显示已就绪。这个探测仍不能证明手机网络可达。
|
|
31
31
|
5. 生成远程配对二维码,在 Android App 的 **远程访问** 中扫码,或用手机浏览器打开配对链接。用手机流量验证实际页面加载、会话同步与 WebSocket;不要只以电脑端健康检查代替手机访问。
|
|
32
32
|
|
|
33
33
|
首次 DNS-01 签发需要等待 DNS 生效和证书签发。期间电脑保持在线,避免反复重启触发签发限流。托管模式不安装系统服务、不修改 PATH、不设置开机启动、不导入系统证书;Caddy 的管理 API 和自动配置落盘均关闭。
|
|
@@ -42,7 +42,7 @@ Android App / 浏览器 → 公网 HTTPS 域名(Caddy 终止 TLS)
|
|
|
42
42
|
|
|
43
43
|
以下构建和验证工具需在本仓库源码 checkout 中运行;npm 插件包不包含这些维护脚本,也不需要普通用户自行编译 Caddy。
|
|
44
44
|
|
|
45
|
-
[构建脚本](
|
|
45
|
+
[构建脚本](<https://github.com/saya-ch/dsh-mobile/blob/main/scripts/build-caddy-component.mjs>) 固定 Go 1.26.9、xcaddy v0.4.7、Caddy v2.11.7、腾讯云 DNS v0.4.3 及 golang.org/x/net v0.60.0。[输入锁](<https://github.com/saya-ch/dsh-mobile/blob/main/scripts/caddy-component-lock.json>) 固定源码提交和编译依赖版本/校验和。每次构建使用全新的私有编译缓存及模块缓存,执行 Go 校验和、源码来源与保留模块校验;未知依赖、替换模块、编译器或原生设置漂移会在运行生成的 Caddy 前拒绝。
|
|
46
46
|
|
|
47
47
|
选择精确 Go 编译器(可用 `GO_BINARY`),输出目录必须是全新绝对路径:
|
|
48
48
|
|
|
@@ -52,7 +52,7 @@ node scripts/build-caddy-component.mjs --output-dir /absolute/new/second
|
|
|
52
52
|
node scripts/compare-caddy-builds.mjs --first /absolute/new/first --second /absolute/new/second --target linux-x64
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Windows 使用原生绝对路径和 `--target win32-x64`。可复现指二进制字节、大小、SHA-256 一致,不保证操作系统镜像或所有元数据/许可证文本逐字一致。[工作流](
|
|
55
|
+
Windows 使用原生绝对路径和 `--target win32-x64`。可复现指二进制字节、大小、SHA-256 一致,不保证操作系统镜像或所有元数据/许可证文本逐字一致。[工作流](<https://github.com/saya-ch/dsh-mobile/blob/main/.github/workflows/caddy-component.yml>) 在 Windows/Linux x64 分别独立构建两次,审核完整产物,并使用独立 manifest 测试真正安装后的二进制:默认版本/模块检查、目录提升、无重复下载的重启、损坏下载回滚、TLS/配对/API/WSS、持久设备凭据与停止后清理,保留邻近文件及配对数据。其他架构仍未审核。
|
|
56
56
|
|
|
57
57
|
PR 和普通手动运行只产生只读审查产物。只有授权的 `abworks-dev/dsh-mobile` fork 上已有 `caddy-component-2.11.7-tencentcloud-0.4.3-review.N` 标签,经明确手动启用且两个原生任务均通过,才发布 **TEST 预发布版**:
|
|
58
58
|
|
|
@@ -60,9 +60,9 @@ PR 和普通手动运行只产生只读审查产物。只有授权的 `abworks-d
|
|
|
60
60
|
gh workflow run caddy-component.yml --repo abworks-dev/dsh-mobile --ref caddy-component-2.11.7-tencentcloud-0.4.3-review.1 -f publish_review_prerelease=true
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
组件标签不以 `v` 开头,避免触发插件正式发布。独立写权限任务拒绝已有 Release,创建非 latest 的预发布草稿,不覆盖资产;下载所有草稿资产与准备字节逐一对比后才公开。产物包括区分平台的原始二进制、manifest、编译/模块/版本/许可证证据、双构建证明、源码提交/运行标识和 SHA256SUMS。[发布后验证器](
|
|
63
|
+
组件标签不以 `v` 开头,避免触发插件正式发布。独立写权限任务拒绝已有 Release,创建非 latest 的预发布草稿,不覆盖资产;下载所有草稿资产与准备字节逐一对比后才公开。产物包括区分平台的原始二进制、manifest、编译/模块/版本/许可证证据、双构建证明、源码提交/运行标识和 SHA256SUMS。[发布后验证器](<https://github.com/saya-ch/dsh-mobile/blob/main/scripts/verify-caddy-release.mjs>) 用 GitHub 元数据及安装器实际 HTTPS/受限重定向下载链路复核 **所有公开资产**,成功后才输出仅供审核的目录。公开后验证失败会保留已公开的标记预发布版、使任务失败且不输出校验目录,不擅自删除或回滚 Release。CI 产物保留 14 天,Release 资产另行保存。
|
|
64
64
|
|
|
65
|
-
公开定制下载端点曾在请求 v2.11.6 时返回 v2.11.7,动态最新版不能成为信任来源。版本化 GitHub URL 仍可被仓库所有者替换;信任边界是审核过的精确大小/哈希,而非 URL 名称或远端自报校验和。fork 的目录只是审核候选,不会自动写入[生产组件表](
|
|
65
|
+
公开定制下载端点曾在请求 v2.11.6 时返回 v2.11.7,动态最新版不能成为信任来源。版本化 GitHub URL 仍可被仓库所有者替换;信任边界是审核过的精确大小/哈希,而非 URL 名称或远端自报校验和。fork 的目录只是审核候选,不会自动写入[生产组件表](<https://github.com/saya-ch/dsh-mobile/blob/main/src/caddy-component.ts>)。
|
|
66
66
|
|
|
67
67
|
### 正式分发与安装开放
|
|
68
68
|
|
|
@@ -6,6 +6,8 @@
|
|
|
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
|
|
|
9
|
+
Selection applies to whole module IDs, not individual buttons, cards or sidebars inside a module. A plugin may register several modules or share/depend on a module with other features. A feature not delivered as an optional client module may not be independently removable here.
|
|
10
|
+
|
|
9
11
|
## Computer defaults and this device
|
|
10
12
|
|
|
11
13
|
- On the **computer: Settings → General → Mobile page modules → Manage**, set defaults for this computer's mobile access. Enable a LAN or remote access entry first so the current DSH module catalog can be read.
|
package/docs/CLIENT_MODULES.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
用“移动页面模块”选择专用移动页面要加载的客户端组件。它不卸载电脑上的插件,不停止插件服务,也不是设备权限隔离;已配对设备仍是受信任的 DSH 操作者。
|
|
8
8
|
|
|
9
|
+
选择作用于完整模块 ID,不能分别隐藏同一模块中的按钮、卡片或侧栏。一个插件可能注册多个模块,也可能与其他功能共用或依赖某个模块;未拆为可选客户端模块的功能不一定能在这里单独关闭。
|
|
10
|
+
|
|
9
11
|
## 电脑默认与本设备选择
|
|
10
12
|
|
|
11
13
|
- **电脑端:设置 → 通用设置 → 移动页面模块 → 管理**,修改此电脑的移动访问默认加载项。先开启一个局域网或远程访问入口,才能读取当前 DSH 的模块目录。
|
|
@@ -12,7 +12,7 @@ The built-in cloudflared provider runs in one of two modes, chosen in the panel
|
|
|
12
12
|
| Availability | Officially for testing: rate-limited, no uptime guarantee | Carried by your own Cloudflare account |
|
|
13
13
|
| Settings | None | Connector token, public hostname, local forward port |
|
|
14
14
|
|
|
15
|
-
Cloudflare provides the public hostname and TLS. The plugin runs `cloudflared` locally and forwards requests to its paired-device gateway. Select **Remote access** in the Android app; a mobile browser can also use the public HTTPS pairing link. The tunnel does not replace DSH Mobile pairing.
|
|
15
|
+
Cloudflare provides the public hostname and TLS. The plugin runs `cloudflared` locally and forwards requests to its paired-device gateway. The computer connects out to Cloudflare, so a home-network inbound port and managed Caddy's Tencent Cloud DNSPod credentials are not required. Select **Remote access** in the Android app; a mobile browser can also use the public HTTPS pairing link. The tunnel does not replace DSH Mobile pairing.
|
|
16
16
|
|
|
17
17
|
## Quick tunnel feature limits
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| 可用性 | 官方定位为测试用途:有限流、无可用性保证 | 由你的 Cloudflare 账号承载 |
|
|
13
13
|
| 配置项 | 无 | 连接器令牌、公网域名、本机转发端口 |
|
|
14
14
|
|
|
15
|
-
Cloudflare 提供公网域名与 TLS,插件在本机运行 `cloudflared
|
|
15
|
+
Cloudflare 提供公网域名与 TLS,插件在本机运行 `cloudflared`,把请求交给有设备配对认证的私有网关。电脑主动连接 Cloudflare,不要求家庭网络开放公网入站端口,也不使用托管 Caddy 的腾讯云 DNSPod 凭据。在 Android App 中请选择 **远程访问**;手机浏览器也可打开公开 HTTPS 配对链接。隧道不能替代 DSH Mobile 配对。
|
|
16
16
|
|
|
17
17
|
## 快速隧道的功能限制
|
|
18
18
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
cpolar assigns a temporary public address by default. Reserving a subdomain lets an account request a fixed address, reducing bookmark updates and re-pairing after tunnel restarts. A fixed address does not keep the tunnel permanently online or remove re-pairing requirements after credentials expire or a device is revoked.
|
|
8
8
|
|
|
9
|
-
The public entry still reaches the DSH Mobile Gateway with HTTPS, device pairing and authorization checks; it does not expose the ordinary DSH WebServer directly.
|
|
9
|
+
The public entry still reaches the DSH Mobile Gateway with HTTPS, device pairing and authorization checks; it does not expose the ordinary DSH WebServer directly. The computer connects out to cpolar, so this channel needs neither a home-network inbound port nor Tencent Cloud DNSPod. Availability and speed still depend on the cpolar plan and both network paths.
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
package/docs/CPOLAR_SUBDOMAIN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
cpolar 默认分配临时公网地址。账号预留子域名后,可请求使用固定地址,减少重启隧道后更新书签或重新配对的次数。固定地址不意味着隧道永远在线,也不取消设备凭据过期或撤销后的重新配对要求。
|
|
8
8
|
|
|
9
|
-
公网入口仍由 DSH Mobile Gateway 处理,沿用 HTTPS、设备配对和授权检查;不是直接开放 DSH 的普通 WebServer
|
|
9
|
+
公网入口仍由 DSH Mobile Gateway 处理,沿用 HTTPS、设备配对和授权检查;不是直接开放 DSH 的普通 WebServer。此通道由电脑主动连接 cpolar,不要求家中有公网入站端口或使用腾讯云 DNSPod;隧道可用性与速度仍取决于 cpolar 套餐和两端网络。
|
|
10
10
|
|
|
11
11
|
## 前置条件
|
|
12
12
|
|
package/docs/DSH_0.1.5_LAN.md
CHANGED
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
## 未覆盖路径
|
|
24
24
|
|
|
25
|
-
该次贡献者实测没有覆盖 Tailscale Funnel、cpolar 或自建 FRP
|
|
25
|
+
该次贡献者实测没有覆盖 Tailscale Funnel、cpolar 或自建 FRP。本页不提供这些远程路径的验证证据;应按具体插件版本、通道和网络分别检查,不能把局域网结果当成远程服务可用性的证明。
|
|
26
26
|
|
|
27
27
|
本次适配不改变 Android 配对协议、证书模型或局域网 `setup` 命令。现有已配对 App 不需要因布局适配重新配对。
|
|
@@ -14,7 +14,7 @@ Workers are **not a security sandbox**. Code retains local-user access to files,
|
|
|
14
14
|
|
|
15
15
|
## Enable selectively
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Merge these fields into the existing `mobile-access` entry's `config` in the current DSH profile, then normally restart or reload the plugin; do not modify `extension.json`. This is a configuration fragment, not a complete profile patch. A DSH entry override replaces the entire `config`, so retain existing required interface, certificate and state-file fields rather than replacing them with this fragment:
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
hostExecution:
|
|
@@ -44,6 +44,6 @@ New calls can still receive `extension_busy` while abandoned work remains unfini
|
|
|
44
44
|
| Action JSON and streams | `resultMaxBytes`, `streamWindowBytes`, `streamChunkBytes`, `streamAggregateBytes` |
|
|
45
45
|
| Logging | `logWindowMs`, `logMessagesPerWindow`, `logMessageBytes` |
|
|
46
46
|
|
|
47
|
-
Values must be integers within the accepted ranges. Chunks cannot exceed the per-stream window, and a window cannot exceed the aggregate budget. Start with the defaults.
|
|
47
|
+
Values must be integers within the accepted ranges. Chunks cannot exceed the per-stream window, and a window cannot exceed the aggregate budget. Start with the defaults; [configuration definitions and validation](https://github.com/saya-ch/dsh-mobile/blob/main/src/extension-worker-config.ts) list every default and range. Global Node heap flags can override Worker settings, so detected overriding parent launch flags reject startup before importing the extension with `extension_worker_heap_override`. Check DSH's launch options; keep in-process execution when those flags are required rather than silently bypassing the limits.
|
|
48
48
|
|
|
49
49
|
Consumption refills stream credit, and unread EOF bytes retain their budget. Logs and results are converted to bounded data inside the Worker before reaching the gateway. This contains transport and JavaScript-blocking risks, not all operating-system or process resources.
|
|
@@ -14,7 +14,7 @@ Worker **不是安全沙箱**:代码仍有本机用户权限,可以访问文
|
|
|
14
14
|
|
|
15
15
|
## 按需启用
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
将以下字段合入当前 DSH profile 中已有 `mobile-access` 条目的 `config`,再正常重启或重新加载插件;不要修改 `extension.json`。这是配置片段,不是完整 profile 补丁。DSH 的条目覆盖会替换整个 `config`,请保留原有网卡、证书、状态文件等必需字段,不要用这个片段替换它们:
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
hostExecution:
|
|
@@ -44,6 +44,6 @@ hostExecution:
|
|
|
44
44
|
| 动作 JSON 与流 | `resultMaxBytes`、`streamWindowBytes`、`streamChunkBytes`、`streamAggregateBytes` |
|
|
45
45
|
| 日志 | `logWindowMs`、`logMessagesPerWindow`、`logMessageBytes` |
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
参数必须是范围内的整数;流块不能大于单流窗口,单流窗口不能大于聚合预算。初次启用建议保留默认值。[配置定义与校验](https://github.com/saya-ch/dsh-mobile/blob/main/src/extension-worker-config.ts)列出全部默认值和范围。Node 的全局堆参数可能覆盖 Worker 资源配置,因此检测到会覆盖限制的父进程启动参数时,Worker 会在导入扩展前拒绝启动并报告 `extension_worker_heap_override`。请检查 DSH 的启动参数;需要保留这些参数时可继续使用进程内模式,不会静默绕过。
|
|
48
48
|
|
|
49
49
|
流量按消费确认回填,未读完的 EOF 数据继续占预算;日志和结果在 Worker 内先转换为受限数据,再交给网关。该机制约束传输与 JavaScript 阻塞风险,不是整个操作系统或进程的资源沙箱。
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](MOBILE_COMPOSER_TOOLBAR.md) · [Third-party compatibility](../README.en.md#third-party-plugin-compatibility)
|
|
4
4
|
|
|
5
|
-
> Layout changes
|
|
5
|
+
> Layout changes have been available since plugin 0.6.3, with public-slot wrapper touch-target corrections since 0.6.4. Android and mobile browsers use the plugin-served page; these web changes do not require reinstalling the App.
|
|
6
6
|
|
|
7
7
|
The narrow-screen composer preserves DSH's native structure and handlers. Model names truncate when space is limited, additional controls wrap, and Send/Stop retain touch dimensions. Entire native groups wrap according to their actual width. Switches are not stretched into action buttons, and inline dialogs, menus and lists do not receive compact toolbar sizing.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Layout and limits
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Current DSH puts left and right extensions under different React parents, and its width observer measures those two native groups. It exposes no parent `conversation.input.toolbar` entry. The current implementation does not combine all plugins into a shared upper scrollport, move DOM, copy core callbacks or flatten the tree with `display:contents`.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Compact/overflow fixes use the available public slots. A future upstream parent-toolbar capability can be evaluated separately.
|
|
14
14
|
|
|
15
15
|
## Compact extension boundaries
|
|
16
16
|
|
|
@@ -20,6 +20,12 @@ Public-slot checks also cover compact shapes representing an auto-continue switc
|
|
|
20
20
|
|
|
21
21
|
On small screens, direct span/div wrappers with a non-switch button in the public left/right slots reserve room for the 44px target, preventing it from escaping a 30px wrapper into adjacent controls. The rule does not identify third-party classes; pure switches, popup wrappers and wrappers containing buttons only deeper in their trees are excluded, as are wide viewports.
|
|
22
22
|
|
|
23
|
+
## Display size and available space
|
|
24
|
+
|
|
25
|
+
When text is oversized or little reading space remains, first check **Settings → General → Mobile font size**. **More font settings** shows only the code size and text/code family controls actually supported by the current DSH theme. These web preferences are local to the current address, without changing the computer or other devices. They do not guarantee font changes in a terminal canvas or arbitrary third-party controls.
|
|
26
|
+
|
|
27
|
+
The Android App's **Settings → General → Page zoom** resizes the entire WebView independently of web font size; reset it to 100% when comparing defaults. It appears only when the App advertises the required native capability, not in mobile browsers or unsupported older Apps. See the [App manual](../apps/mobile/README.md#devices-and-settings) for its range and App requirements.
|
|
28
|
+
|
|
23
29
|
## Verification scope
|
|
24
30
|
|
|
25
31
|
The real DSH composer runs with test extensions genuinely registered through the public left/right/activity slots. Checks cover small viewports, landscape, larger text, both themes, model compactness, popups, switches and reachable Send/Stop. Editor, draft and active activity nodes remain mounted without a page reload.
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[English](MOBILE_COMPOSER_TOOLBAR.en.md) · [第三方插件适配](../README.md#第三方插件适配)
|
|
4
4
|
|
|
5
|
-
> 0.6.3
|
|
5
|
+
> 布局调整自插件 0.6.3 起提供,公共插槽包装层的触摸目标修正自 0.6.4 起提供。Android App 与手机浏览器使用插件提供的页面,不需要为这些网页改动重装 App。
|
|
6
6
|
|
|
7
7
|
窄屏输入栏保留 DSH 原生结构和事件处理。模型名称在空间不足时截断,附加控件正常换行,发送/停止保持触摸尺寸,整组放不下时按实际宽度换行。插件开关不会被拉成操作按钮;内联弹窗、菜单和列表不会套用工具栏的紧凑尺寸。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 布局方式与限制
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
当前 DSH 的左右附加控件属于不同 React 父节点,核心宽度观察器还要测量这两个父组;没有公开的父级 `conversation.input.toolbar` 入口。因此当前实现不把所有插件合入共同滚动上栏,也不搬动 DOM、复制原生回调或用 `display:contents` 绕过核心布局。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
紧凑与溢出修正使用现有公共插槽。若上游以后提供父级工具栏能力,可再评估统一滚动方案。
|
|
14
14
|
|
|
15
15
|
## 附加控件的紧凑边界
|
|
16
16
|
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
小屏下,公共 left/right 插槽中直接包含普通按钮的 span/div 包装层会为 44px 点击区域保留尺寸,避免按钮越过原先 30px 包装层而挤到相邻控件。此规则不按第三方类名识别控件;不匹配纯 switch、弹窗包装或只在更深层含按钮的包装,且不在宽屏生效。
|
|
22
22
|
|
|
23
|
+
## 显示大小与可用空间
|
|
24
|
+
|
|
25
|
+
文字偏大或阅读区域偏小时,先在 **设置 → 通用设置 → 移动端字号** 核对当前值;**更多字体设置** 只显示当前 DSH 主题实际支持的代码字号、正文/代码字体选项。网页偏好只保存在当前访问地址,不修改电脑或其他设备;它们不保证调整终端 Canvas 或任意第三方控件的字体。
|
|
26
|
+
|
|
27
|
+
Android App 的 **设置 → 通用设置 → 页面缩放** 调整整个 WebView,与网页字号独立,排查时可先恢复 100%。入口只在 App 声明支持相应原生能力时出现,手机浏览器和不支持的旧 App 不显示。范围和 App 版本要求见 [App 手册](../apps/mobile/README.zh-CN.md#设备与设置)。
|
|
28
|
+
|
|
23
29
|
## 验证范围
|
|
24
30
|
|
|
25
31
|
真实 DSH 输入栏与通过公共 left/right/activity 插槽注册的测试扩展共同运行,检查小屏、横屏、较大字号、明暗主题、模型紧凑状态、弹窗、开关以及发送/停止可达性。编辑器、草稿和活跃 activity 的节点保持,不因此重载页面。
|
package/docs/README.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| 复用 Lucky、Nginx 或 Caddy 的公开 HTTPS 入口 | [自有反向代理](SELF_HOSTED_ORIGIN.md) | [Own reverse proxy](SELF_HOSTED_ORIGIN.en.md) |
|
|
15
15
|
| 由插件安装 Caddy 并管理 HTTPS 证书(0.6.9 起) | [托管 Caddy](CADDY_MANAGED.md) | [Managed Caddy](CADDY_MANAGED.en.md) |
|
|
16
16
|
| 页面加载慢、实时连接反复重连或长操作超时 | [慢链路与重连](SLOW_CONNECTIONS.md) | [Slow links and reconnection](SLOW_CONNECTIONS.en.md) |
|
|
17
|
+
| 了解输入栏换行、附加控件与触摸目标 | [移动输入栏](MOBILE_COMPOSER_TOOLBAR.md) | [Mobile composer](MOBILE_COMPOSER_TOOLBAR.en.md) |
|
|
17
18
|
| 保留电脑皮肤,排查移动页面的背景与可读性 | [皮肤与移动布局](SKIN_COMPATIBILITY.md) | [Skins and mobile layout](SKIN_COMPATIBILITY.en.md) |
|
|
18
19
|
|
|
19
20
|
在 Android App 中连接公开隧道或自建入口时请选择 **远程访问**。公开受信任证书也可用手机浏览器配对;既有 frps 的自签入口需要 **0.4.6 或更高版本 App** 固定远程 CA。各通道仍要求 DSH Mobile 配对,不能直接暴露普通 DSH 或私有 HTTP 后端。
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
| 功能 | 中文 | English | 使用状态 |
|
|
26
27
|
| --- | --- | --- | --- |
|
|
28
|
+
| 核对移动字号、字体与 App 页面缩放 | [显示大小](MOBILE_COMPOSER_TOOLBAR.md#显示大小与可用空间) | [Display size](MOBILE_COMPOSER_TOOLBAR.en.md#display-size-and-available-space) | 字体按主题能力显示;App 缩放与网页字号独立 |
|
|
27
29
|
| 为移动页面选择加载模块 | [模块设置](CLIENT_MODULES.md) | [Module settings](CLIENT_MODULES.en.md) | 电脑默认与设备覆盖分别保存,不自动刷新会话 |
|
|
28
30
|
| 允许受控路由网络访问 LAN Gateway | [额外可信网段](TRUSTED_NETWORKS.md) | [Trusted networks](TRUSTED_NETWORKS.en.md) | 不建立 VPN,不自动扩大防火墙规则 |
|
|
29
31
|
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
|
|
32
34
|
0.6.3 的 [扩展 Worker 指南](EXTENSION_WORKERS.md)/[Worker guide](EXTENSION_WORKERS.en.md) 介绍按扩展启用、预算与显式恢复;此功能不迁移普通 Cordis 插件,也不是权限沙箱。
|
|
33
35
|
|
|
34
|
-
- [贡献指南](
|
|
36
|
+
- [贡献指南](https://github.com/saya-ch/dsh-mobile/blob/main/CONTRIBUTING.md):本地检查、浏览器与 Android 验证、发布要求。
|
|
35
37
|
- [安全说明](../SECURITY.md):配对授权、TLS、组件清理与私密漏洞反馈。
|
|
36
38
|
- [贡献记录](../CONTRIBUTORS.md)与[更新记录](../CHANGELOG.md):分别查看社区参与和版本变化。
|
|
37
39
|
|
|
@@ -42,4 +44,4 @@
|
|
|
42
44
|
| 记录 | 范围 |
|
|
43
45
|
| --- | --- |
|
|
44
46
|
| [DSH 0.1.5 局域网验证](DSH_0.1.5_LAN.md) | 0.3.15 的历史实测;当前组合见[兼容性](../README.md#兼容性) |
|
|
45
|
-
| [FRP 维护交接](HANDOFF_SELF_HOSTED_FRP.md) | 0.4.6 开发时的代码地图与历史证据,仅在仓库阅读,不随 npm 包发布 |
|
|
47
|
+
| [FRP 维护交接](https://github.com/saya-ch/dsh-mobile/blob/main/docs/HANDOFF_SELF_HOSTED_FRP.md) | 0.4.6 开发时的代码地图与历史证据,仅在仓库阅读,不随 npm 包发布 |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
This page covers a new FRP entry, deployed manually or managed by the plugin over SSH. If your VPS already runs frps, plugin 0.4.6 or later can attach to it without deployment; see the [attachment guide](ATTACH_EXISTING_FRPS.en.md).
|
|
6
6
|
|
|
7
|
-
Self-hosted FRP
|
|
7
|
+
Self-hosted FRP suits users who already operate a VPS and want to manage the public entry themselves. The computer connects out to the VPS, so a home-network inbound port is unnecessary; the VPS still needs reachable public ingress, matching firewall rules, and sufficient bandwidth. The phone reaches Caddy on the VPS over HTTPS, crosses the encrypted FRP tunnel, and then reaches DSH on the computer. FRP only transports the request; DSH pairing is still required.
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
10
|
Android app
|
|
@@ -77,4 +77,4 @@ When several computers share one frps, proxy names are unique across the server
|
|
|
77
77
|
|
|
78
78
|
## Acceptance check
|
|
79
79
|
|
|
80
|
-
After deployment, check the certificate, public discovery endpoint, app pairing, and a live conversation on your own VPS and phone network. The repository's historical tests are recorded in the [self-hosted FRP handoff](HANDOFF_SELF_HOSTED_FRP.md); they cannot replace your own acceptance test.
|
|
80
|
+
After deployment, check the certificate, public discovery endpoint, app pairing, and a live conversation on your own VPS and phone network. The repository's historical tests are recorded in the [self-hosted FRP handoff](https://github.com/saya-ch/dsh-mobile/blob/main/docs/HANDOFF_SELF_HOSTED_FRP.md); they cannot replace your own acceptance test.
|
package/docs/SELF_HOSTED_FRP.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
> 插件不装不改你的 frps、**零 SSH**;还提供**完全不用公开证书**的自签穿透档(frps 只做 TCP 透传,
|
|
9
9
|
> 网关自己终止 TLS,证书有效期与更换要求见专门指南)。
|
|
10
10
|
|
|
11
|
-
自建 FRP 适合已有 VPS
|
|
11
|
+
自建 FRP 适合已有 VPS、希望自己管理公网入口的用户。电脑主动连接 VPS,因此家中即使没有公网入站也可使用;VPS 本身仍须有可达的公网入口、相应防火墙放行和足够的带宽。手机经 VPS 上的 Caddy 进入加密 FRP 隧道,再到达电脑上的 DSH;FRP 只负责传输,仍需完成 DSH 配对才能进入。
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
手机 App
|
|
@@ -81,4 +81,4 @@ curl -v https://PUBLIC_HOST/mobile-access/discovery
|
|
|
81
81
|
|
|
82
82
|
## 上线前验收
|
|
83
83
|
|
|
84
|
-
部署后,请在你的实际 VPS 与手机网络上检查证书、外网发现接口、App 配对和实时对话;本仓库的历史实测记录见[自建 FRP 交接记录](HANDOFF_SELF_HOSTED_FRP.md),不能替代你自己的验收。
|
|
84
|
+
部署后,请在你的实际 VPS 与手机网络上检查证书、外网发现接口、App 配对和实时对话;本仓库的历史实测记录见[自建 FRP 交接记录](https://github.com/saya-ch/dsh-mobile/blob/main/docs/HANDOFF_SELF_HOSTED_FRP.md),不能替代你自己的验收。
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> This provider ships from **0.4.2** onward.
|
|
6
6
|
|
|
7
|
-
This guide covers the default **external proxy** mode, where you manage public HTTPS.
|
|
7
|
+
This guide covers the default **external proxy** mode, where you manage public HTTPS. On Windows/Linux x64, you can instead choose [Managed Caddy](CADDY_MANAGED.en.md) in the same panel; it requires Tencent Cloud DNSPod credentials and public HTTPS ingress to the computer, and does not traverse CGNAT. The two modes have separate configuration and readiness checks.
|
|
8
8
|
|
|
9
9
|
## When to use it
|
|
10
10
|
|
|
@@ -37,6 +37,8 @@ Bind to an explicit loopback or RFC1918 IPv4 already assigned to the DSH compute
|
|
|
37
37
|
|
|
38
38
|
CIDRs match the proxy's **direct TCP peer**, not the phone or `X-Forwarded-For` / `X-Real-IP` / `Forwarded`. Docker or NAT may change that peer. Prefer the actual single-host /32, not an entire subnet. Up to 16 canonical private/loopback CIDRs are accepted, separated by spaces or commas; explicit private proxy sources are required for a LAN bind.
|
|
39
39
|
|
|
40
|
+
Phones behind a proxy may share that direct peer. From plugin 0.6.12, invalid credentials still share its failure budget, but anonymous failures cannot exhaust a valid one-time pairing secret's admission. Authenticated renewals and probes have per-device limits and bounded pending work. Adding or trusting forwarded-IP headers is unnecessary. For `429 rate_limited` on older versions, update the plugin while retaining pairings; do not widen source CIDRs or expose the ordinary DSH listener.
|
|
41
|
+
|
|
40
42
|
Select **Save and start backend**. An active backend reloads its settings. The panel separates the public HTTPS origin from the actual listening HTTP backend; saved settings remain visible after stopping.
|
|
41
43
|
|
|
42
44
|
## Proxy requirements, including Lucky
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> 本功能自 **0.4.2** 起随包发布。
|
|
6
6
|
|
|
7
|
-
本页介绍默认的**自备代理**模式,由你维护公网 HTTPS 代理。希望插件按需安装并管理 Caddy
|
|
7
|
+
本页介绍默认的**自备代理**模式,由你维护公网 HTTPS 代理。希望插件按需安装并管理 Caddy 与证书时,可在 Windows/Linux x64 使用同一面板中的[托管 Caddy](CADDY_MANAGED.md)模式;它需要腾讯云 DNSPod 凭据与能到达电脑的公网 HTTPS 入站,不会替你穿透 CGNAT。两种模式的配置与就绪检查不同。
|
|
8
8
|
|
|
9
9
|
## 适用场景与安全边界
|
|
10
10
|
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
|
|
39
39
|
CIDR 限制针对 TCP 连接的**直接来源地址**,不是手机 IP,也不是 `X-Forwarded-For`、`X-Real-IP` 或 `Forwarded`。Docker、桥接或 NAT 可能改变这个地址,应填写后端实际看到的私网来源。优先用单地址 `/32`,不要为了排错放宽整个局域网。最多 16 项,用空格或逗号分隔;只允许回环/私网网段,网络地址不能带主机位。LAN 监听必须显式列出私网代理来源。
|
|
40
40
|
|
|
41
|
+
代理后的手机可能共享一个直接来源地址。插件 0.6.12 起,错误凭据仍共享该来源的失败限额,但有效的一次性配对码不会被匿名失败耗尽;已认证设备的续期和探测按设备分别限频,并限制未完成操作。不需要为此添加或信任转发 IP 请求头。旧版出现 `429 rate_limited` 时先升级插件并保留配对记录,不要放宽来源网段或公开裸 DSH 端口。
|
|
42
|
+
|
|
41
43
|
点击 **保存并启动后端**。已经开启时会重新载入配置。面板会分别显示公网 HTTPS 地址与**正在监听的 HTTP 后端**;停止后仍可查看、复制已保存的后端地址。
|
|
42
44
|
|
|
43
45
|
## 反向代理要求(含 Lucky)
|
|
@@ -13,6 +13,7 @@ If saving reports a dependency conflict, retain the required module or also dese
|
|
|
13
13
|
## Diagnose a missing background
|
|
14
14
|
|
|
15
15
|
- Identify the running plugin, App and skin versions; plugin and App versions need not match.
|
|
16
|
+
- When text and controls are oversized throughout the page, check [mobile font size and App page zoom](MOBILE_COMPOSER_TOOLBAR.en.md#display-size-and-available-space) and compare defaults before attributing it to layout. Terminals and third-party controls may not consume the same font settings.
|
|
16
17
|
- Omit the skin only on this device, reopen manually and compare the conversation, composer and sidebar. Recovery points to styles or mounting, not necessarily a network or pairing failure.
|
|
17
18
|
- First compare the normal computer layout. Developers can also open `/?frontend=stock` on the authenticated mobile Origin to diagnose boot and layout behavior. Gateway authentication and HTTPS checks remain; this entry skips dedicated mobile boot rewriting and module selection, but installed client adaptation and authenticated customizations may still apply. It is not a plugin-free control; some API operations may be rejected, so it does not replace normal mobile access.
|
|
18
19
|
- When stock has a background but mobile does not, inspect the skin's mounting container and fallback for other layouts. WebSocket approval, APK reinstallation or making every container transparent cannot guarantee a fix.
|
|
@@ -13,6 +13,7 @@ DSH Mobile 在已认证的移动页面中使用专用根布局,继续渲染 DS
|
|
|
13
13
|
## 背景不显示时如何判断
|
|
14
14
|
|
|
15
15
|
- 先核对正在运行的插件、App 和皮肤版本;插件与 App 版本不必相同。
|
|
16
|
+
- 若文字和控件整体偏大,先核对[移动字号与 App 页面缩放](MOBILE_COMPOSER_TOOLBAR.md#显示大小与可用空间),与默认设置对照后再判断布局问题。终端和第三方控件不一定消费相同的字体设置。
|
|
16
17
|
- 只在本设备不加载皮肤,手动重新打开后比较会话、输入栏和侧栏。恢复正常说明需要检查双方样式与挂载位置,不表示网络或配对失效。
|
|
17
18
|
- 先与电脑上的原生布局对照。开发者还可在已认证移动 Origin 打开 `/?frontend=stock` 作启动与布局诊断;它保留 Gateway 认证与 HTTPS 检查,跳过专用移动启动改写和模块选择,但仍可能加载客户端移动适配及已认证定制,并非不含插件的对照页。部分 API 操作可能被拒绝,不能代替正常移动入口。
|
|
18
19
|
- 若原生布局有背景而移动布局没有,检查皮肤背景的挂载容器及其对非原生布局的回退逻辑;单纯放行 WebSocket、重装 APK 或把全部容器设为透明不能保证修复。
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
The remote page may open and `/mobile-access/health` may respond normally while DSH stays on “Reconnecting” or delays model and Workspace lists. HTTP reachability only shows that requests pass through; DSH's live data also needs a WebSocket connection to finish initialization and remain connected.
|
|
6
6
|
|
|
7
|
+
Start with the actual channel rather than treating every delay as a DSH heartbeat problem. [Cloudflare Quick Tunnels](CLOUDFLARE_TUNNEL.en.md#quick-tunnel-feature-limits) do not support SSE, so completion or online-revocation notices may be missing; an external proxy's [Backend listening](SELF_HOSTED_ORIGIN.en.md#state-and-phone-verification) only confirms its private HTTP listener; [Managed Caddy](CADDY_MANAGED.en.md#requirements) needs Tencent Cloud DNSPod validation and real public HTTPS ingress, which DNS-01 cannot create through CGNAT. Check ingress, certificates, authentication, WebSockets, and notification streams separately before lengthening timeouts.
|
|
8
|
+
|
|
7
9
|
## Identify the stage that fails
|
|
8
10
|
|
|
9
11
|
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.
|
|
@@ -14,6 +16,16 @@ First record the DSH, DSH Mobile plugin and Android app versions. On the compute
|
|
|
14
16
|
|
|
15
17
|
Both [#126](https://github.com/saya-ch/dsh-mobile/issues/126) and [#146](https://github.com/saya-ch/dsh-mobile/issues/146) report healthy HTTP access with a reconnecting live connection. The same interface message does not establish the same cause.
|
|
16
18
|
|
|
19
|
+
### HTTP rejection diagnostics (plugin 0.6.11+)
|
|
20
|
+
|
|
21
|
+
Plugin 0.6.11 and later write limited `auth failure` HTTP diagnostics to the plugin log (`$DSH_HOME/mobile-access/logs/dsh-mobile.log`): authorization versus CSRF rejection, status, method, a safe route or route category, related Cookie/header presence and counts, normalized Origin and recognized fetch-site values. It omits tokens, Cookie values, query strings and arbitrary original paths. Each Gateway rate-limits its two categories separately: the first event is immediate and same-category rejections aggregate within a 30-second window; `suppressed` counts previously suppressed records of that category, not all requests or only the current path. This helps investigate missing credentials and CSRF failures; it does not automatically repair a 401/403. The absence of a record does not establish successful authentication: earlier Host/Origin rejections, WebSocket upgrades and native pairing/renewal are outside these two recording points. Review logs before sharing them.
|
|
22
|
+
|
|
23
|
+
## Keep event streams distinct
|
|
24
|
+
|
|
25
|
+
In DSH 0.2.0-rc.2, `/plugins/events` is the SSE stream for plugin-module graph and build updates, not conversation-message delivery. Its `200` response, small body or repeated reconnects alone cannot establish successful delivery, failure or a missing processing animation. Inspect the `/api/remote.mux` WebSocket and the actual HTTP request for that operation as well.
|
|
26
|
+
|
|
27
|
+
An ordinary message bubble and cleared draft can precede `POST /api/session/prompt`: they are an optimistic local echo, not Host acceptance. If no corresponding request appears, retain redacted request timing, status codes and DSH logs to distinguish a request never started by the browser, proxy rejection and Host acceptance. The plugin does not automatically replay messages, approvals or other writes; check the Session before retrying an operation with an unknown outcome.
|
|
28
|
+
|
|
17
29
|
## Slow transfers can exceed the default deadlines
|
|
18
30
|
|
|
19
31
|
DSH 0.2.0-rc.2's API gateway sends a WebSocket Ping every **2 seconds** by default and ends the connection after two missed Pongs, allowing roughly **4–6 seconds** in practice. The client separately allows **15 seconds** for live-connection initialization. Large Session data, a slow uplink, or congestion can delay a Pong or the first synchronization and trigger disconnection and another synchronization.
|
package/docs/SLOW_CONNECTIONS.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
远程页面能打开、`/mobile-access/health` 返回正常,仍可能出现“重连中”、模型或工作区迟迟不显示。HTTP 可达只说明请求能通过;DSH 的实时数据还需要 WebSocket 连接完成初始化并保持在线。
|
|
6
6
|
|
|
7
|
+
先按实际通道排查,不要把所有等待都归因于 DSH 心跳。[Cloudflare 快速隧道](CLOUDFLARE_TUNNEL.md#快速隧道的功能限制)不支持 SSE,可能缺少完成提醒或在线撤销提示;[自备反向代理](SELF_HOSTED_ORIGIN.md#状态与手机验证)的「后端已监听」只说明私有 HTTP 端口启动;[托管 Caddy](CADDY_MANAGED.md#适用条件)需要腾讯云 DNSPod 验证和真正的公网 HTTPS 入站,DNS-01 不能打通 CGNAT。分别检查入口、证书、认证、WebSocket 与通知流,避免只增大超时掩盖前一层故障。
|
|
8
|
+
|
|
7
9
|
## 先判断重连发生在哪一步
|
|
8
10
|
|
|
9
11
|
先记录 DSH、DSH Mobile 插件和 Android App 的版本,再在电脑端 **移动访问 → 连接诊断** 检查当前通道;查看 DSH 启动日志和浏览器开发者工具的 Network → WS,按问题涉及的组件更新。插件与 App 独立发版,版本号不必相同。分享日志时去掉 Token、Cookie 和完整配对地址。
|
|
@@ -14,6 +16,16 @@
|
|
|
14
16
|
|
|
15
17
|
[#126](https://github.com/saya-ch/dsh-mobile/issues/126) 和 [#146](https://github.com/saya-ch/dsh-mobile/issues/146) 都报告过“HTTP 正常但实时连接重连”,它们不能仅凭界面文案判定为同一个原因。
|
|
16
18
|
|
|
19
|
+
### HTTP 拒绝诊断(插件 0.6.11 起)
|
|
20
|
+
|
|
21
|
+
插件 0.6.11 起会在插件日志(`$DSH_HOME/mobile-access/logs/dsh-mobile.log`)记录有限的 `auth failure` HTTP 诊断:区分授权与 CSRF 拒绝,包含状态、方法、安全路径或路径类别、相关 Cookie/请求头是否存在及计数、规范化 Origin 和受支持的 fetch-site 值,不记录令牌、Cookie 值、查询参数或任意原始路径。每个网关的两类诊断分别限频,首条立即记录,30 秒窗口内同类拒绝聚合;`suppressed` 表示此前被抑制的同类记录数量,不是全部请求数,也不限定于当前路径。它帮助排查凭据未携带或 CSRF 校验失败,不会自动修复 401/403。没有日志也不代表认证成功:更早的 Host/Origin 拒绝、WebSocket 升级和原生配对/续期不在这两处记录范围内。分享前仍应检查日志。
|
|
22
|
+
|
|
23
|
+
## 不同事件流不能混为一谈
|
|
24
|
+
|
|
25
|
+
在 DSH 0.2.0-rc.2 中,`/plugins/events` 是插件模块图和构建更新的 SSE,不是对话消息投递通道。它返回 `200`、传输很少字节或反复重连,不能单独证明消息发送成功、失败或处理中动画丢失;同时检查 `/api/remote.mux` WebSocket 与那次操作实际发出的 HTTP 请求。
|
|
26
|
+
|
|
27
|
+
普通消息的气泡和清空草稿可能先于 `POST /api/session/prompt`,属于本地乐观回显,不是 Host 受理确认。若找不到对应请求,请保留脱敏后的请求时序、状态码及 DSH 日志,区分浏览器未发起、代理拒绝与 Host 已受理。插件不会自动重放消息、审批或其他写请求;结果不明时先确认会话,避免重复副作用。
|
|
28
|
+
|
|
17
29
|
## 慢速传输可能超过默认等待时间
|
|
18
30
|
|
|
19
31
|
DSH 0.2.0-rc.2 的 API 网关默认每 **2 秒**发送一次 WebSocket Ping,连续两次未收到 Pong 后会结束连接,实际容忍时间约为 **4–6 秒**。客户端另有 **15 秒**的实时连接初始化期限。较大的会话数据、低速上行或拥塞可能延迟 Pong 或首次数据同步,触发断开和重新同步。
|