dsh-auth-remote 0.3.2 → 0.3.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 +7 -1
- package/CHANGELOG.zh-CN.md +7 -1
- package/CONTRIBUTING.md +1 -1
- package/CONTRIBUTING.zh-CN.md +1 -1
- package/README.md +49 -52
- package/README.zh-CN.md +49 -52
- package/docs/deployment.md +23 -29
- package/docs/deployment.zh-CN.md +23 -29
- package/docs/development.md +27 -24
- package/docs/development.zh-CN.md +27 -24
- package/docs/legacy-compatibility.md +78 -71
- package/docs/legacy-compatibility.zh-CN.md +78 -71
- package/docs/releasing.md +10 -10
- package/docs/releasing.zh-CN.md +10 -10
- package/docs/support-history.md +49 -47
- package/docs/support-history.zh-CN.md +49 -47
- package/docs/support-policy.md +25 -7
- package/docs/support-policy.zh-CN.md +25 -7
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,15 @@ This file records user-visible changes to the released package. Version numbers
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.3.3 - 2026-10-30
|
|
10
|
+
|
|
11
|
+
- Add DSH `0.2.1-rc.5` to the compatibility declaration and CLI, complete browser and installation-smoke matrices. Retain all existing supported releases and the `0.2.2-alpha.2` development default and recommendation.
|
|
12
|
+
- Cover native `0.2.1-rc.5` ↔ `0.2.1-rc.4` host switching, Search/Fetch settings and navigation, while retaining authentication, account sign-in and hot-reload regression coverage.
|
|
13
|
+
- Rewrite the English and Chinese README around current installation and usage. Remove outdated candidate and retired-version descriptions, repeated capability version lists and the LiveShare compatibility section.
|
|
14
|
+
|
|
9
15
|
## 0.3.2 - 2026-10-28
|
|
10
16
|
|
|
11
|
-
-
|
|
17
|
+
- Add DSH `0.2.2-alpha.2` to the original seven exact targets and pin the development default and manual migration recommendation to it. Retain DSH `>=0.2.1-alpha.3`, forward admission and plugin Node `>=24`.
|
|
12
18
|
- Gate native named/fallback HTTP resources before Fetch conversion while preserving native routing, ETag/HEAD, stream cancellation and in-process peer reads.
|
|
13
19
|
- Isolate LiveShare viewers from the administrator client; restore trusted business Origin only for the two native Owner-login POSTs. Verify basic flows with a local Relay protocol stand-in and keep share/session lifetimes independent; real Relay/OAuth and visitor business operations are outside that verification.
|
|
14
20
|
- Make CLI text fixed English and remove `--lang` and environment-language selection; old language arguments are invalid. Preserve JSON fields, exit codes, confirmation and secret-input contracts.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -6,9 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
## 未发布
|
|
8
8
|
|
|
9
|
+
## 0.3.3 - 2026-10-30
|
|
10
|
+
|
|
11
|
+
- 新增 DSH `0.2.1-rc.5` 兼容声明及 CLI、完整浏览器和安装 smoke 验证目标,保留全部既有支持版本,开发默认与推荐仍为 `0.2.2-alpha.2`。
|
|
12
|
+
- 补齐原生 `0.2.1-rc.5` ↔ `0.2.1-rc.4` 宿主切换、Search/Fetch 设置和导航回归,保留认证、官方账号登录及热重载测试。
|
|
13
|
+
- 重写中英文 README,聚焦当前安装和使用方式,删除过期候选及退役版本叙述、重复的能力版本清单和 LiveShare 基础兼容章节。
|
|
14
|
+
|
|
9
15
|
## 0.3.2 - 2026-10-28
|
|
10
16
|
|
|
11
|
-
-
|
|
17
|
+
- 在原七个精确目标外新增 DSH `0.2.2-alpha.2`,并将开发默认与人工迁移推荐固定到该版本。保留 DSH `>=0.2.1-alpha.3`、前向准入和插件 Node `>=24`。
|
|
12
18
|
- 在 Fetch 转换前保护原生 named/fallback HTTP resource,保留原生路由、ETag/HEAD、流取消和进程内 peer 读取。
|
|
13
19
|
- 隔离 LiveShare viewer 与管理员客户端;仅对两个原生 Owner 登录 POST 恢复可信业务 Origin。以本地 Relay 协议替身验证基础流程,分享与插件会话生命周期独立;不宣称真实 Relay/OAuth 或访客业务已验证。
|
|
14
20
|
- CLI 文案固定英语,移除 `--lang` 和环境语言选择;旧语言参数作为无效参数拒绝。JSON 字段、退出码、确认和保密输入合同保持。
|
package/CONTRIBUTING.md
CHANGED
|
@@ -26,4 +26,4 @@ Create a focused branch from `master`. Include the reason for the change, its us
|
|
|
26
26
|
|
|
27
27
|
The `CI Verify` check runs on pull requests and again after a merge to `master`. A maintainer updates the version and dated changelog entry before creating a release tag. The [release guide](docs/releasing.md) describes that process.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The planned release is `0.3.3`, declaring nine exact DSH targets, including `0.2.1-rc.5`. Published `0.3.2` retains its eight-target record. Support/shared-host changes require one final archive across nine complete CLI/browser/smoke targets, following the release guide. Full/releases also require independent `0.2.1-alpha.2` refusal; ordinary runs no real retired-host negative job. The six-host one-time negative acceptance belongs to the `0.3.1` migration history. Never rebuild or pack in the final consumer loop.
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -26,4 +26,4 @@ pnpm check
|
|
|
26
26
|
|
|
27
27
|
`CI Verify` 会在 Pull Request 和合入 `master` 后运行。维护者在创建发布标签前更新版本号和带日期的更新日志;具体流程见[发布指南](docs/releasing.zh-CN.md)。
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
本次计划发布 `0.3.3`,声明含 `0.2.1-rc.5` 在内的九个精确 DSH 目标;已发布 `0.3.2` 保留其八版记录。支持或共享宿主变更须按发布指南消费同一最终归档,九版完整 CLI/browser/smoke;full/发布还要求独立 `0.2.1-alpha.2` 退役拒绝,ordinary 不运行真实旧宿主负向。六版一次性负向属于 `0.3.1` 迁移历史。不要在最终消费循环重建或打包。
|
package/README.md
CHANGED
|
@@ -2,73 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
Single-user remote sign-in for DeepSeek Harness (DSH), with password, TOTP, one-use backup codes, and revocable sessions. The
|
|
5
|
+
Single-user remote sign-in for DeepSeek Harness (DSH), with password, TOTP, one-use backup codes, and revocable sessions. The plugin runs inside DSH and protects browser pages, APIs, streams, and WebSockets.
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Linux with `/proc
|
|
10
|
-
- DSH
|
|
11
|
-
- DSH's default `~/.dsh` data directory and a `web` profile. The account state belongs to that profile; it is not shared with another profile.
|
|
12
|
-
- For source browser tests, install Playwright Chromium with `pnpm exec playwright install chromium`. The tests use that managed browser and a dedicated, self-signed TLS fixture.
|
|
9
|
+
- Linux with `/proc` and Node.js 24 or newer. The recommended DSH `0.2.2-alpha.2` requires Node.js `>=24.9.0`.
|
|
10
|
+
- A supported DSH release and a `web` profile. One account and its sessions belong to that profile.
|
|
13
11
|
|
|
14
12
|
## DSH compatibility
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Plugin **`0.3.3`** supports these exact DSH releases. **`0.2.2-alpha.2`** is recommended.
|
|
17
15
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `0.2.1-alpha.3`
|
|
21
|
-
| `0.2.1-alpha.4`
|
|
22
|
-
| `0.2.1-alpha.5`
|
|
23
|
-
| `0.2.1-rc.1`
|
|
24
|
-
| `0.2.1-rc.2`
|
|
25
|
-
| `0.2.1-rc.3`
|
|
26
|
-
| `0.2.1-rc.4`
|
|
27
|
-
| `0.2.
|
|
16
|
+
| DSH release | Maintenance |
|
|
17
|
+
| --------------- | ----------------- |
|
|
18
|
+
| `0.2.1-alpha.3` | Legacy; supported |
|
|
19
|
+
| `0.2.1-alpha.4` | Legacy; supported |
|
|
20
|
+
| `0.2.1-alpha.5` | Legacy; supported |
|
|
21
|
+
| `0.2.1-rc.1` | Supported |
|
|
22
|
+
| `0.2.1-rc.2` | Supported |
|
|
23
|
+
| `0.2.1-rc.3` | Supported |
|
|
24
|
+
| `0.2.1-rc.4` | Supported |
|
|
25
|
+
| `0.2.1-rc.5` | Supported |
|
|
26
|
+
| `0.2.2-alpha.2` | Recommended |
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
Legacy versions remain supported until an explicit retirement release; see the [support policy](docs/support-policy.md). Newer versions may load after capability checks, but are outside these exact compatibility declarations.
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Later versions are forward-admitted subject to WebServer/Connection APIs, host package identity and native authentication exchange; admission is not an exact support or test claim. Every plan keeps eight-version CLI/smoke. Full, manual, scheduled and release plans run eight complete browser targets plus independent refusal verification on retired boundary `0.2.1-alpha.2`. Ordinary low-risk plans use the [fixed browser selection](docs/development.md#ordinary-and-full-ci-plans) and run no real retired-host negative job.
|
|
34
|
-
|
|
35
|
-
## Install the candidate archive
|
|
36
|
-
|
|
37
|
-
`0.3.2` is unpublished. Build and verify its local archive using the [development guide](docs/development.md), then install that archive. Published `0.3.1` retains its historical seven-host support and does not provide this new-host adaptation.
|
|
30
|
+
## Install
|
|
38
31
|
|
|
39
32
|
```sh
|
|
40
33
|
dsh --version
|
|
41
|
-
dsh plugin --profile web add
|
|
34
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.3
|
|
42
35
|
dsh plugin --profile web list
|
|
43
36
|
```
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
Use the same data directory and profile for installation, initialization, and the running service. These commands use DSH's default `~/.dsh` directory and the `web` profile.
|
|
46
39
|
|
|
47
|
-
##
|
|
40
|
+
## Initialize the account
|
|
48
41
|
|
|
49
|
-
|
|
42
|
+
Run this in a real terminal:
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
```sh
|
|
45
|
+
dsh plugin --profile web exec dsh-auth-remote init
|
|
46
|
+
```
|
|
52
47
|
|
|
53
|
-
|
|
48
|
+
Enter one username and a password of 12–256 Unicode characters. The password is not echoed or passed as a command-line argument. Account creation is available only through the CLI.
|
|
54
49
|
|
|
55
|
-
|
|
50
|
+
TOTP is optional by default (`requireTotp: false`); the first password sign-in offers setup or skipping it. Set `requireTotp: true` to require setup. Save the ten backup codes when shown: each works once, and the list cannot be retrieved later.
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
## Configure the web profile
|
|
53
|
+
|
|
54
|
+
The minimal local setup needs no profile patch:
|
|
58
55
|
|
|
59
56
|
```sh
|
|
60
|
-
dsh
|
|
57
|
+
dsh web --no-open --port 13090
|
|
61
58
|
```
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
Open the printed `http://127.0.0.1:13090/` address. Unauthenticated navigation redirects to sign-in. Without an explicit `publicUrl`, the plugin derives the root URL from the actual listener address, protocol, and bound port. `/auth-remote/ready` reports service readiness.
|
|
61
|
+
|
|
62
|
+
For public access, follow the [deployment guide](docs/deployment.md) and [profile example](examples/web-profile-auth-remote.patch.yml). Set top-level `publicUrl: https://dsh.example.com/`, `host`, and `port`. Keep the native `webserver` independently disabled in the profile patch, as shown in the example.
|
|
63
|
+
|
|
64
|
+
The listener supports concrete IPv4/IPv6 addresses, HTTP, and HTTPS with paired `tlsCert`/`tlsKey` settings. `publicUrl` must be an HTTP(S) root without credentials, child paths, query, or fragment. It admits one public origin plus literal loopback addresses; setting it does not configure routing or TLS. CLI listener and public-URL options override profile values. If a downstream route needs the original public Host, configure `preserveOriginPaths` as described in the deployment guide.
|
|
64
65
|
|
|
65
66
|
## Sign in and manage the account
|
|
66
67
|
|
|
67
|
-
Open the
|
|
68
|
+
Open the local root or your configured public URL. Inside DSH, open the sidebar account menu, then **Settings → Security & sign-in**. The page shows the plugin username, TOTP status, session expiry, and active session count. It can change the password, set up or rebind TOTP, disable TOTP when policy permits, and revoke sessions.
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
Password and second-factor changes revoke existing sessions. Sessions have a fixed default lifetime of 168 hours (`sessionHours`) and survive service restarts. Signing out the current session preserves other sessions; signing out all sessions verifies the password and any bound second factor. TOTP setup displays backup codes once, so save and acknowledge them before signing in again.
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
Management commands are also available:
|
|
72
73
|
|
|
73
74
|
```sh
|
|
74
75
|
dsh plugin --profile web exec dsh-auth-remote status --json
|
|
@@ -77,32 +78,28 @@ dsh plugin --profile web exec dsh-auth-remote reset-totp
|
|
|
77
78
|
dsh plugin --profile web exec dsh-auth-remote revoke-sessions
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
Mutating commands require
|
|
81
|
-
|
|
82
|
-
The embedded Security page follows DSH's language setting. Browser text supports English, Chinese, Japanese, Spanish, French, German, Russian and Brazilian Portuguese. The standalone login page uses `localStorage["dsh-auth-remote-lang"]`, then `navigator.language`, then English; it has no language selector. Supported language tags match case-insensitively, including regions; invalid or unsupported values fall through to the next choice. The plugin leaves DSH's own language picker unchanged. After entering DSH, only the native locale form's accepted preference updates this memory; clearing the preference removes it. Loading or failed reads/saves leave it intact, and signing out keeps it. The old `dsh-auth-remote.locale` key is ignored and left untouched. CLI text is always English; locale environment variables do not change it, and `--lang` is no longer accepted.
|
|
81
|
+
Mutating commands require interactive confirmation. If a submitted command loses its response, check `status` before retrying.
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
Browser text supports English, Chinese, Japanese, Spanish, French, German, Russian, and Brazilian Portuguese. The embedded page follows DSH's language setting. The standalone login page uses the remembered DSH preference, then the browser language, then English; it has no language selector. CLI output is English.
|
|
85
84
|
|
|
86
85
|
## Sign in to an official DeepSeek account
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
In **Settings → Security & sign-in → Sign-in preferences**, the remote DeepSeek sign-in switch defaults to on. Native Settings saves it to the current profile override; new authorizations on this page use the accepted value immediately and restarts preserve it. Failed saves show an error. Turning it off restores native entries for new attempts, preserves admitted manual attempts and existing official-account credentials, and does not establish native public-callback support. Other open pages need no active synchronization; a stale page starting authorization receives disabled feedback and advice to refresh.
|
|
91
|
-
|
|
92
|
-
This manual handoff needs no local listener, SSH tunnel or browser extension. The loopback address is an authorization return address; its page does not need to load. The plugin parses the pasted URL and delivers the callback inside DSH, retaining native state validation, PKCE exchange and credential storage. It never fetches the pasted address. Pending authorization belongs to the initiating remote session, lasts at most ten minutes and is cancelled when dismissed or the session is revoked. Expired or failed authorization must be restarted.
|
|
87
|
+
Remote DeepSeek account sign-in is enabled by default (`manualAccountLogin: true`):
|
|
93
88
|
|
|
94
|
-
|
|
89
|
+
1. Choose **Sign in** in the account menu, then **Open sign-in page** in the instruction dialog.
|
|
90
|
+
2. Complete official sign-in in the new tab. The resulting loopback address may show a connection error or 404; its page does not need to load.
|
|
91
|
+
3. Copy the entire callback URL, including `code` and `state`, into **Full callback address** in the original DSH tab, then choose **Confirm sign-in**.
|
|
95
92
|
|
|
96
|
-
|
|
93
|
+
Keep the original DSH tab open. If a popup is blocked, use the dialog's authorization link. No local listener, SSH tunnel, or browser extension is needed. The plugin delivers the callback inside DSH and never requests the pasted URL. Authorization expires after ten minutes and is cancelled when its dialog is dismissed or the initiating session is revoked; expired or failed attempts must be restarted.
|
|
97
94
|
|
|
98
|
-
|
|
95
|
+
Before authorization, **Use API key** opens DSH's native credential editor; the same option is available from the account menu. During authorization, the secondary button cancels the attempt.
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
The switch in **Settings → Security & sign-in → Sign-in preferences** controls new manual authorizations and persists in the profile. Turning it off restores native sign-in entries while preserving active attempts and existing official-account credentials. Native sign-in still requires a callback route reachable by your browser.
|
|
101
98
|
|
|
102
99
|
## Put a proxy in front
|
|
103
100
|
|
|
104
101
|
Use the [reverse proxy guide](docs/reverse-proxy.md) with the [Nginx](examples/nginx.conf) or [Traefik](examples/traefik-dsh.yml) example. Preserve the browser's Host and Origin, WebSocket upgrades, and streaming responses. TLS can terminate at the proxy; set its exact HTTPS root as `publicUrl`. Keep the DSH listener private and do not cache authentication responses.
|
|
105
102
|
|
|
106
|
-
##
|
|
103
|
+
## Documentation
|
|
107
104
|
|
|
108
|
-
|
|
105
|
+
See [deployment](docs/deployment.md) for configuration, profile backups, and operational details, or [development](docs/development.md) to build and test from source. Changes are in the [changelog](CHANGELOG.md). Contributions follow the [contribution guide](CONTRIBUTING.md) and [release guide](docs/releasing.md). Licensed under [MIT](LICENSE).
|
package/README.zh-CN.md
CHANGED
|
@@ -6,69 +6,70 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
6
6
|
|
|
7
7
|
## 前置条件
|
|
8
8
|
|
|
9
|
-
- Linux(含 `/proc
|
|
10
|
-
- DSH `
|
|
11
|
-
- DSH 默认的 `~/.dsh` 数据目录和 `web` profile。账号状态属于该 profile,不与其他 profile 共用。
|
|
12
|
-
- 源码浏览器测试先执行 `pnpm exec playwright install chromium`。测试使用 Playwright 管理的浏览器和专用自签 TLS 夹具。
|
|
9
|
+
- Linux(含 `/proc`)和 Node.js 24 或更高版本。推荐的 DSH `0.2.2-alpha.2` 要求 Node.js `>=24.9.0`。
|
|
10
|
+
- 一个受支持的 DSH 版本和 `web` profile。一个账号及其会话属于该 profile。
|
|
13
11
|
|
|
14
12
|
## DSH 兼容性
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
插件 **`0.3.3`** 支持以下精确 DSH 版本,推荐使用 **`0.2.2-alpha.2`**。
|
|
17
15
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `0.2.1-alpha.3`
|
|
21
|
-
| `0.2.1-alpha.4`
|
|
22
|
-
| `0.2.1-alpha.5`
|
|
23
|
-
| `0.2.1-rc.1`
|
|
24
|
-
| `0.2.1-rc.2`
|
|
25
|
-
| `0.2.1-rc.3`
|
|
26
|
-
| `0.2.1-rc.4`
|
|
27
|
-
| `0.2.
|
|
16
|
+
| DSH 版本 | 维护状态 |
|
|
17
|
+
| --------------- | -------------- |
|
|
18
|
+
| `0.2.1-alpha.3` | Legacy;支持中 |
|
|
19
|
+
| `0.2.1-alpha.4` | Legacy;支持中 |
|
|
20
|
+
| `0.2.1-alpha.5` | Legacy;支持中 |
|
|
21
|
+
| `0.2.1-rc.1` | 支持中 |
|
|
22
|
+
| `0.2.1-rc.2` | 支持中 |
|
|
23
|
+
| `0.2.1-rc.3` | 支持中 |
|
|
24
|
+
| `0.2.1-rc.4` | 支持中 |
|
|
25
|
+
| `0.2.1-rc.5` | 支持中 |
|
|
26
|
+
| `0.2.2-alpha.2` | 推荐版本 |
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
Legacy 版本在明确发布退役版本前继续支持,详见[支持规范](docs/support-policy.zh-CN.md)。更新版本可通过能力检查后加载,但不在上述精确兼容声明内。
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
后续版本按范围向前准入,仍须通过 WebServer/Connection API、宿主包身份和原生认证交换检查;准入不构成逐版支持或实测声明。八版始终运行 CLI/smoke,全量、手动、定时及发布计划运行八版完整 browser,并独立验证退役边界 `0.2.1-alpha.2` 的拒绝路径。普通低风险计划使用[固定 browser 选择](docs/development.zh-CN.md#普通与全量-ci-计划),不运行真实旧宿主负向任务。
|
|
34
|
-
|
|
35
|
-
## 安装候选归档
|
|
36
|
-
|
|
37
|
-
`0.3.2` 尚未发布。先按[开发指南](docs/development.zh-CN.md)构建并验证本地归档,再安装该文件。已发布 `0.3.1` 保留历史七版支持,不包含本次新版宿主适配。
|
|
30
|
+
## 安装
|
|
38
31
|
|
|
39
32
|
```sh
|
|
40
33
|
dsh --version
|
|
41
|
-
dsh plugin --profile web add
|
|
34
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.3
|
|
42
35
|
dsh plugin --profile web list
|
|
43
36
|
```
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
安装、初始化和运行服务须使用相同的数据目录及 profile。这些命令使用 DSH 默认的 `~/.dsh` 目录和 `web` profile。
|
|
46
39
|
|
|
47
|
-
##
|
|
40
|
+
## 初始化账号
|
|
48
41
|
|
|
49
|
-
|
|
42
|
+
在真实交互终端中执行:
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
```sh
|
|
45
|
+
dsh plugin --profile web exec dsh-auth-remote init
|
|
46
|
+
```
|
|
52
47
|
|
|
53
|
-
|
|
48
|
+
输入一个用户名和 12–256 个 Unicode 字符的密码。密码不会回显,也不作为命令行参数传递。账号只能通过 CLI 创建。
|
|
54
49
|
|
|
55
|
-
|
|
50
|
+
默认 `requireTotp: false`,首次密码登录可选择绑定或跳过 TOTP;设为 `true` 可强制绑定。显示十个备用码时立即妥善保存:每个只能用一次,之后不能重新查看列表。
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
## 配置 web profile
|
|
53
|
+
|
|
54
|
+
最小化本机配置无需修改 profile 补丁:
|
|
58
55
|
|
|
59
56
|
```sh
|
|
60
|
-
dsh
|
|
57
|
+
dsh web --no-open --port 13090
|
|
61
58
|
```
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
打开终端打印的 `http://127.0.0.1:13090/` 地址。未登录导航会跳转登录页。未显式设置 `publicUrl` 时,插件根据监听的实际地址、协议和绑定端口生成根地址。`/auth-remote/ready` 用于检查服务是否就绪。
|
|
61
|
+
|
|
62
|
+
公网访问请按[部署指南](docs/deployment.zh-CN.md)和 [profile 示例](examples/web-profile-auth-remote.patch.yml)配置顶层 `publicUrl: https://dsh.example.com/`、`host`、`port`,并按示例在 profile 补丁中独立禁用原生 `webserver`。
|
|
63
|
+
|
|
64
|
+
监听支持具体 IPv4/IPv6 地址、HTTP,以及通过成对 `tlsCert`/`tlsKey` 配置的 HTTPS。`publicUrl` 必须是 HTTP(S) 根地址,不能带凭据、子路径、查询或片段;准入范围是唯一公开来源加字面回环地址。配置此值不会配置路由或 TLS。CLI 的监听和公开 URL 参数覆盖 profile 值。下游路由若需要原始公网 Host,按部署指南配置 `preserveOriginPaths`。
|
|
64
65
|
|
|
65
66
|
## 登录与账号管理
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
打开本机根地址或配置的公开 URL。在 DSH 侧栏账号菜单中进入 **设置 → 安全与登录**,即可查看本插件用户名、TOTP 状态、会话到期时间和有效会话数,修改密码、绑定或重新绑定 TOTP、在策略允许时关闭 TOTP,以及撤销会话。
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
密码或第二因素变更会撤销已有会话。会话默认固定有效 168 小时(`sessionHours`),服务重启后仍保留。退出当前会话会保留其他会话;退出所有会话需验证密码及已绑定的第二因素。TOTP 绑定成功后仅展示一次备用码,请保存并确认后重新登录。
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
也可通过命令管理:
|
|
72
73
|
|
|
73
74
|
```sh
|
|
74
75
|
dsh plugin --profile web exec dsh-auth-remote status --json
|
|
@@ -77,32 +78,28 @@ dsh plugin --profile web exec dsh-auth-remote reset-totp
|
|
|
77
78
|
dsh plugin --profile web exec dsh-auth-remote revoke-sessions
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
内嵌安全页跟随 DSH 语言设置。浏览器文案支持英、中、日、西、法、德、俄和巴西葡萄牙语。独立登录页依次使用 `localStorage["dsh-auth-remote-lang"]`、`navigator.language`、英文,不提供语言选择器;支持的合法语言标签忽略大小写并匹配地区变体;非法或不支持的值依次回退。插件不扩充 DSH 自身的语言选择目录。进入 DSH 后仅按原生 locale 表单已接纳的偏好更新缓存,明确清除偏好时删除缓存;加载中、读取或保存失败时保留,退出也保留。旧 `dsh-auth-remote.locale` 字段不读取、不清理。CLI 文案固定英语;语言环境变量不会改变输出,`--lang` 不再接受。
|
|
81
|
+
修改命令需要交互确认。命令提交后若响应丢失,先检查 `status`,再决定是否重试。
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
浏览器文案支持英、中、日、西、法、德、俄和巴西葡萄牙语。内嵌页面跟随 DSH 语言设置;独立登录页依次使用已记住的 DSH 偏好、浏览器语言、英文,不提供语言选择器。CLI 文案固定英语。
|
|
85
84
|
|
|
86
85
|
## 登录 DeepSeek 官方账号
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
在 **设置 → 安全与登录 → 登录配置** 中切换“远程 DeepSeek 账号登录”,默认开启。保存通过原生 Settings 写入当前 profile override,当前页新授权立即采用最新值,重启后保留;保存失败会显示错误。关闭只恢复新授权的原生入口,不取消已接纳的手动授权、不退出已有官方账号,也不承诺原生公网回调可用。其他已打开页面无需主动同步;旧页新建授权会提示关闭并建议刷新。
|
|
91
|
-
|
|
92
|
-
手动回填无需本地监听器、SSH 隧道或浏览器扩展。回环地址用于承载授权结果,页面无需正常打开。插件只解析粘贴的 URL,在 DSH 内部分发回调,保留原生 state 校验、PKCE 兑换与凭据存储,不会请求粘贴的地址。待完成授权绑定发起操作的远程会话,最长有效期为十分钟;关闭弹窗或撤销该会话会取消待完成授权。过期或失败后须重新开始。
|
|
87
|
+
远程 DeepSeek 账号登录默认开启(`manualAccountLogin: true`):
|
|
93
88
|
|
|
94
|
-
|
|
89
|
+
1. 在账号菜单中选择“登录”,再点击步骤说明弹窗中的“打开登录页”。
|
|
90
|
+
2. 在新标签页完成官方登录。随后回环地址可能显示连接失败或 404,该页面无需正常打开。
|
|
91
|
+
3. 复制包含 `code` 和 `state` 的完整回调 URL,粘贴到原 DSH 标签页的“完整回调地址”,再点击“确认登录”。
|
|
95
92
|
|
|
96
|
-
|
|
93
|
+
整个过程中保留原 DSH 标签页。弹窗被浏览器拦截时,可使用弹窗内的授权链接。无需本地监听器、SSH 隧道或浏览器扩展;插件在 DSH 内部分发回调,不会请求粘贴的地址。授权十分钟后过期,关闭弹窗或撤销发起授权的会话会取消本次授权;过期或失败后须重新开始。
|
|
97
94
|
|
|
98
|
-
|
|
95
|
+
授权开始前,“使用 API Key”会打开 DSH 原生凭据编辑器,账号菜单中也有同一入口;授权进行中时,次要按钮用于取消本次授权。
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
**设置 → 安全与登录 → 登录配置** 中的开关控制新的手动授权,并保存在 profile 中。关闭后恢复原生登录入口,保留进行中的授权和已有官方账号凭据。原生登录仍要求浏览器能够访问回调地址。
|
|
101
98
|
|
|
102
99
|
## 接入反向代理
|
|
103
100
|
|
|
104
|
-
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS
|
|
101
|
+
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS 可在代理终止;将其精确 HTTPS 根地址设为 `publicUrl`。保持 DSH 监听私有,不要缓存认证响应。
|
|
105
102
|
|
|
106
|
-
##
|
|
103
|
+
## 文档
|
|
107
104
|
|
|
108
|
-
|
|
105
|
+
[部署指南](docs/deployment.zh-CN.md)介绍配置、profile 备份和运维细节;从源码构建与测试请阅读[开发指南](docs/development.zh-CN.md)。变更见[更新日志](CHANGELOG.zh-CN.md),参与项目请阅读[贡献指南](CONTRIBUTING.zh-CN.md)和[发布指南](docs/releasing.zh-CN.md)。项目采用 [MIT 协议](LICENSE)。
|
package/docs/deployment.md
CHANGED
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](deployment.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This guide
|
|
6
|
-
|
|
7
|
-
The native capabilities below apply to `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4` and `0.2.2-alpha.2`.
|
|
5
|
+
This guide covers plugin `0.3.3` with recommended DSH `0.2.2-alpha.2` and the default `~/.dsh` data directory. See [README](../README.md#dsh-compatibility) for the nine supported DSH releases, the [support policy](support-policy.md) for maintenance details, and [development](development.md) for source builds.
|
|
8
6
|
|
|
9
7
|
Upstream DSH `0.2.2-alpha.2` itself requires Node `>=24.9.0`; the plugin still declares Node `>=24` and adds no minor-version gate.
|
|
10
8
|
|
|
11
|
-
## Minimal installation
|
|
9
|
+
## Minimal installation
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Use the same default `web` profile for installation and the running service:
|
|
14
12
|
|
|
15
13
|
```sh
|
|
16
14
|
dsh --version
|
|
17
|
-
dsh plugin --profile web add
|
|
15
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.3
|
|
18
16
|
dsh plugin --profile web list
|
|
19
17
|
dsh web --no-open --port 13090
|
|
20
18
|
```
|
|
@@ -55,20 +53,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
|
|
|
55
53
|
|
|
56
54
|
All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
|
|
57
55
|
|
|
58
|
-
| Field | Effective value
|
|
59
|
-
| --------------------- |
|
|
60
|
-
| `publicUrl` | CLI `--public-url` replaces the file URL, then migrated legacy single item, then actual listener root. HTTP(S) roots only, optional final slash, no credentials/path/query/fragment.
|
|
61
|
-
| `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and wildcard binds.
|
|
62
|
-
| `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound.
|
|
63
|
-
| `tlsCert`, `tlsKey` | Supply both file fields or both CLI `--tls-cert`/`--tls-key`; CLI replaces the entire pair, without mixed sources or reading unused file paths. Omit for HTTP.
|
|
64
|
-
| `requireTotp` | Defaults to `false`. An unbound account may skip setup; an already bound account still needs its second factor. Set `true` to require TOTP enrollment before access. Explicit true/false settings, existing bindings and backup codes survive upgrades.
|
|
65
|
-
| `manualAccountLogin` | Defaults true. Native Settings writes the profile override; accepted saves immediately affect new authorizations and survive restart without restarting authentication. False preserves admitted attempts and official credentials.
|
|
66
|
-
| `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions.
|
|
67
|
-
| `preserveOriginPaths` | Optional canonical segment-prefix paths; default `[]`. Matching routes keep the validated public Host and existing Origin after authentication. The final public origin configures native Connection trust automatically.
|
|
56
|
+
| Field | Effective value |
|
|
57
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `publicUrl` | CLI `--public-url` replaces the file URL, then migrated legacy single item, then actual listener root. HTTP(S) roots only, optional final slash, no credentials/path/query/fragment. |
|
|
59
|
+
| `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and wildcard binds. |
|
|
60
|
+
| `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound. |
|
|
61
|
+
| `tlsCert`, `tlsKey` | Supply both file fields or both CLI `--tls-cert`/`--tls-key`; CLI replaces the entire pair, without mixed sources or reading unused file paths. Omit for HTTP. |
|
|
62
|
+
| `requireTotp` | Defaults to `false`. An unbound account may skip setup; an already bound account still needs its second factor. Set `true` to require TOTP enrollment before access. Explicit true/false settings, existing bindings and backup codes survive upgrades. |
|
|
63
|
+
| `manualAccountLogin` | Defaults true. Native Settings writes the profile override; accepted saves immediately affect new authorizations and survive restart without restarting authentication. False preserves admitted attempts and official credentials. |
|
|
64
|
+
| `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
|
|
65
|
+
| `preserveOriginPaths` | Optional canonical segment-prefix paths; default `[]`. Matching routes keep the validated public Host and existing Origin after authentication. The final public origin configures native Connection trust automatically. |
|
|
68
66
|
|
|
69
67
|
**Pay particular attention to TLS paths:** relative file values resolve from the selected profile directory, where its `cordis.patch.yml` lives. Relative CLI paths resolve from the process's launch working directory. Neither uses the bundle or another overlay's directory. Absolute paths stay absolute.
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
`dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` overrides file host, port and URL independently. The listener uses an actual free port while the explicit public root stays fixed; configure the proxy for that port. Omit host when overriding only port.
|
|
72
70
|
|
|
73
71
|
For example, file `tlsCert: ./tls/dsh.crt` means `~/.dsh/profiles/web/tls/dsh.crt` even if you launch from a different directory. The following command uses `./launch-workdir/tls/dsh.crt` and the matching key instead:
|
|
74
72
|
|
|
@@ -79,13 +77,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
79
77
|
|
|
80
78
|
Supplying only one CLI flag fails even if the file contains the other half. Missing, unreadable, empty, malformed or mismatched certificate/key material fails startup without an HTTP fallback, and releases listener/admin/storage resources. Choose a certificate valid for the browser hostname; the plugin delegates TLS to the official listener.
|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
All eight project the final Web URL through model runtime context and `DSH_WEB_URL`; tests still scan all Web sections for duplicate URLs or tokens.
|
|
80
|
+
The final public Web URL appears in model runtime context and `DSH_WEB_URL`, without a native authentication token.
|
|
85
81
|
|
|
86
82
|
## Native HTTPS and IPv6
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
Use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
|
|
89
85
|
|
|
90
86
|
```yaml
|
|
91
87
|
- id: auth-remote
|
|
@@ -116,7 +112,7 @@ The old field remains a plugin migration contract, independently of DSH version
|
|
|
116
112
|
| Two or more items, even duplicates | Fail; manually choose one public entry and replace the array with `publicUrl`. |
|
|
117
113
|
| Any explicit `allowedOrigins` plus file or CLI `publicUrl`, even an empty array or identical URL | Fail; remove the legacy field before using the new one. |
|
|
118
114
|
|
|
119
|
-
Back up the old patch before upgrading. Replace a single item with `publicUrl: https://dsh.example.com/`; remove an empty array to keep derived behavior. An installation with several public origins needs a deliberate choice of one canonical entry. Route alternate browser hostnames to that entry before they reach the protected upstream.
|
|
115
|
+
Back up the old patch before upgrading. Replace a single item with `publicUrl: https://dsh.example.com/`; remove an empty array to keep derived behavior. An installation with several public origins needs a deliberate choice of one canonical entry. Route alternate browser hostnames to that entry before they reach the protected upstream. A rollback must restore configuration compatible with the selected plugin version.
|
|
120
116
|
|
|
121
117
|
## Source and bridge contract
|
|
122
118
|
|
|
@@ -126,11 +122,11 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
|
|
|
126
122
|
|
|
127
123
|
Plugin cookies follow the validated external origin and are host-only, HttpOnly and SameSite; HTTPS sets Secure. Native bridge credentials stay server-side and follow the native listener protocol, including HTTPS cookie audience/Secure when a public HTTP proxy fronts native HTTPS. Ports do not isolate browser cookies.
|
|
128
124
|
|
|
129
|
-
Standard `/api` routes work with `preserveOriginPaths: []`; there is no need to list `/api`. The plugin always declares its finalized native bridge authority in Connection's `trustedHosts`, using the actual bound port (including `--port 0`), so downstream plugins that read this list can recognize the bridge without an extra trusted-host flag. Explicit CLI trusted hosts are merged and deduplicated; they do not expand the outer public-origin policy. Add a prefix only when a downstream route needs the original public Host. The plugin forwards an Origin only when the request supplied one, and preflights and declares the selected public authority for preserved paths. No separate Connection row is needed. Ordinary routes
|
|
125
|
+
Standard `/api` routes work with `preserveOriginPaths: []`; there is no need to list `/api`. The plugin always declares its finalized native bridge authority in Connection's `trustedHosts`, using the actual bound port (including `--port 0`), so downstream plugins that read this list can recognize the bridge without an extra trusted-host flag. Explicit CLI trusted hosts are merged and deduplicated; they do not expand the outer public-origin policy. Add a prefix only when a downstream route needs the original public Host. The plugin forwards an Origin only when the request supplied one, and preflights and declares the selected public authority for preserved paths. No separate Connection row is needed. Ordinary routes use the normalized native bind authority and require a full session. Revocation, Connection loss or storage failure closes active uploads, streams and upgrades and withdraws business admission. Readiness does not mean the account is initialized.
|
|
130
126
|
|
|
131
127
|
## Start and verify the public entry
|
|
132
128
|
|
|
133
|
-
1. Verify Linux, Node.js 24
|
|
129
|
+
1. Verify Linux, Node.js 24+ (at least `24.9.0` for recommended DSH `0.2.2-alpha.2`), the exact compatible DSH version, and the intended profile/package. Keep test and development data separate.
|
|
134
130
|
2. Merge one complete profile configuration and configure a private reachable proxy upstream if needed; see the [proxy guide](reverse-proxy.md).
|
|
135
131
|
3. Start DSH. For the HTTP upstream example, inspect `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready` and require the expected plugin/protocol and `ready: true`.
|
|
136
132
|
4. Confirm anonymous HTML redirect and API denial, then initialize locally, sign in, bind TOTP and save backup codes. Exercise official settings, workspace, preview, uploads, SSE/WebSocket and revocation through the selected entry.
|
|
@@ -139,9 +135,9 @@ Startup prints the actual protocol/address/port and one distinct public root, de
|
|
|
139
135
|
|
|
140
136
|
## Backup, recovery and changes
|
|
141
137
|
|
|
142
|
-
Before upgrading
|
|
138
|
+
Before upgrading to `0.3.3`, stop DSH and back up the authentication directory, profile patch and package/lock files. Keep access private and retain independent `webserver disabled: true`. Confirm that DSH is a listed target (recommended `0.2.2-alpha.2`), install the plugin, and verify readiness, anonymous denial, login and revocation. To roll back, stop the service and restore matching host/plugin package, lock and patch backups. This release does not change the authentication data format; still check schema when restoring and never overwrite live state.
|
|
143
139
|
|
|
144
|
-
|
|
140
|
+
When upgrading from a plugin earlier than `0.3.2`, account for the behavior changes introduced in `0.3.2` and retained in `0.3.3`: CLI text is fixed English, so remove `--lang` from scripts; JSON fields are unchanged. The standalone login page has no language selector and uses `dsh-auth-remote-lang` memory, then `navigator.language`, then English. Old `dsh-auth-remote.locale` is ignored, retained and not migrated. Entering DSH remembers only native accepted preferences; signing out keeps them. The plugin's eight languages do not expand DSH's native language catalog.
|
|
145
141
|
|
|
146
142
|
Stop DSH and verify it released the profile lock before copying `~/.dsh/profiles/web/auth-remote/auth-state.json`. Keep the copy in a private directory (0700) with file mode 0600. It contains password hashes, the TOTP secret, backup-code hashes and sessions. Do not copy an in-progress temporary file, overwrite live locked state or commit it. Back up the corresponding profile patch and package/lock files.
|
|
147
143
|
|
|
@@ -149,6 +145,4 @@ For recovery, stop DSH, check schema/package compatibility, restore with private
|
|
|
149
145
|
|
|
150
146
|
To change the external entry, replace the one `publicUrl`, update the proxy and restart DSH. Verify the new entry and rejection of the former non-loopback entry, including cookies, redirects, uploads and long connections. Do not temporarily configure both origins in this plugin.
|
|
151
147
|
|
|
152
|
-
Official DeepSeek authorization
|
|
153
|
-
|
|
154
|
-
Before using LiveShare on DSH `0.2.2-alpha.2`, enable it, configure Relay and sign in as Owner through native DSH setup. This plugin does not enable sharing or rewrite Relay configuration. Viewers receive no administrator identity; plugin sign-out and stopping a share are independent operations. Local protocol stand-ins establish basic compatibility; real Relay/OAuth, visitor models and file-write experience require separate verification. No broader anonymous exception or preserveOriginPaths setting is required.
|
|
148
|
+
Official DeepSeek authorization uses the [README manual callback dialog](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. `/auth-remote/account/*` retains the session/origin gate and same-origin JSON POSTs; direct HTTP access to native `/oauth/callback` cannot complete this handoff. No proxy exception, broader paths or cross-site allowance is required.
|