dsh-mobile 0.6.1 → 0.6.3
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 +21 -0
- package/CONTRIBUTORS.md +12 -4
- package/README.en.md +11 -38
- package/README.md +11 -38
- package/SECURITY.md +3 -2
- package/apps/mobile/README.md +132 -0
- package/apps/mobile/release.json +5 -0
- package/cordis.patch.yml +2 -1
- package/docs/ATTACH_EXISTING_FRPS.md +1 -1
- package/docs/CADDY_MANAGED.en.md +15 -1
- package/docs/CADDY_MANAGED.md +15 -1
- package/docs/CLIENT_MODULES.en.md +2 -2
- package/docs/CLIENT_MODULES.md +2 -2
- package/docs/CLOUDFLARE_TUNNEL.en.md +2 -2
- package/docs/CLOUDFLARE_TUNNEL.md +3 -3
- package/docs/EXTENSION_WORKERS.en.md +49 -0
- package/docs/EXTENSION_WORKERS.md +49 -0
- package/docs/MOBILE_COMPOSER_TOOLBAR.en.md +19 -0
- package/docs/MOBILE_COMPOSER_TOOLBAR.md +19 -0
- package/docs/README.md +2 -0
- package/docs/SELF_HOSTED_FRP.en.md +1 -1
- package/docs/SELF_HOSTED_FRP.md +1 -1
- package/docs/SLOW_CONNECTIONS.en.md +1 -1
- package/docs/SLOW_CONNECTIONS.md +1 -1
- package/docs/TRUSTED_NETWORKS.en.md +1 -1
- package/docs/TRUSTED_NETWORKS.md +1 -1
- package/lib/cli.js +1 -0
- package/lib/cli.js.map +1 -1
- package/lib/client.js +866 -99
- package/lib/client.js.map +1 -1
- package/lib/extension-worker-runtime.mjs +1646 -0
- package/lib/extension-worker-runtime.mjs.map +1 -0
- package/lib/index.d.mts +199 -7
- package/lib/index.mjs +1645 -586
- 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 +17 -6
- package/packages/question-fixes/LICENSE +201 -0
- package/packages/question-fixes/package.json +9 -2
- package/node_modules/dsh-mobile-question-fixes/lib/client.js +0 -78
- package/node_modules/dsh-mobile-question-fixes/lib/client.js.map +0 -1
- package/node_modules/dsh-mobile-question-fixes/lib/index.mjs +0 -14
- package/node_modules/dsh-mobile-question-fixes/lib/index.mjs.map +0 -1
- package/node_modules/dsh-mobile-question-fixes/package.json +0 -25
|
@@ -53,7 +53,7 @@ Once saved, leaving the token field blank keeps the stored token, and the field
|
|
|
53
53
|
|
|
54
54
|
## Connect the phone to a named tunnel
|
|
55
55
|
|
|
56
|
-
Moving to a fixed hostname means **an already paired phone must pair again**:
|
|
56
|
+
Moving to a fixed hostname means **an already paired phone must pair again**: the App does not send a saved device token to a changed Origin without new pairing. This client-side exact-address policy does not mean the server token automatically expires by hostname; remote channels share the device registry. Use a trusted entry you control and revoke a device on the computer if credential theft is suspected.
|
|
57
57
|
|
|
58
58
|
1. On the computer, open **Remote** in the panel and choose **Create remote pairing QR code**. That is what opens the pairing window, which is time-limited; while it is closed nothing can pair.
|
|
59
59
|
2. In the app, **open the Remote entry first** (the remote access setup page in the connection center), then scan the code.
|
|
@@ -96,7 +96,7 @@ The old address may show **Address may have changed** or temporarily unreachable
|
|
|
96
96
|
| Connection stopped or exited | `cloudflared_stopped` / `cloudflared_exited` | The channel dropped. Reconnect. |
|
|
97
97
|
| Unrecognized output | `cloudflared_invalid_output` / `cloudflared_invalid_origin` | cloudflared output, or the public address it printed, failed validation. Reconnect and copy the diagnostic report. |
|
|
98
98
|
| Gateway start failed | `gateway_start_failed` | The authentication gateway behind the tunnel did not start; this is not a port conflict. Check the local logs. |
|
|
99
|
-
| Download redirect problem | `cloudflared_download_redirect_missing` / `_invalid` / `_rejected` | The official
|
|
99
|
+
| Download redirect problem | `cloudflared_download_redirect_missing` / `_invalid` / `_rejected` | The official page did not redirect to the fixed release asset, or validation rejected the target. Retry later or update the plugin; a global cloudflared installation does not replace its private pinned component. |
|
|
100
100
|
|
|
101
101
|
## Troubleshooting
|
|
102
102
|
|
|
@@ -53,9 +53,9 @@ Cloudflare 提供公网域名与 TLS,插件在本机运行 `cloudflared`,把
|
|
|
53
53
|
|
|
54
54
|
## 用手机连上命名隧道
|
|
55
55
|
|
|
56
|
-
切到固定域名后,**已经配对过的手机必须重新配对**:
|
|
56
|
+
切到固定域名后,**已经配对过的手机必须重新配对**:App 不会把已存设备令牌发送给未经新配对验证的 Origin。这是客户端的精确地址发送策略,不代表服务端令牌自动按域名失效;远程通道共用设备注册表。请使用可信且由你控制的入口,怀疑凭据泄漏时在电脑端撤销设备。
|
|
57
57
|
|
|
58
|
-
1. 电脑面板 → **远程** → 点
|
|
58
|
+
1. 电脑面板 → **远程** → 点 **生成远程配对二维码**。这一步打开有时限的配对窗口;未打开时不能新增配对,已有配对不受影响。
|
|
59
59
|
2. 手机 App → **先进入「远程」入口**(连接中心的远程访问设置页)→ 再扫描二维码。
|
|
60
60
|
|
|
61
61
|
> **命名隧道必须在「远程」入口里扫码。** App 只把 `.ts.net`、cpolar、`.trycloudflare.com` 这类平台后缀当作「无需询问即为远程」;你自己的域名同样会被识别为可远程的候选地址,但「局域网」流程只接受非候选地址,所以在局域网界面扫码会被判为无效并提示**无效二维码 / Invalid QR code**,看起来就像「连不上」。先进入「远程」流程再扫即可。
|
|
@@ -96,7 +96,7 @@ Cloudflare 提供公网域名与 TLS,插件在本机运行 `cloudflared`,把
|
|
|
96
96
|
| 连接已停止 / 意外退出 | `cloudflared_stopped` / `cloudflared_exited` | 通道已断开,点重新连接。 |
|
|
97
97
|
| 返回内容无法识别 | `cloudflared_invalid_output` / `cloudflared_invalid_origin` | cloudflared 输出或公网地址未通过校验。重新连接并复制诊断报告。 |
|
|
98
98
|
| 网关启动失败 | `gateway_start_failed` | 隧道背后的认证网关没能启动(不是端口冲突)。检查本地日志。 |
|
|
99
|
-
| 下载跳转异常 | `cloudflared_download_redirect_missing` / `_invalid` / `_rejected` |
|
|
99
|
+
| 下载跳转异常 | `cloudflared_download_redirect_missing` / `_invalid` / `_rejected` | 官方下载页没有跳到固定发布资源,或目标未通过校验。稍后重试或更新插件;全局安装的 cloudflared 不会替代插件的私有固定组件。 |
|
|
100
100
|
|
|
101
101
|
## 排错
|
|
102
102
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Computer-side extension Workers
|
|
2
|
+
|
|
3
|
+
[简体中文](EXTENSION_WORKERS.md) · [Customization](../README.en.md#extend-and-customize)
|
|
4
|
+
|
|
5
|
+
> Added in plugin 0.6.3. This computer-side feature does not require a matching App version or new pairing.
|
|
6
|
+
|
|
7
|
+
Worker mode runs selected local `host.mjs` files in separate threads so synchronous JavaScript does not occupy the gateway's event loop. The default remains `in-process`; existing extensions and ordinary Cordis plugins are not automatically migrated.
|
|
8
|
+
|
|
9
|
+
## Which extensions fit
|
|
10
|
+
|
|
11
|
+
Use trusted local-directory extensions created through `/mobile` or directly, using Node.js and the extension API. Workers retain `api.manifest`, `api.schema`, `api.action`, `api.route` and `api.effect`; `api.context.logger` provides only `debug`, `info`, `warn` and `error`, not the full Cordis Context or Logger API. Extensions needing live Cordis services stay in-process. Incompatible hosts do not silently fall back.
|
|
12
|
+
|
|
13
|
+
Workers are **not a security sandbox**. Code retains local-user access to files, networks and processes. V8 limits do not cover all native/ArrayBuffer memory or prevent every process-wide OOM. Termination does not guarantee cleanup callbacks or undo completed file/remote operations. [Node's limitations](https://nodejs.org/download/release/v22.19.0/docs/api/worker_threads.html#new-workerfilename-options).
|
|
14
|
+
|
|
15
|
+
## Enable selectively
|
|
16
|
+
|
|
17
|
+
Add these fields to the current DSH profile's `mobile-access` configuration, then normally restart or reload the plugin; do not modify `extension.json`:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
hostExecution:
|
|
21
|
+
mode: worker
|
|
22
|
+
extensions:
|
|
23
|
+
- media-remote
|
|
24
|
+
maxWorkers: 8
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`extensions` selects only these local IDs; other extensions remain in-process. Omitting the list selects all local hosts, while an empty list selects none. Configure the actual profile that loads the plugin rather than mixing Desktop and Web profiles. Restore `mode: in-process` and reload normally to disable Worker execution.
|
|
28
|
+
|
|
29
|
+
## When an extension stops
|
|
30
|
+
|
|
31
|
+
Open **Mobile Access** on the computer. An unavailable Worker appears under “Extensions need a restart”; choose its restart action and confirm. The card is shared across LAN, remote and diagnostics views. Ready Workers do not show the action. Recovery is explicit: no automatic restart or meaningless file edits.
|
|
32
|
+
|
|
33
|
+
The invocation that triggered a deadline keeps its timeout result; other pending calls in that Worker receive `extension_host_unavailable`. Other runtime instances are not terminated together. A stream whose headers were already sent loses its connection; it cannot append a new JSON error after a partial body. Interrupted actions are never replayed. Check whether completed side effects require attention before restarting.
|
|
34
|
+
|
|
35
|
+
New calls can still receive `extension_busy` while abandoned work remains unfinished. Accounting clears only on actual completion or confirmed thread exit. Starting, retained-generation and terminating Workers all occupy the thread budget; exhaustion does not silently switch execution to in-process.
|
|
36
|
+
|
|
37
|
+
## Adjustable budgets
|
|
38
|
+
|
|
39
|
+
| Budget | `hostExecution` fields |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Threads and registrations | `maxWorkers`, `maxRegistrations` |
|
|
42
|
+
| V8 heap and stack | `maxOldGenerationSizeMb`, `maxYoungGenerationSizeMb`, `stackSizeMb` |
|
|
43
|
+
| Activation, actions, cancellation and cleanup | `activationTimeoutMs`, `operationTimeoutMs`, `cancelGraceMs`, `streamCancelGraceMs`, `disposeGraceMs` |
|
|
44
|
+
| Action JSON and streams | `resultMaxBytes`, `streamWindowBytes`, `streamChunkBytes`, `streamAggregateBytes` |
|
|
45
|
+
| Logging | `logWindowMs`, `logMessagesPerWindow`, `logMessageBytes` |
|
|
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. `src/extension-worker-config.ts` owns their definitions and validation. 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
|
+
|
|
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.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 电脑端扩展 Worker 模式
|
|
2
|
+
|
|
3
|
+
[English](EXTENSION_WORKERS.en.md) · [返回定制功能](../README.md#扩展与自定义)
|
|
4
|
+
|
|
5
|
+
> 插件 0.6.3 新增功能,由电脑端插件实现,不要求 App 同步版本或重新配对。
|
|
6
|
+
|
|
7
|
+
Worker 模式把选中的本地 `host.mjs` 放到独立工作线程,使同步 JavaScript 循环不再占住网关主线程。默认仍使用 `in-process`;已有扩展和普通 Cordis 插件不会被自动迁移。
|
|
8
|
+
|
|
9
|
+
## 适合哪些扩展
|
|
10
|
+
|
|
11
|
+
适合通过 `/mobile` 或本地目录创建、使用 Node.js 与扩展 API 的可信代码。Worker 内仍可使用 `api.manifest`、`api.schema`、`api.action`、`api.route`、`api.effect`;`api.context.logger` 只提供 `debug`、`info`、`warn`、`error`,不是完整的 Cordis Context 或 Logger。需要直接使用 Cordis 服务的扩展保留进程内模式,不会静默回退。
|
|
12
|
+
|
|
13
|
+
Worker **不是安全沙箱**:代码仍有本机用户权限,可以访问文件、网络和进程。V8 内存限制不覆盖全部原生/ArrayBuffer 内存,也不能保证全进程不会 OOM。停止线程不保证执行清理回调,不撤销已经发生的文件或远程操作。[Node 的限制说明](https://nodejs.org/download/release/v22.19.0/docs/api/worker_threads.html#new-workerfilename-options)。
|
|
14
|
+
|
|
15
|
+
## 按需启用
|
|
16
|
+
|
|
17
|
+
在当前 DSH profile 的 `mobile-access` 配置中添加以下字段,再正常重启或重新加载插件;不要修改 `extension.json`:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
hostExecution:
|
|
21
|
+
mode: worker
|
|
22
|
+
extensions:
|
|
23
|
+
- media-remote
|
|
24
|
+
maxWorkers: 8
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`extensions` 只选择这些本地扩展 ID,其他扩展继续进程内执行;省略列表选择所有本地 Host,空列表不选择任何 Host。配置放在实际承载插件的 profile,Desktop 与 Web 的 profile 不应混用。恢复 `mode: in-process` 后正常重新加载插件即可关闭 Worker 模式。
|
|
28
|
+
|
|
29
|
+
## 扩展停止后
|
|
30
|
+
|
|
31
|
+
电脑端打开 **移动访问**。停止的 Worker 会显示“扩展需要重启”;点击目标扩展的“重启扩展”并确认。此卡片在局域网、远程和诊断视图共用。只有不可用的 Worker 显示该入口,不自动重启,也不要求改文件来触发恢复。
|
|
32
|
+
|
|
33
|
+
触发截止的调用保留超时结果;同一 Worker 中其他未完成调用会收到 `extension_host_unavailable`。其他运行实例不会被一起终止。已发出响应头的流会结束连接,不能在半截内容后补一份 JSON 错误。未完成动作不自动重放;恢复前请确认已经产生的副作用是否需要处理。
|
|
34
|
+
|
|
35
|
+
同一扩展存在尚未结束的废弃工作时,新请求仍可能收到 `extension_busy`;线程退出确认或对应工作真正结束后才释放记账。正在退出、保留旧版本及启动中的 Worker 都占线程预算;预算耗尽时不会偷偷使用进程内模式绕过。
|
|
36
|
+
|
|
37
|
+
## 可调整的预算
|
|
38
|
+
|
|
39
|
+
| 预算 | `hostExecution` 字段 |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| 线程与注册数量 | `maxWorkers`、`maxRegistrations` |
|
|
42
|
+
| V8 堆与栈 | `maxOldGenerationSizeMb`、`maxYoungGenerationSizeMb`、`stackSizeMb` |
|
|
43
|
+
| 激活、动作、取消与清理 | `activationTimeoutMs`、`operationTimeoutMs`、`cancelGraceMs`、`streamCancelGraceMs`、`disposeGraceMs` |
|
|
44
|
+
| 动作 JSON 与流 | `resultMaxBytes`、`streamWindowBytes`、`streamChunkBytes`、`streamAggregateBytes` |
|
|
45
|
+
| 日志 | `logWindowMs`、`logMessagesPerWindow`、`logMessageBytes` |
|
|
46
|
+
|
|
47
|
+
参数必须是范围内的整数;流块不能大于单流窗口,单流窗口不能大于聚合预算。初次启用建议保留默认值。配置定义与校验由 `src/extension-worker-config.ts` 管理。Node 的全局堆参数可能覆盖 Worker 资源配置,因此检测到会覆盖限制的父进程启动参数时,Worker 会在导入扩展前拒绝启动并报告 `extension_worker_heap_override`。请检查 DSH 的启动参数;需要保留这些参数时可继续使用进程内模式,不会静默绕过。
|
|
48
|
+
|
|
49
|
+
流量按消费确认回填,未读完的 EOF 数据继续占预算;日志和结果在 Worker 内先转换为受限数据,再交给网关。该机制约束传输与 JavaScript 阻塞风险,不是整个操作系统或进程的资源沙箱。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Mobile composer layout
|
|
2
|
+
|
|
3
|
+
[简体中文](MOBILE_COMPOSER_TOOLBAR.md) · [Third-party compatibility](../README.en.md#third-party-plugin-compatibility)
|
|
4
|
+
|
|
5
|
+
> Layout changes in plugin 0.6.3. Android and mobile browsers use the same plugin-served page; this change does not require reinstalling the App.
|
|
6
|
+
|
|
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
|
+
|
|
9
|
+
## Difference from the original PR
|
|
10
|
+
|
|
11
|
+
The original proposal combined plugins into one upper horizontal scrollport with native actions fixed below. Current DSH exposes no parent `conversation.input.toolbar` entry; left and right plugins belong to different React parents, and the core width observer measures those two native groups. This version does not provide a shared upper scrollport, move DOM, copy core callbacks or flatten the tree with `display:contents`.
|
|
12
|
+
|
|
13
|
+
It implements compact/overflow fixes through available public seams, retaining the original author commit with maintainer corrections. A future upstream parent-toolbar capability can be evaluated separately rather than registering a presenter that never renders.
|
|
14
|
+
|
|
15
|
+
## Verification scope
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
The activity fixture verifies slot/mount continuity, not a physical microphone or recognition provider. Arbitrary community combinations can still have their own layout issues; [Mobile page modules](CLIENT_MODULES.en.md) can exclude unneeded optional modules.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 移动输入栏布局
|
|
2
|
+
|
|
3
|
+
[English](MOBILE_COMPOSER_TOOLBAR.en.md) · [第三方插件适配](../README.md#第三方插件适配)
|
|
4
|
+
|
|
5
|
+
> 0.6.3 的布局调整。Android App 与手机浏览器共用插件提供的页面,不需要为此重装 App。
|
|
6
|
+
|
|
7
|
+
窄屏输入栏保留 DSH 原生结构和事件处理。模型名称在空间不足时截断,附加控件正常换行,发送/停止保持触摸尺寸,整组放不下时按实际宽度换行。插件开关不会被拉成操作按钮;内联弹窗、菜单和列表不会套用工具栏的紧凑尺寸。
|
|
8
|
+
|
|
9
|
+
## 与 PR 原稿的区别
|
|
10
|
+
|
|
11
|
+
原稿提出把所有插件合入一个上层横向滚动条,并把原生操作固定在下层。当前 DSH 没有公开父级 `conversation.input.toolbar` 入口,左右插件属于不同 React 父节点;核心宽度观察器还要测量这两个父组。因此本版不提供共同滚动上栏,也不搬动 DOM、复制原生回调或用 `display:contents` 绕过核心布局。
|
|
12
|
+
|
|
13
|
+
本版采用现有公共插槽能实现的紧凑与溢出修正,保留原稿作者提交并追加维护者调整。若上游以后提供父级工具栏能力,可再评估统一滚动方案,不预先登记一个不会渲染的控件。
|
|
14
|
+
|
|
15
|
+
## 验证范围
|
|
16
|
+
|
|
17
|
+
真实 DSH 输入栏与通过公共 left/right/activity 插槽注册的测试扩展共同运行,检查小屏、横屏、较大字号、明暗主题、模型紧凑状态、弹窗、开关以及发送/停止可达性。编辑器、草稿和活跃 activity 的节点保持,不因此重载页面。
|
|
18
|
+
|
|
19
|
+
activity 夹具只验证插槽和挂载连续性,不代表真实麦克风或语音识别。任意社区插件组合仍可能有自己的布局问题;可使用[移动页面模块](CLIENT_MODULES.md)关闭不需要的可选模块。
|
package/docs/README.md
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
## 开发与安全 / Development and security
|
|
29
29
|
|
|
30
|
+
0.6.3 的 [扩展 Worker 指南](EXTENSION_WORKERS.md)/[Worker guide](EXTENSION_WORKERS.en.md) 介绍按扩展启用、预算与显式恢复;此功能不迁移普通 Cordis 插件,也不是权限沙箱。
|
|
31
|
+
|
|
30
32
|
- [贡献指南](../CONTRIBUTING.md):本地检查、浏览器与 Android 验证、发布要求。
|
|
31
33
|
- [安全说明](../SECURITY.md):配对授权、TLS、组件清理与私密漏洞反馈。
|
|
32
34
|
- [贡献记录](../CONTRIBUTORS.md)与[更新记录](../CHANGELOG.md):分别查看社区参与和版本变化。
|
|
@@ -61,7 +61,7 @@ curl -v https://PUBLIC_HOST/mobile-access/discovery
|
|
|
61
61
|
|
|
62
62
|
Only public IPv4 mode installs `dsh-mobile-cert-renew.timer`; in that mode, also run `sudo systemctl status dsh-mobile-cert-renew.timer`. Replace `PUBLIC_HOST` with your actual domain or public IPv4 address. Do not add `-k`: verify the public certificate as well as the response. Check the same address from an independent external network and confirm discovery reports this computer's installation identifier; success on the VPS alone does not prove the phone's network can reach it.
|
|
63
63
|
|
|
64
|
-
On the computer, start with the plugin log at `$DSH_HOME/mobile-access/logs/dsh-mobile.log` (JSONL
|
|
64
|
+
On the computer, start with the plugin log at `$DSH_HOME/mobile-access/logs/dsh-mobile.log` (JSONL; existing files of at least 5 MB rotate at startup) and the panel diagnostic report. Custom extensions must not log tokens or keys; inspect and remove sensitive content before sharing logs because this is not a generic secret redactor. Windows antivirus software can quarantine frpc; if it does, create the smallest possible exception for the verified component directory only.
|
|
65
65
|
|
|
66
66
|
When several computers share one frps, proxy names are unique across the server and entry ports cannot overlap. The plugin uses `dsh-mobile-<first 12 characters of the installation identity>` as its name. A name conflict requires checking another computer or an unexpired old connection; a port conflict requires a different entry port. A running frpc process does not mean the public entry was published: verify the public route.
|
|
67
67
|
|
package/docs/SELF_HOSTED_FRP.md
CHANGED
|
@@ -65,7 +65,7 @@ curl -v https://PUBLIC_HOST/mobile-access/discovery
|
|
|
65
65
|
|
|
66
66
|
只有公网 IPv4 模式会安装 `dsh-mobile-cert-renew.timer`,该模式另查 `sudo systemctl status dsh-mobile-cert-renew.timer`。将 `PUBLIC_HOST` 换成实际域名或公网 IPv4;不加 `-k`,以便同时验证公开证书。还应从独立外部网络检查同一地址,并确认 discovery 返回当前电脑的安装标识;只在 VPS 本机成功不代表手机网络可达。
|
|
67
67
|
|
|
68
|
-
本机优先看插件日志(`$DSH_HOME/mobile-access/logs/dsh-mobile.log`,JSONL
|
|
68
|
+
本机优先看插件日志(`$DSH_HOME/mobile-access/logs/dsh-mobile.log`,JSONL,启动时检查并轮转达到 5 MB 的已有日志)与面板诊断报告。自定义扩展不要输出令牌或密钥;分享日志前检查并移除敏感内容,文件日志不是通用秘密脱敏器。Windows 杀毒软件可能隔离 frpc;如确有拦截,只为已校验的组件目录设置最小范围例外。
|
|
69
69
|
|
|
70
70
|
一台 frps 被多台电脑共用时,代理名在整台服务器内唯一,公网入口端口也不能重复。插件使用 `dsh-mobile-<安装标识前 12 位>` 作为代理名。报代理名已使用时,检查另一台电脑或尚未过期的旧连接;报入口端口已占用时,为本机选择另一个入口端口。frpc 仍在运行并不表示入口已发布,应以公网验证结果为准。
|
|
71
71
|
|
|
@@ -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` 表示连接异常结束,本身不能确定是哪一层断开。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](TRUSTED_NETWORKS.md) · [Back to the LAN guide](../README.en.md#local-network)
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> Plugin 0.6.0 and later provide this computer-side control. The App does not need a matching version or an update solely for this setting.
|
|
6
6
|
|
|
7
7
|
Default LAN setup permits the LAN source subnet of the selected interface. Explicitly append source CIDRs when an existing routed network you control, such as WireGuard, needs access. This does not create a VPN, route, IPv6 listener, or public entry.
|
|
8
8
|
|
package/docs/TRUSTED_NETWORKS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](TRUSTED_NETWORKS.en.md) · [返回局域网指南](../README.md#局域网访问)
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> 插件 0.6.0 起提供此电脑端高级设置,不要求 App 使用相同版本或为此同步升级。
|
|
6
6
|
|
|
7
7
|
默认局域网设置只允许当前所选网卡的 LAN 来源网段。已有受控的路由网络(例如 WireGuard 网段)需要连接时,可明确追加来源 CIDR;这不会自动建立 VPN、路由、IPv6 监听或公网入口。
|
|
8
8
|
|