dsh-auth-remote 0.1.8 → 0.1.9
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 +8 -1
- package/CHANGELOG.zh-CN.md +8 -1
- package/CONTRIBUTING.md +1 -1
- package/CONTRIBUTING.zh-CN.md +1 -1
- package/README.md +28 -12
- package/README.zh-CN.md +28 -12
- package/dist/cli.js +50 -0
- package/dist/cli.js.map +2 -2
- package/dist/client.js +457 -1
- package/dist/client.js.map +4 -4
- package/dist/index.js +356 -23
- package/dist/index.js.map +3 -3
- package/dist/login.js +50 -0
- package/dist/login.js.map +2 -2
- package/dist/types/adapters/dsh/account-callback.d.ts +12 -0
- package/dist/types/adapters/dsh/account-callback.d.ts.map +1 -0
- package/dist/types/adapters/dsh/browser-capability.d.ts +1 -1
- package/dist/types/adapters/dsh/browser-capability.d.ts.map +1 -1
- package/dist/types/adapters/dsh/webserver.d.ts +3 -0
- package/dist/types/adapters/dsh/webserver.d.ts.map +1 -1
- package/dist/types/http/account-login.d.ts +43 -0
- package/dist/types/http/account-login.d.ts.map +1 -0
- package/dist/types/http/routes.d.ts +16 -1
- package/dist/types/http/routes.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/account-login.d.ts +21 -0
- package/dist/types/shared/account-login.d.ts.map +1 -0
- package/dist/types/shared/i18n.d.ts +50 -0
- package/dist/types/shared/i18n.d.ts.map +1 -1
- package/dist/types/shared/locales/en.d.ts +25 -0
- package/dist/types/shared/locales/en.d.ts.map +1 -1
- package/dist/types/shared/locales/zh.d.ts +25 -0
- package/dist/types/shared/locales/zh.d.ts.map +1 -1
- package/docs/deployment.md +19 -15
- package/docs/deployment.zh-CN.md +19 -15
- package/docs/development.md +16 -6
- package/docs/development.zh-CN.md +16 -6
- package/docs/legacy-compatibility.md +170 -117
- package/docs/legacy-compatibility.zh-CN.md +170 -0
- package/docs/releasing.md +6 -6
- package/docs/releasing.zh-CN.md +6 -6
- package/docs/reverse-proxy.md +2 -2
- package/docs/reverse-proxy.zh-CN.md +2 -2
- package/package.json +25 -11
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,14 @@ This file records user-visible changes to the released package. Version numbers
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 0.1.9 - 2026-10-15
|
|
10
|
+
|
|
11
|
+
- Add DSH 0.2.1-alpha.3 to the compatibility declaration and seven-version CLI, installation smoke and browser matrix; use its packages for development and default verification.
|
|
12
|
+
- Validate the listener's bound port before finalizing authentication. Adapt browser Settings navigation and startup URL observation to DSH 0.2.1-alpha.3.
|
|
13
|
+
- Add an instruction-first official DeepSeek sign-in dialog on DSH 0.2.1-alpha.3. Open authorization only on explicit confirmation, then accept a pasted loopback callback URL through an authenticated, session-bound POST and reuse native state/PKCE exchange and credential storage. Handle blocked popups, invalid callbacks, cancellation, expiry and retries without a local listener or tunnel.
|
|
14
|
+
- Preserve the native API-key setup alternative in the DSH 0.2.1-alpha.3 manual account dialog. Selecting it continues credential onboarding without completing setup or starting account authorization; the account menu can reopen the same editor.
|
|
15
|
+
- Align the manual account sign-in dialog with DSH modal typography, spacing, controls and themed surfaces, keeping actions visible on short screens while the content scrolls.
|
|
16
|
+
- Publish bilingual compatibility inventories with complete DSH version numbers, feature-to-version and version-to-feature matrices, implementation/test references and migration/retirement rules.
|
|
10
17
|
|
|
11
18
|
## 0.1.8 - 2026-10-12
|
|
12
19
|
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -6,7 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
## 未发布
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 0.1.9 - 2026-10-15
|
|
10
|
+
|
|
11
|
+
- 将 DSH 0.2.1-alpha.3 加入兼容声明及七版 CLI、安装冒烟和浏览器矩阵,开发依赖与默认验证运行时同步升级。
|
|
12
|
+
- 认证配置定稿前明确校验监听已绑定端口;浏览器设置导航与启动地址观测适配 DSH 0.2.1-alpha.3。
|
|
13
|
+
- 为 DSH 0.2.1-alpha.3 官方账号登录增加先展示说明的弹窗;用户明确点击后才打开授权页,随后通过绑定当前会话的已鉴权 POST 手动回填回环地址,复用原生 state/PKCE 兑换和凭据存储。处理弹窗拦截、无效回调、取消、过期与重试,无需本地监听器或隧道。
|
|
14
|
+
- 修复 DSH 0.2.1-alpha.3 手动账号弹窗丢失原生 API Key 设置入口的问题;选择后继续凭据引导,不提前结束设置,也不发起账号授权,并支持从账号菜单重新打开同一编辑器。
|
|
15
|
+
- 统一官方账号手动登录弹窗的字号、行高、留白、控件尺寸和主题浮层样式,使其与 DSH 原生弹窗一致;短屏下内容可滚动,操作按钮保持可见。
|
|
16
|
+
- 将兼容清单改为中英文双语,明确完整 DSH 版本号,增加功能到版本与版本到功能的双向矩阵,并关联实现、测试及迁移退役条件。
|
|
10
17
|
|
|
11
18
|
## 0.1.8 - 2026-10-12
|
|
12
19
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -16,7 +16,7 @@ pnpm check
|
|
|
16
16
|
|
|
17
17
|
The [development guide](docs/development.md) explains the isolated DSH runtime and the full test boundaries. Run `pnpm pack:local` when a change affects packaging, and `pnpm smoke` when it affects installation or startup. Tests use temporary profiles; keep real account files and credentials out of the repository.
|
|
18
18
|
|
|
19
|
-
Before changing supported versions, consult the [legacy compatibility inventory](docs/legacy-compatibility.md)
|
|
19
|
+
Before changing supported versions, consult the [legacy compatibility inventory](docs/legacy-compatibility.md). Review manifest peers and compatibility declarations, runtime admission, test targets, CI matrices, and user claims together. Retire runtime adaptations in the same change only when none of their applicable DSH versions remain supported; retire old plugin configuration under its own migration policy. Keep shared security checks. Update both inventory languages, both matrix views and affected entries with complete version numbers whenever compatibility code changes.
|
|
20
20
|
|
|
21
21
|
## Open a pull request
|
|
22
22
|
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
感谢改进 dsh-auth-remote。认证或部署行为的改动应说明安全影响,并提供可验证的结果。不要在公开 issue 中提供漏洞细节或密钥。如果 GitHub 私密漏洞报告已启用,请使用该渠道;否则仅请求私下联系渠道,不要公开技术细节。
|
|
6
6
|
|
|
7
|
-
修改支持版本前,先阅读 [Legacy 兼容维护清单](docs/legacy-compatibility.md),共同检查 manifest peers/兼容声明、运行时准入、测试目标、CI 矩阵及用户声明。适用 DSH
|
|
7
|
+
修改支持版本前,先阅读 [Legacy 兼容维护清单](docs/legacy-compatibility.zh-CN.md),共同检查 manifest peers/兼容声明、运行时准入、测试目标、CI 矩阵及用户声明。适用 DSH 与支持集合无交集时须同次删除专属适配并更新清单;旧插件配置按自身迁移策略退役。保留共享安全逻辑,兼容代码变更同步维护中英文清单、两个维度的矩阵与相关条目,适用范围须使用完整版本号。
|
|
8
8
|
|
|
9
9
|
## 准备源码环境
|
|
10
10
|
|
package/README.md
CHANGED
|
@@ -6,23 +6,29 @@ Single-user remote sign-in for DeepSeek Harness (DSH), with password, TOTP, one-
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Linux with `/proc`, Node.js 24 or newer, and DSH **0.1.7-rc.1**, **0.1.7-rc.2**, **0.2.0-rc.1**, **0.2.0-rc.2**, **0.2.1-alpha.1**, or **0.2.1-alpha.
|
|
9
|
+
- Linux with `/proc`, Node.js 24 or newer, and DSH **0.1.7-rc.1**, **0.1.7-rc.2**, **0.2.0-rc.1**, **0.2.0-rc.2**, **0.2.1-alpha.1**, **0.2.1-alpha.2**, or **0.2.1-alpha.3** (default). pnpm 12.5.1 is needed only when building from source.
|
|
10
10
|
- DSH's default `~/.dsh` data directory and a `web` profile. The account state belongs to that profile; it is not shared with another profile.
|
|
11
11
|
- 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.
|
|
12
12
|
|
|
13
13
|
## DSH compatibility
|
|
14
14
|
|
|
15
|
-
Compatibility is declared for the
|
|
15
|
+
Compatibility is declared for the seven releases above in `dsh.compatibility.dshReleases`; development defaults to **0.2.1-alpha.3**. The host peer declaration and runtime version check both use `>=0.1.7-rc.1`, with no upper bound, including prereleases.
|
|
16
16
|
|
|
17
|
-
| DSH releases
|
|
18
|
-
|
|
|
19
|
-
| 0.1.7-rc.1
|
|
20
|
-
| 0.
|
|
21
|
-
| 0.2.
|
|
17
|
+
| DSH releases | Concrete IPv4 HTTP | Native public URL CLI, Web prompt and `DSH_WEB_URL` | Native IPv6 / HTTPS |
|
|
18
|
+
| ------------- | ------------------ | --------------------------------------------------------------------------------- | ---------------------------------- |
|
|
19
|
+
| 0.1.7-rc.1 | Yes | No `--public-url`; native model-side URL remains `http://127.0.0.1:<actual-port>` | Unsupported |
|
|
20
|
+
| 0.1.7-rc.2 | Yes | No `--public-url`; native model-side URL remains `http://127.0.0.1:<actual-port>` | Unsupported |
|
|
21
|
+
| 0.2.0-rc.1 | Yes | No `--public-url`; native model-side URL remains `http://127.0.0.1:<actual-port>` | Unsupported |
|
|
22
|
+
| 0.2.0-rc.2 | Yes | No `--public-url`; native model-side URL remains `http://127.0.0.1:<actual-port>` | Unsupported |
|
|
23
|
+
| 0.2.1-alpha.1 | Yes | Yes; uses the plugin's final public root | Unsupported |
|
|
24
|
+
| 0.2.1-alpha.2 | Yes | Yes; uses the plugin's final public root | Yes, through the official listener |
|
|
25
|
+
| 0.2.1-alpha.3 | Yes | Yes; final public root in runtime context and `DSH_WEB_URL` | Yes, through the official listener |
|
|
22
26
|
|
|
23
|
-
Later versions are forward-admitted, not claimed as tested. The plugin still verifies the required WebServer/Connection APIs, shared host package identity, and native authentication exchange. Missing capabilities leave authentication unavailable with a diagnostic. CI covers CLI, installation smoke and browsers on all
|
|
27
|
+
Later versions are forward-admitted, not claimed as tested. The plugin still verifies the required WebServer/Connection APIs, shared host package identity, and native authentication exchange. Missing capabilities leave authentication unavailable with a diagnostic. CI covers CLI, installation smoke and browsers on all seven declared versions.
|
|
24
28
|
|
|
25
|
-
The plugin's single-entry configuration works on all
|
|
29
|
+
The plugin's single-entry configuration works on all seven releases. Native IPv6/TLS is available on DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`; an external HTTPS proxy can serve HTTP listeners. For source builds, see the [development guide](docs/development.md).
|
|
30
|
+
|
|
31
|
+
The [compatibility inventory](docs/legacy-compatibility.md) provides feature-to-version and version-to-feature matrices, code/test references and migration or retirement conditions.
|
|
26
32
|
|
|
27
33
|
## Install from npm
|
|
28
34
|
|
|
@@ -30,17 +36,17 @@ With DSH installed, verify its version and install the published plugin into the
|
|
|
30
36
|
|
|
31
37
|
```sh
|
|
32
38
|
dsh --version
|
|
33
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
39
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.9
|
|
34
40
|
dsh plugin --profile web list
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
Check that `dsh --version` prints `0.2.1-alpha.
|
|
43
|
+
Check that `dsh --version` prints `0.2.1-alpha.3` (or another compatible release above) and the plugin list includes `dsh-auth-remote@0.1.9`. These commands use DSH's default data directory. For source builds and an isolated development runtime, see the [development guide](docs/development.md).
|
|
38
44
|
|
|
39
45
|
## Configure the web profile
|
|
40
46
|
|
|
41
47
|
The minimal setup needs no profile patch. Start with `dsh web --no-open --port 13090` and use the printed `http://127.0.0.1:13090/` root. Without an explicit `publicUrl`, the plugin derives one root from the actual listener protocol, address and bound port, including `--port 0`. Unauthenticated navigation redirects to sign-in. Check `/auth-remote/ready` before relying on the service. Startup prints the listener and one distinct public root, without a native `?token=` URL.
|
|
42
48
|
|
|
43
|
-
For a public HTTPS entry, use the [deployment guide](docs/deployment.md) and [profile example](examples/web-profile-auth-remote.patch.yml), with top-level `publicUrl: https://dsh.example.com/`, `host` and `port`.
|
|
49
|
+
For a public HTTPS entry, use the [deployment guide](docs/deployment.md) and [profile example](examples/web-profile-auth-remote.patch.yml), with top-level `publicUrl: https://dsh.example.com/`, `host` and `port`. DSH `0.2.1-alpha.2`, `0.2.1-alpha.3` also support concrete IPv6 and paired top-level `tlsCert`/`tlsKey`. The URL must be an HTTP(S) root, with no credentials, child path, query or fragment. One public origin plus literal loopback is admitted. Setting a URL does not configure proxy routing or TLS.
|
|
44
50
|
|
|
45
51
|
The plugin automatically declares its finalized native bridge authority in Connection's `trustedHosts`, so downstream plugins can recognize a concrete listener without an extra `--trusted-host`. If a downstream route needs the original public Host, add its path to `preserveOriginPaths`; the final public authority is then declared as well. Explicit CLI trusted hosts are retained, while the outer public-origin and sign-in checks still apply. CLI host/port and public URL override file values; TLS overrides as one complete pair. See the [migration and path rules](docs/deployment.md#configuration-priority-and-path-bases) before upgrading `allowedOrigins`: zero or one item is migrated in memory with a warning, multiple items and any explicit coexistence with `publicUrl` fail.
|
|
46
52
|
|
|
@@ -58,6 +64,8 @@ Enter one username and a password of 12–256 Unicode characters. The password i
|
|
|
58
64
|
|
|
59
65
|
Open the direct loopback URL for the minimal installation. After configuring a public origin, open `https://dsh.example.com/auth-remote/login`. Security settings inside DSH can change the password, bind or disable TOTP when policy permits, and revoke sessions. Password or factor changes revoke existing sessions. Sessions have a fixed default lifetime of 168 hours and survive service restarts.
|
|
60
66
|
|
|
67
|
+
On DSH `0.2.1-alpha.3`, open the sidebar account menu, then **Settings → Security**. DSH `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.2` expose Settings directly in the sidebar.
|
|
68
|
+
|
|
61
69
|
The sign-in page references DSH's PWA manifest. The manifest and favicons are readable before sign-in; business pages and APIs still require authentication. See the [public resource rules](docs/deployment.md#source-and-bridge-contract).
|
|
62
70
|
|
|
63
71
|
```sh
|
|
@@ -71,6 +79,14 @@ Mutating commands require an interactive confirmation. Online commands use a pri
|
|
|
71
79
|
|
|
72
80
|
The embedded Security page follows DSH's language setting. The standalone login page defaults to English and stores only `en` or `zh` at `localStorage["dsh-auth-remote.locale"]`; it does not read DSH settings before login. CLI human text uses `--lang en|zh`, or the first nonempty `LC_ALL`, `LC_MESSAGES`, then `LANG` (Chinese variants select `zh`, everything else English).
|
|
73
81
|
|
|
82
|
+
## Sign in to an official DeepSeek account
|
|
83
|
+
|
|
84
|
+
The manual callback adapter is enabled only on DSH **0.2.1-alpha.3**. Other versions retain their native flow; later releases require a separate review. In its account menu, **Sign in** first opens an instruction dialog; it does not start authorization immediately. Click **Open DeepSeek sign-in** to open the official page in a new tab. After approval, that tab may show a connection error or 404 at a loopback address. Copy its entire address, including `code` and `state`, paste it into **Full callback address**, and click **Confirm sign-in**. Keep the original DSH page open throughout. If the popup is blocked, use the dialog's authorization link.
|
|
85
|
+
|
|
86
|
+
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. DSH `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.2` retain their existing UI and API-key setup.
|
|
87
|
+
|
|
88
|
+
On DSH `0.2.1-alpha.3`, the dialog also offers **Use API key** before authorization begins. It opens the native credential editor and continues setup until the key is saved or the user chooses to defer. The same option is available from the account menu. During active authorization, the secondary button cancels that attempt instead.
|
|
89
|
+
|
|
74
90
|
## Put a proxy in front
|
|
75
91
|
|
|
76
92
|
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.
|
package/README.zh-CN.md
CHANGED
|
@@ -6,23 +6,29 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
6
6
|
|
|
7
7
|
## 前置条件
|
|
8
8
|
|
|
9
|
-
- Linux(含 `/proc`)、Node.js 24 或更高版本,以及 DSH **0.1.7-rc.1**、**0.1.7-rc.2**、**0.2.0-rc.1**、**0.2.0-rc.2**、**0.2.1-alpha.1** 或 **0.2.1-alpha.
|
|
9
|
+
- Linux(含 `/proc`)、Node.js 24 或更高版本,以及 DSH **0.1.7-rc.1**、**0.1.7-rc.2**、**0.2.0-rc.1**、**0.2.0-rc.2**、**0.2.1-alpha.1**、**0.2.1-alpha.2** 或 **0.2.1-alpha.3**(默认)。仅从源码构建时需要 pnpm 12.5.1。
|
|
10
10
|
- DSH 默认的 `~/.dsh` 数据目录和 `web` profile。账号状态属于该 profile,不与其他 profile 共用。
|
|
11
11
|
- 源码浏览器测试先执行 `pnpm exec playwright install chromium`。测试使用 Playwright 管理的浏览器和专用自签 TLS 夹具。
|
|
12
12
|
|
|
13
13
|
## DSH 兼容性
|
|
14
14
|
|
|
15
|
-
`dsh.compatibility.dshReleases`
|
|
15
|
+
`dsh.compatibility.dshReleases` 声明上述七个版本,开发默认使用 **0.2.1-alpha.3**。宿主 peer 声明和运行时版本检查统一使用 `>=0.1.7-rc.1`,不设上限且包含预发布版本。
|
|
16
16
|
|
|
17
|
-
| DSH 版本
|
|
18
|
-
|
|
|
19
|
-
| 0.1.7-rc.1
|
|
20
|
-
| 0.
|
|
21
|
-
| 0.2.
|
|
17
|
+
| DSH 版本 | 具体 IPv4 HTTP | 原生公开 URL CLI、Web 提示与 `DSH_WEB_URL` | 原生 IPv6 / HTTPS |
|
|
18
|
+
| ------------- | -------------- | -------------------------------------------------------------------- | ----------------- |
|
|
19
|
+
| 0.1.7-rc.1 | 支持 | 无 `--public-url`;原生模型侧 URL 保持 `http://127.0.0.1:<实际端口>` | 不支持 |
|
|
20
|
+
| 0.1.7-rc.2 | 支持 | 无 `--public-url`;原生模型侧 URL 保持 `http://127.0.0.1:<实际端口>` | 不支持 |
|
|
21
|
+
| 0.2.0-rc.1 | 支持 | 无 `--public-url`;原生模型侧 URL 保持 `http://127.0.0.1:<实际端口>` | 不支持 |
|
|
22
|
+
| 0.2.0-rc.2 | 支持 | 无 `--public-url`;原生模型侧 URL 保持 `http://127.0.0.1:<实际端口>` | 不支持 |
|
|
23
|
+
| 0.2.1-alpha.1 | 支持 | 支持;使用插件最终公开根地址 | 不支持 |
|
|
24
|
+
| 0.2.1-alpha.2 | 支持 | 支持;使用插件最终公开根地址 | 通过官方监听支持 |
|
|
25
|
+
| 0.2.1-alpha.3 | 支持 | 支持;最终公开根地址写入运行时上下文与 `DSH_WEB_URL` | 通过官方监听支持 |
|
|
22
26
|
|
|
23
|
-
后续版本属于向前准入,并不宣称已经逐版测试。插件仍检查必需的 WebServer/Connection 接口、宿主包实例一致性和原生认证交换。缺少能力时认证入口保持不可用并给出诊断。CI
|
|
27
|
+
后续版本属于向前准入,并不宣称已经逐版测试。插件仍检查必需的 WebServer/Connection 接口、宿主包实例一致性和原生认证交换。缺少能力时认证入口保持不可用并给出诊断。CI 在七个声明版本上运行 CLI、安装冒烟和浏览器回归。
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
七版均使用插件的单入口配置。原生 IPv6/TLS 在 DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 可用;HTTP 监听可由外部 HTTPS 代理提供入口。源码构建参见[开发指南](docs/development.zh-CN.md)。
|
|
30
|
+
|
|
31
|
+
[兼容维护清单](docs/legacy-compatibility.zh-CN.md)提供功能到版本、版本到功能的双向矩阵,并关联实现、测试与迁移退役条件。
|
|
26
32
|
|
|
27
33
|
## 从 npm 安装
|
|
28
34
|
|
|
@@ -30,17 +36,17 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
30
36
|
|
|
31
37
|
```sh
|
|
32
38
|
dsh --version
|
|
33
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
39
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.9
|
|
34
40
|
dsh plugin --profile web list
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
确认 `dsh --version` 输出 `0.2.1-alpha.
|
|
43
|
+
确认 `dsh --version` 输出 `0.2.1-alpha.3`(或上文其他兼容版本),且插件列表中有 `dsh-auth-remote@0.1.9`。这些命令使用 DSH 默认数据目录。源码构建及隔离开发运行时参见[开发指南](docs/development.zh-CN.md)。
|
|
38
44
|
|
|
39
45
|
## 配置 web profile
|
|
40
46
|
|
|
41
47
|
最小安装无需修改 profile 补丁。用 `dsh web --no-open --port 13090` 启动,使用终端打印的 `http://127.0.0.1:13090/` 根地址。未显式设置 `publicUrl` 时,插件根据监听的实际协议、地址和绑定端口生成唯一根地址,包含 `--port 0` 的实际结果。未登录导航跳转登录页;使用服务前检查 `/auth-remote/ready`。启动输出包含监听地址和一个不同的公开根地址,不含原生 `?token=` URL。
|
|
42
48
|
|
|
43
|
-
公网 HTTPS 入口请使用[部署指南](docs/deployment.zh-CN.md)和 [profile 示例](examples/web-profile-auth-remote.patch.yml),设置顶层 `publicUrl: https://dsh.example.com/`、`host`、`port`。alpha.2 还支持具体 IPv6 和成对的顶层 `tlsCert`/`tlsKey`。URL 必须是 HTTP(S) 根地址,不能带凭据、子路径、查询或片段。准入范围是唯一公开来源加字面回环。配置 URL 不会配置代理路由或 TLS。
|
|
49
|
+
公网 HTTPS 入口请使用[部署指南](docs/deployment.zh-CN.md)和 [profile 示例](examples/web-profile-auth-remote.patch.yml),设置顶层 `publicUrl: https://dsh.example.com/`、`host`、`port`。DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 还支持具体 IPv6 和成对的顶层 `tlsCert`/`tlsKey`。URL 必须是 HTTP(S) 根地址,不能带凭据、子路径、查询或片段。准入范围是唯一公开来源加字面回环。配置 URL 不会配置代理路由或 TLS。
|
|
44
50
|
|
|
45
51
|
插件自动将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,下游插件无需额外 `--trusted-host` 即可识别具体监听地址。下游路由若需要原始公网 Host,可把路径加入 `preserveOriginPaths`,此时也自动登记最终公开 authority。显式 CLI trusted hosts 继续保留,外层公开来源与登录校验仍然生效。CLI 的 host/port 和公开 URL 覆盖文件值;TLS 按完整一对覆盖。升级 `allowedOrigins` 前阅读[迁移和路径规则](docs/deployment.zh-CN.md#配置优先级与路径基准):零项或单项在内存迁移并告警,多项及任意显式新旧字段共存报错。
|
|
46
52
|
|
|
@@ -58,6 +64,8 @@ dsh plugin --profile web exec dsh-auth-remote init --lang zh
|
|
|
58
64
|
|
|
59
65
|
最小化安装时访问本机回环地址;配置公网入口后访问 `https://dsh.example.com/auth-remote/login`。DSH 内的安全设置可以修改密码、绑定 TOTP、在策略允许时关闭 TOTP,以及撤销会话。密码或第二因素变更会撤销已有会话。会话默认固定有效 168 小时,服务重启后仍保留。
|
|
60
66
|
|
|
67
|
+
DSH `0.2.1-alpha.3` 从侧栏账号菜单进入 **设置 → 安全**;DSH `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.2` 从侧栏直接打开设置。
|
|
68
|
+
|
|
61
69
|
登录页引用 DSH 的 PWA manifest,manifest 与 favicon 在登录前即可读取;业务页面和 API 仍需认证。具体范围见[公开资源规则](docs/deployment.zh-CN.md#来源与桥接契约)。
|
|
62
70
|
|
|
63
71
|
```sh
|
|
@@ -71,6 +79,14 @@ dsh plugin --profile web exec dsh-auth-remote revoke-sessions --lang zh
|
|
|
71
79
|
|
|
72
80
|
内嵌安全页跟随 DSH 语言设置。独立登录页默认英文,仅在 `localStorage["dsh-auth-remote.locale"]` 保存 `en` 或 `zh`,登录前不读取 DSH 设置。CLI 人类文案由 `--lang en|zh` 指定;未指定时取首个非空的 `LC_ALL`、`LC_MESSAGES`、`LANG`(中文变体为 `zh`,其他为英文)。
|
|
73
81
|
|
|
82
|
+
## 登录 DeepSeek 官方账号
|
|
83
|
+
|
|
84
|
+
手动回填适配仅在 DSH **0.2.1-alpha.3** 启用,其他版本保留原生流程,后续版本需另行复核。账号菜单中的“登录”先打开步骤说明弹窗,不会立即发起授权。点击“打开 DeepSeek 登录页”,在新标签页完成官方登录;授权后该标签页可能在回环地址显示连接失败或 404。复制地址栏中的完整 URL(包含 `code` 和 `state`),粘贴到“完整回调地址”,再点击“确认登录”。整个过程中保留原 DSH 页面;弹窗被浏览器拦截时,可使用弹窗内的授权链接。
|
|
85
|
+
|
|
86
|
+
手动回填无需本地监听器、SSH 隧道或浏览器扩展。回环地址用于承载授权结果,页面无需正常打开。插件只解析粘贴的 URL,在 DSH 内部分发回调,保留原生 state 校验、PKCE 兑换与凭据存储,不会请求粘贴的地址。待完成授权绑定发起操作的远程会话,最长有效期为十分钟;关闭弹窗或撤销该会话会取消待完成授权。过期或失败后须重新开始。DSH `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.2` 保留原有界面与 API Key 设置。
|
|
87
|
+
|
|
88
|
+
DSH `0.2.1-alpha.3` 的弹窗在授权开始前也提供“使用 API Key”,点击后进入原生凭据编辑器,直到保存密钥或用户选择“稍后配置”才结束引导;账号菜单中也保留同一入口。授权进行中时,次要按钮用于取消本次授权。
|
|
89
|
+
|
|
74
90
|
## 接入反向代理
|
|
75
91
|
|
|
76
92
|
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS 可在代理终止;把其精确 HTTPS 根地址设置为 `publicUrl`。保持 DSH 监听私有,且不要缓存认证响应。
|
package/dist/cli.js
CHANGED
|
@@ -1000,6 +1000,31 @@ var en = {
|
|
|
1000
1000
|
errorUnauthorized: "Your session has expired. Sign in again.",
|
|
1001
1001
|
errorServiceUnavailable: "The service is temporarily unavailable. Try again later.",
|
|
1002
1002
|
errorGeneric: "The operation could not be completed. Try again.",
|
|
1003
|
+
accountLoginTitle: "Sign in to your DeepSeek account",
|
|
1004
|
+
accountLoginDescription: "Complete authorization in a new tab, then return here to finish signing in.",
|
|
1005
|
+
accountLoginStepOpen: "Click \u201COpen DeepSeek sign-in\u201D below and sign in on the official page.",
|
|
1006
|
+
accountLoginStepCopy: "After authorization, the new tab may show a connection error or 404. Copy its full address from the address bar.",
|
|
1007
|
+
accountLoginStepSubmit: "Return to this dialog, paste the address below and click \u201CConfirm sign-in\u201D.",
|
|
1008
|
+
accountLoginCallbackLabel: "Full callback address",
|
|
1009
|
+
accountLoginCallbackHint: "Include both code and state. The page does not need to load. Submit before this authorization expires.",
|
|
1010
|
+
accountLoginOpen: "Open DeepSeek sign-in",
|
|
1011
|
+
accountLoginConfirm: "Confirm sign-in",
|
|
1012
|
+
accountLoginCancel: "Cancel",
|
|
1013
|
+
accountLoginUseApiKey: "Use API key",
|
|
1014
|
+
accountLoginClose: "Close",
|
|
1015
|
+
accountLoginRetry: "Start again",
|
|
1016
|
+
accountLoginReopen: "Reopen authorization page",
|
|
1017
|
+
accountLoginPopupBlocked: "The new tab was blocked.",
|
|
1018
|
+
accountLoginInitializing: "Preparing authorization\u2026",
|
|
1019
|
+
accountLoginWaiting: "Waiting for the callback address. This authorization lasts at most 10 minutes.",
|
|
1020
|
+
accountLoginExchanging: "Completing sign-in\u2026",
|
|
1021
|
+
accountLoginInvalidCallback: "This callback address does not match the current authorization. Copy the full address, including code and state, from the latest authorization tab.",
|
|
1022
|
+
accountLoginExpired: "This authorization has expired. Start again.",
|
|
1023
|
+
accountLoginMismatch: "This authorization is no longer available in this session. Close this dialog and start again.",
|
|
1024
|
+
accountLoginBusy: "Another authorization is in progress. Finish or cancel it before starting again.",
|
|
1025
|
+
accountLoginUnavailable: "This DSH version does not provide compatible account sign-in.",
|
|
1026
|
+
accountLoginFailed: "Authorization could not be completed. Start again and submit the address from the new tab.",
|
|
1027
|
+
accountLoginNoResponse: "The DeepSeek platform did not respond. Check the DSH server\u2019s network connection and start again.",
|
|
1003
1028
|
loginInitialTitle: "Sign in to DSH",
|
|
1004
1029
|
loginInitialLoading: "Checking sign-in status\u2026",
|
|
1005
1030
|
loginLanguageLabel: "Language",
|
|
@@ -1169,6 +1194,31 @@ var zh = {
|
|
|
1169
1194
|
errorUnauthorized: "\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002",
|
|
1170
1195
|
errorServiceUnavailable: "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
|
|
1171
1196
|
errorGeneric: "\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
1197
|
+
accountLoginTitle: "\u767B\u5F55 DeepSeek \u5B98\u65B9\u8D26\u53F7",
|
|
1198
|
+
accountLoginDescription: "\u5728\u65B0\u6807\u7B7E\u9875\u5B8C\u6210\u5B98\u65B9\u6388\u6743\u540E\uFF0C\u8FD4\u56DE\u6B64\u5904\u7EE7\u7EED\u767B\u5F55\u3002",
|
|
1199
|
+
accountLoginStepOpen: "\u70B9\u51FB\u4E0B\u65B9\u201C\u6253\u5F00 DeepSeek \u767B\u5F55\u9875\u201D\uFF0C\u5728\u5B98\u65B9\u9875\u9762\u767B\u5F55\u8D26\u53F7\u3002",
|
|
1200
|
+
accountLoginStepCopy: "\u6388\u6743\u540E\uFF0C\u65B0\u6807\u7B7E\u9875\u53EF\u80FD\u663E\u793A\u8FDE\u63A5\u5931\u8D25\u6216 404\u3002\u8BF7\u590D\u5236\u8BE5\u6807\u7B7E\u9875\u5730\u5740\u680F\u4E2D\u7684\u5B8C\u6574\u5730\u5740\u3002",
|
|
1201
|
+
accountLoginStepSubmit: "\u8FD4\u56DE\u6B64\u5F39\u7A97\uFF0C\u5C06\u5730\u5740\u7C98\u8D34\u5230\u4E0B\u65B9\u8F93\u5165\u6846\uFF0C\u518D\u70B9\u51FB\u201C\u786E\u8BA4\u767B\u5F55\u201D\u3002",
|
|
1202
|
+
accountLoginCallbackLabel: "\u5B8C\u6574\u56DE\u8C03\u5730\u5740",
|
|
1203
|
+
accountLoginCallbackHint: "\u5730\u5740\u987B\u5305\u542B code \u548C state\uFF1B\u8BE5\u9875\u9762\u65E0\u9700\u80FD\u6B63\u5E38\u6253\u5F00\u3002\u8BF7\u5728\u672C\u6B21\u6388\u6743\u5230\u671F\u524D\u63D0\u4EA4\u3002",
|
|
1204
|
+
accountLoginOpen: "\u6253\u5F00 DeepSeek \u767B\u5F55\u9875",
|
|
1205
|
+
accountLoginConfirm: "\u786E\u8BA4\u767B\u5F55",
|
|
1206
|
+
accountLoginCancel: "\u53D6\u6D88",
|
|
1207
|
+
accountLoginUseApiKey: "\u4F7F\u7528 API Key",
|
|
1208
|
+
accountLoginClose: "\u5173\u95ED",
|
|
1209
|
+
accountLoginRetry: "\u91CD\u65B0\u5F00\u59CB",
|
|
1210
|
+
accountLoginReopen: "\u91CD\u65B0\u6253\u5F00\u6388\u6743\u9875",
|
|
1211
|
+
accountLoginPopupBlocked: "\u65B0\u6807\u7B7E\u9875\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\u3002",
|
|
1212
|
+
accountLoginInitializing: "\u6B63\u5728\u51C6\u5907\u6388\u6743\u2026",
|
|
1213
|
+
accountLoginWaiting: "\u7B49\u5F85\u586B\u5199\u56DE\u8C03\u5730\u5740\u3002\u672C\u6B21\u6388\u6743\u6700\u957F\u6709\u6548\u671F\u4E3A 10 \u5206\u949F\u3002",
|
|
1214
|
+
accountLoginExchanging: "\u6B63\u5728\u5B8C\u6210\u767B\u5F55\u2026",
|
|
1215
|
+
accountLoginInvalidCallback: "\u56DE\u8C03\u5730\u5740\u4E0E\u5F53\u524D\u6388\u6743\u4E0D\u5339\u914D\uFF0C\u8BF7\u4ECE\u6700\u8FD1\u4E00\u6B21\u6388\u6743\u6807\u7B7E\u9875\u590D\u5236\u5305\u542B code \u548C state \u7684\u5B8C\u6574\u5730\u5740\u3002",
|
|
1216
|
+
accountLoginExpired: "\u672C\u6B21\u6388\u6743\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u5F00\u59CB\u3002",
|
|
1217
|
+
accountLoginMismatch: "\u5F53\u524D\u4F1A\u8BDD\u5DF2\u65E0\u6CD5\u7EE7\u7EED\u6B64\u6388\u6743\uFF0C\u8BF7\u5173\u95ED\u5F39\u7A97\u540E\u91CD\u65B0\u5F00\u59CB\u3002",
|
|
1218
|
+
accountLoginBusy: "\u5DF2\u6709\u6388\u6743\u6B63\u5728\u8FDB\u884C\uFF0C\u8BF7\u5148\u5B8C\u6210\u6216\u53D6\u6D88\u540E\u518D\u5F00\u59CB\u3002",
|
|
1219
|
+
accountLoginUnavailable: "\u5F53\u524D DSH \u7248\u672C\u672A\u63D0\u4F9B\u517C\u5BB9\u7684\u8D26\u53F7\u767B\u5F55\u529F\u80FD\u3002",
|
|
1220
|
+
accountLoginFailed: "\u672A\u80FD\u5B8C\u6210\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u5F00\u59CB\uFF0C\u5E76\u63D0\u4EA4\u65B0\u6807\u7B7E\u9875\u4E2D\u7684\u56DE\u8C03\u5730\u5740\u3002",
|
|
1221
|
+
accountLoginNoResponse: "DeepSeek \u5E73\u53F0\u672A\u54CD\u5E94\uFF0C\u8BF7\u68C0\u67E5 DSH \u670D\u52A1\u5668\u7684\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u65B0\u5F00\u59CB\u3002",
|
|
1172
1222
|
loginInitialTitle: "\u767B\u5F55 DSH",
|
|
1173
1223
|
loginInitialLoading: "\u6B63\u5728\u68C0\u67E5\u767B\u5F55\u72B6\u6001\u2026",
|
|
1174
1224
|
loginLanguageLabel: "\u8BED\u8A00",
|