@yezack/dsh-remote-mobile 1.9.0 → 1.9.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 CHANGED
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.2] - 2026-10-13
9
+
10
+ ### Fixed (修复按新包名发布后插件整包无法加载:包身份不一致)
11
+
12
+ - **背景**:本仓库以 `@yezack/dsh-remote-mobile` 发布(上游 `dsh-remote-mobile` 的 npm 所有权不在本人名下)。DSH 以**包名**作为插件身份,改名后残留的两处旧包名会让整包不可用:
13
+ - **宿主侧**:`cordis.patch.yml` 条目 `name` 仍指向 `dsh-remote-mobile`,loader 解析不到该模块,该 bundle 被跳过(插件完全不激活);
14
+ - **客户端侧**:`lib/client.js` 的 `window.__ModuleLoader__.load({ id })` 仍注册为 `dsh-remote-mobile`,与 `window.__DSH_BOOT__.entries[].id`(等于包名 `@yezack/dsh-remote-mobile`)不匹配,该 row 永远等不到自己的 factory(设置面板等前端功能不加载)。
15
+ - **修复**:`cordis.patch.yml` 条目名与客户端注册 id 改为跟随 `package.json` 的 `name`;`scripts/build-client.js` 的注册 id 与产物自动同步路径不再硬编码包名(统一由 `pkg.name` 推导),从根上避免改名时再次漏改。
16
+ - **测试**:`test/client-bundle.test.js` 新增包身份一致性断言 —— 客户端注册 id、`cordis.patch.yml` 条目 `name` 必须等于 `package.json` 的 `name`,bundle 内联版本号必须跟随包版本。
17
+
18
+ ---
19
+
20
+ ## [1.9.1] - 2026-10-13
21
+
22
+ ### Fixed (修复授权页无法登录:模板字符串转义与未插值的服务端标识符)
23
+
24
+ - **授权页三处正则转义被模板字符串吞掉(致命)**:内联脚本里的 `/\/auth\/?$/` 写在 TS 模板字符串内,`\/` 在字符串求值时退化为 `/`,服务端实际发出的 HTML 变成 `replace(//auth/?$/, '/')` —— `//` 被解析为行注释、语句被截断,整个 `<script>` 抛 SyntaxError,`form` 的 submit 回调从未绑定,表现为**任何浏览器下点「立即授权连接」都毫无反应、无法登录**。三处均改为双反斜杠形式。
25
+ - **失败提示引用未定义的服务端变量**:`data.reason` 缺失时的回退文案写成了裸 `isEn`(服务端变量未做插值),浏览器求值即抛 `ReferenceError`,被外层 catch 吞掉后把真实失败原因显示为「网络连接异常」。改为 `${JSON.stringify(...)}` 插值。
26
+ - **测试**:`test/login-page.test.js` 新增断言 —— 内联脚本必须可被解析、不得出现被吞掉反斜杠的 `replace(//auth`、不得残留裸服务端标识符(`isEn` / `i18n` / `lang` 等);并用 `node:vm` 假浏览器覆盖「失败响应缺 `reason`」时的提示文案与网关子路径下的 URL 推导。
27
+
28
+ ---
29
+
8
30
  ## [1.9.0] - 2026-10-09
9
31
 
10
32
  ### Fixed (适配 DSH 0.1.7+ 配置存储变更,修复插件配置无法持久化)
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  <div align="center">
2
2
 
3
+ > **本包是 [IceApriler/dsh-remote-mobile](https://github.com/IceApriler/dsh-remote-mobile) 的 fork**,以 **`@yezack/dsh-remote-mobile`** 名义发布,额外包含「授权页无法登录(模板字符串转义)」与「按新包名加载」等修复。
4
+ > 安装命令请使用:`dsh plugin --profile web add @yezack/dsh-remote-mobile`
5
+ > 下文出现的 `dsh-remote-mobile` 均指本包;插件内部名称与数据目录 `~/.dsh/remote-mobile/` 保持不变,升级不会丢失已有配对与配置。
6
+
3
7
  # dsh-remote-mobile
4
8
 
5
9
  **DeepSeek Harness (DSH) 远程与移动端安全网关插件**
package/README_EN.md CHANGED
@@ -1,5 +1,9 @@
1
1
  <div align="center">
2
2
 
3
+ > **This package is a fork of [IceApriler/dsh-remote-mobile](https://github.com/IceApriler/dsh-remote-mobile)**, published as **`@yezack/dsh-remote-mobile`**, with extra fixes (auth page login failure caused by template-literal escaping; loading under the new package name).
4
+ > Install with: `dsh plugin --profile web add @yezack/dsh-remote-mobile`
5
+ > Every `dsh-remote-mobile` below refers to this fork; the plugin's internal name and its data directory `~/.dsh/remote-mobile/` are unchanged, so existing pairings and settings survive the upgrade.
6
+
3
7
  # dsh-remote-mobile
4
8
 
5
9
  **DeepSeek Harness (DSH) Remote & Mobile Security Guard Plugin**
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  - insert:
2
2
  - id: remote-mobile
3
- name: 'dsh-remote-mobile'
3
+ name: '@yezack/dsh-remote-mobile'
4
4
 
package/lib/client.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * 源码请移步 src/client/ 目录进行模块化开发与维护。
5
5
  */
6
6
  window.__ModuleLoader__.load({
7
- id: "dsh-remote-mobile",
7
+ id: "@yezack/dsh-remote-mobile",
8
8
  factory: function(require) {
9
9
  var module = { exports: {} };
10
10
  var exports = module.exports;
@@ -3538,8 +3538,8 @@ function StylesCard({ lang, showToast }) {
3538
3538
  }
3539
3539
 
3540
3540
  // src/client/version.js
3541
- var PLUGIN_VERSION = "v1.9.0";
3542
- var BUILD_TIME = "2026-10-09 20:14:06";
3541
+ var PLUGIN_VERSION = "v1.9.2";
3542
+ var BUILD_TIME = "2026-10-13 13:09:49";
3543
3543
 
3544
3544
  // src/client/components/MainSection.jsx
3545
3545
  var import_jsx_runtime9 = require("react/jsx-runtime");
@@ -338,9 +338,9 @@ export function getLoginPageHtml(publicKeyPem, lang = 'zh') {
338
338
  if (document.baseURI && document.querySelector('base')) {
339
339
  return new URL('api/remote-mobile/verify', document.baseURI).toString();
340
340
  }
341
- // ⚠️ 这一整段内联脚本位于模板字符串中:正则里的反斜杠必须写成 \\,
342
- // 否则 \/ 会在字符串求值时退化成 /,拼出 //auth/?$/ 触发行注释,
343
- // 使整个 <script> 抛 SyntaxError、登录按钮彻底失效(下两处同理)。
341
+ // ⚠️ 本段内联脚本位于模板字符串内:反斜杠在字符串求值时会被吃掉,
342
+ // 所以 /auth 后缀正则必须写成双反斜杠形式,否则会拼出以两条斜杠开头
343
+ // 的行注释,使整个 script 抛 SyntaxError、登录按钮彻底失效(下两处同理)。
344
344
  const pathname = window.location.pathname.replace(/\\/auth\\/?$/, '/');
345
345
  return new URL('api/remote-mobile/verify', window.location.origin + pathname).toString();
346
346
  } catch (e) {
@@ -399,7 +399,7 @@ export function getLoginPageHtml(publicKeyPem, lang = 'zh') {
399
399
  }, 600);
400
400
  } else {
401
401
  statusMsg.className = 'status-msg error';
402
- statusMsg.innerText = data.reason || (isEn ? 'Authorization failed, please try again' : '授权失败,请重试');
402
+ statusMsg.innerText = data.reason || ${JSON.stringify(isEn ? 'Authorization failed, please try again' : '授权失败,请重试')};
403
403
  statusMsg.style.display = 'block';
404
404
  submitBtn.disabled = false;
405
405
  submitBtn.innerText = ${JSON.stringify(i18n.submitBtn)};
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "@yezack/dsh-remote-mobile",
3
- "version": "1.9.0",
4
- "description": "DeepSeek Harness 远程与移动端安全网关插件:零修改 DSH 底层代码安全开放局域网与 Tailscale 连接 | DeepSeek Harness (DSH) Remote & Mobile Security Guard: safely opens Tailscale/LAN with zero core modifications, QR scan auth, RSA encryption & brute-force defense.",
5
- "keywords": [
6
- "dsh",
7
- "dsh-plugin",
8
- "deepseek",
9
- "tailscale",
10
- "remote-access",
11
- "mobile",
12
- "cordis-plugin",
13
- "auth"
14
- ],
15
- "homepage": "https://github.com/IceApriler/dsh-remote-mobile#readme",
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/IceApriler/dsh-remote-mobile.git"
19
- },
20
- "bugs": {
21
- "url": "https://github.com/IceApriler/dsh-remote-mobile/issues"
22
- },
23
- "type": "module",
24
- "main": "lib/index.js",
25
- "types": "lib/index.d.ts",
26
- "engines": {
27
- "node": ">=18.0.0"
28
- },
29
- "scripts": {
30
- "build": "rm -rf lib && tsc && node scripts/build-client.js",
31
- "build:server": "tsc",
32
- "build:client": "node scripts/build-client.js",
33
- "typecheck": "tsc --noEmit",
34
- "pretest": "node scripts/build-client.js",
35
- "test": "node --test test/**/*.test.js",
36
- "prepublishOnly": "npm run build && npm test",
37
- "release": "node scripts/release.js",
38
- "release:patch": "node scripts/release.js patch",
39
- "release:minor": "node scripts/release.js minor",
40
- "release:major": "node scripts/release.js major",
41
- "release:current": "node scripts/release.js current"
42
- },
43
- "publishConfig": {
44
- "access": "public",
45
- "registry": "https://registry.npmjs.org/"
46
- },
47
- "exports": {
48
- ".": "./lib/index.js",
49
- "./client": "./lib/client.js",
50
- "./cordis.patch.yml": "./cordis.patch.yml",
51
- "./package.json": "./package.json"
52
- },
53
- "dsh": {
54
- "bundle": {
55
- "patch": "./cordis.patch.yml"
56
- },
57
- "client": {
58
- "inject": [
59
- "@deepseek-ai/dsh-client-runtime",
60
- "@deepseek-ai/dsh-client-connection",
61
- "@deepseek-ai/dsh-client-ui-settings",
62
- "@deepseek-ai/dsh-client-ui-sidebar"
63
- ],
64
- "platform": "web"
65
- }
66
- },
67
- "files": [
68
- "lib",
69
- "cordis.patch.yml",
70
- "README.md",
71
- "README_EN.md",
72
- "CHANGELOG.md",
73
- "LICENSE"
74
- ],
75
- "license": "MIT",
76
- "devDependencies": {
77
- "@types/node": "^26.2.0",
78
- "esbuild": "^0.28.2",
79
- "typescript": "^7.0.2"
80
- }
81
- }
1
+ {
2
+ "name": "@yezack/dsh-remote-mobile",
3
+ "version": "1.9.2",
4
+ "description": "DeepSeek Harness 远程与移动端安全网关插件:零修改 DSH 底层代码安全开放局域网与 Tailscale 连接 | DeepSeek Harness (DSH) Remote & Mobile Security Guard: safely opens Tailscale/LAN with zero core modifications, QR scan auth, RSA encryption & brute-force defense.",
5
+ "keywords": [
6
+ "dsh",
7
+ "dsh-plugin",
8
+ "deepseek",
9
+ "tailscale",
10
+ "remote-access",
11
+ "mobile",
12
+ "cordis-plugin",
13
+ "auth"
14
+ ],
15
+ "homepage": "https://github.com/IceApriler/dsh-remote-mobile#readme",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/IceApriler/dsh-remote-mobile.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/IceApriler/dsh-remote-mobile/issues"
22
+ },
23
+ "type": "module",
24
+ "main": "lib/index.js",
25
+ "types": "lib/index.d.ts",
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "scripts": {
30
+ "build": "rm -rf lib && tsc && node scripts/build-client.js",
31
+ "build:server": "tsc",
32
+ "build:client": "node scripts/build-client.js",
33
+ "typecheck": "tsc --noEmit",
34
+ "pretest": "node scripts/build-client.js",
35
+ "test": "node --test test/**/*.test.js",
36
+ "prepublishOnly": "npm run build && npm test",
37
+ "release": "node scripts/release.js",
38
+ "release:patch": "node scripts/release.js patch",
39
+ "release:minor": "node scripts/release.js minor",
40
+ "release:major": "node scripts/release.js major",
41
+ "release:current": "node scripts/release.js current"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "registry": "https://registry.npmjs.org/"
46
+ },
47
+ "exports": {
48
+ ".": "./lib/index.js",
49
+ "./client": "./lib/client.js",
50
+ "./cordis.patch.yml": "./cordis.patch.yml",
51
+ "./package.json": "./package.json"
52
+ },
53
+ "dsh": {
54
+ "bundle": {
55
+ "patch": "./cordis.patch.yml"
56
+ },
57
+ "client": {
58
+ "inject": [
59
+ "@deepseek-ai/dsh-client-runtime",
60
+ "@deepseek-ai/dsh-client-connection",
61
+ "@deepseek-ai/dsh-client-ui-settings",
62
+ "@deepseek-ai/dsh-client-ui-sidebar"
63
+ ],
64
+ "platform": "web"
65
+ }
66
+ },
67
+ "files": [
68
+ "lib",
69
+ "cordis.patch.yml",
70
+ "README.md",
71
+ "README_EN.md",
72
+ "CHANGELOG.md",
73
+ "LICENSE"
74
+ ],
75
+ "license": "MIT",
76
+ "devDependencies": {
77
+ "@types/node": "^26.2.0",
78
+ "esbuild": "^0.28.2",
79
+ "typescript": "^7.0.2"
80
+ }
81
+ }