dsh-auth-remote 0.1.0
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 +16 -0
- package/CHANGELOG.zh-CN.md +16 -0
- package/CONTRIBUTING.md +23 -0
- package/CONTRIBUTING.zh-CN.md +23 -0
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/README.zh-CN.md +65 -0
- package/cordis.patch.yml +45 -0
- package/dist/cli.js +1858 -0
- package/dist/cli.js.map +7 -0
- package/dist/client.js +3076 -0
- package/dist/client.js.map +7 -0
- package/dist/index.js +2473 -0
- package/dist/index.js.map +7 -0
- package/dist/login.css +230 -0
- package/dist/login.css.map +7 -0
- package/dist/login.js +2865 -0
- package/dist/login.js.map +7 -0
- package/dist/types/adapters/dsh/browser-auth.d.ts +8 -0
- package/dist/types/adapters/dsh/browser-auth.d.ts.map +1 -0
- package/dist/types/adapters/dsh/browser-capability.d.ts +8 -0
- package/dist/types/adapters/dsh/browser-capability.d.ts.map +1 -0
- package/dist/types/adapters/dsh/compatibility.d.ts +7 -0
- package/dist/types/adapters/dsh/compatibility.d.ts.map +1 -0
- package/dist/types/adapters/dsh/readiness.d.ts +22 -0
- package/dist/types/adapters/dsh/readiness.d.ts.map +1 -0
- package/dist/types/adapters/dsh/startup-urls.d.ts +4 -0
- package/dist/types/adapters/dsh/startup-urls.d.ts.map +1 -0
- package/dist/types/adapters/dsh/webserver.d.ts +36 -0
- package/dist/types/adapters/dsh/webserver.d.ts.map +1 -0
- package/dist/types/auth/password.d.ts +12 -0
- package/dist/types/auth/password.d.ts.map +1 -0
- package/dist/types/auth/service.d.ts +90 -0
- package/dist/types/auth/service.d.ts.map +1 -0
- package/dist/types/auth/sessions.d.ts +8 -0
- package/dist/types/auth/sessions.d.ts.map +1 -0
- package/dist/types/auth/totp.d.ts +10 -0
- package/dist/types/auth/totp.d.ts.map +1 -0
- package/dist/types/cli/index.d.ts +3 -0
- package/dist/types/cli/index.d.ts.map +1 -0
- package/dist/types/cli/ipc-client.d.ts +18 -0
- package/dist/types/cli/ipc-client.d.ts.map +1 -0
- package/dist/types/cli/language.d.ts +14 -0
- package/dist/types/cli/language.d.ts.map +1 -0
- package/dist/types/cli/profile.d.ts +10 -0
- package/dist/types/cli/profile.d.ts.map +1 -0
- package/dist/types/cli/prompt.d.ts +20 -0
- package/dist/types/cli/prompt.d.ts.map +1 -0
- package/dist/types/config.d.ts +27 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/http/admin-socket.d.ts +18 -0
- package/dist/types/http/admin-socket.d.ts.map +1 -0
- package/dist/types/http/connections.d.ts +21 -0
- package/dist/types/http/connections.d.ts.map +1 -0
- package/dist/types/http/gate.d.ts +24 -0
- package/dist/types/http/gate.d.ts.map +1 -0
- package/dist/types/http/origin-policy.d.ts +35 -0
- package/dist/types/http/origin-policy.d.ts.map +1 -0
- package/dist/types/http/origin.d.ts +5 -0
- package/dist/types/http/origin.d.ts.map +1 -0
- package/dist/types/http/request-context.d.ts +5 -0
- package/dist/types/http/request-context.d.ts.map +1 -0
- package/dist/types/http/routes.d.ts +15 -0
- package/dist/types/http/routes.d.ts.map +1 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/shared/admin-contract.d.ts +40 -0
- package/dist/types/shared/admin-contract.d.ts.map +1 -0
- package/dist/types/shared/auth-contract.d.ts +33 -0
- package/dist/types/shared/auth-contract.d.ts.map +1 -0
- package/dist/types/shared/i18n.d.ts +323 -0
- package/dist/types/shared/i18n.d.ts.map +1 -0
- package/dist/types/shared/locales/en.d.ts +151 -0
- package/dist/types/shared/locales/en.d.ts.map +1 -0
- package/dist/types/shared/locales/zh.d.ts +150 -0
- package/dist/types/shared/locales/zh.d.ts.map +1 -0
- package/dist/types/storage/lock.d.ts +17 -0
- package/dist/types/storage/lock.d.ts.map +1 -0
- package/dist/types/storage/state.d.ts +34 -0
- package/dist/types/storage/state.d.ts.map +1 -0
- package/dist/types/storage/store.d.ts +30 -0
- package/dist/types/storage/store.d.ts.map +1 -0
- package/docs/deployment.md +89 -0
- package/docs/deployment.zh-CN.md +89 -0
- package/docs/development.md +43 -0
- package/docs/development.zh-CN.md +43 -0
- package/docs/releasing.md +44 -0
- package/docs/releasing.zh-CN.md +44 -0
- package/docs/reverse-proxy.md +27 -0
- package/docs/reverse-proxy.zh-CN.md +27 -0
- package/examples/nginx.conf +27 -0
- package/examples/traefik-dsh.yml +20 -0
- package/examples/web-profile-auth-remote.patch.yml +14 -0
- package/package.json +112 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[简体中文](CHANGELOG.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
This file records user-visible changes to the released package. Version numbers follow the package's `package.json`; release tags use the same number with a `v` prefix. Add changes under Unreleased while developing, then move them to a dated version before tagging.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
No changes recorded yet.
|
|
10
|
+
|
|
11
|
+
## 0.1.0 - 2026-09-28
|
|
12
|
+
|
|
13
|
+
- Initial public release of the single-user DSH remote authentication plugin.
|
|
14
|
+
- Added password sign-in, TOTP setup, one-use backup codes, and revocable sessions.
|
|
15
|
+
- Added browser route, API, stream, and WebSocket protection plus profile administration commands.
|
|
16
|
+
- Added English and Chinese deployment, development, and test documentation.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 更新日志
|
|
2
|
+
|
|
3
|
+
[English](CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
本文记录已发布包的用户可见变化。版本号与 `package.json` 一致;发布标签在版本号前加 `v`。开发期间先将变更写入“未发布”,打标签前再移入带日期的版本条目。
|
|
6
|
+
|
|
7
|
+
## 未发布
|
|
8
|
+
|
|
9
|
+
暂无记录。
|
|
10
|
+
|
|
11
|
+
## 0.1.0 - 2026-09-28
|
|
12
|
+
|
|
13
|
+
- 首次公开发布 DSH 单用户远程认证插件。
|
|
14
|
+
- 提供密码登录、TOTP 绑定、一次性备用码和可撤销会话。
|
|
15
|
+
- 保护浏览器路由、API、流式响应和 WebSocket,并提供 profile 管理命令。
|
|
16
|
+
- 提供中英文部署、开发和测试文档。
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[简体中文](CONTRIBUTING.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Thanks for helping improve dsh-auth-remote. Changes to authentication or deployment behavior need a clear description of the security impact and a way to verify the result. Do not include exploit details or secrets in public issues. If GitHub private vulnerability reporting is available, use it; otherwise request a private contact channel without posting technical details.
|
|
6
|
+
|
|
7
|
+
## Prepare a checkout
|
|
8
|
+
|
|
9
|
+
Use Linux with `/proc`, Node.js 24 or newer, and pnpm 12.5.1. Install dependencies and the managed browser from the repository root:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm install --frozen-lockfile
|
|
13
|
+
pnpm exec playwright install chromium
|
|
14
|
+
pnpm check
|
|
15
|
+
```
|
|
16
|
+
|
|
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
|
+
|
|
19
|
+
## Open a pull request
|
|
20
|
+
|
|
21
|
+
Create a focused branch from `master`. Include the reason for the change, its user-facing effect, tests run, and any migration or deployment steps. Update English and Chinese guides together when behavior changes. Add a short entry to the Unreleased section of both changelogs. Keep generated `dist/`, `artifacts/`, runtime data, secrets, and local profiles out of commits.
|
|
22
|
+
|
|
23
|
+
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.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# 参与贡献
|
|
2
|
+
|
|
3
|
+
[English](CONTRIBUTING.md)
|
|
4
|
+
|
|
5
|
+
感谢改进 dsh-auth-remote。认证或部署行为的改动应说明安全影响,并提供可验证的结果。不要在公开 issue 中提供漏洞细节或密钥。如果 GitHub 私密漏洞报告已启用,请使用该渠道;否则仅请求私下联系渠道,不要公开技术细节。
|
|
6
|
+
|
|
7
|
+
## 准备源码环境
|
|
8
|
+
|
|
9
|
+
使用带 `/proc` 的 Linux、Node.js 24 或更高版本、pnpm 12.5.1。在仓库根目录安装依赖和测试浏览器:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm install --frozen-lockfile
|
|
13
|
+
pnpm exec playwright install chromium
|
|
14
|
+
pnpm check
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
[开发指南](docs/development.zh-CN.md)说明隔离的 DSH 运行时与完整测试范围。改动打包时执行 `pnpm pack:local`;改动安装或启动时再执行 `pnpm smoke`。测试使用临时 profile;真实账号文件与凭据不得进入仓库。
|
|
18
|
+
|
|
19
|
+
## 提交 Pull Request
|
|
20
|
+
|
|
21
|
+
从 `master` 创建专用分支。说明改动原因、用户可见效果、已运行的测试,以及迁移或部署步骤。行为变化需要同步修改中英文指南,并在两份更新日志的“未发布”部分补一条简短记录。不要提交生成的 `dist/`、`artifacts/`、运行时数据、密钥或本地 profile。
|
|
22
|
+
|
|
23
|
+
`CI Verify` 会在 Pull Request 和合入 `master` 后运行。维护者在创建发布标签前更新版本号和带日期的更新日志;具体流程见[发布指南](docs/releasing.zh-CN.md)。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ChenLuoi and dsh-auth-remote contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# dsh-auth-remote
|
|
2
|
+
|
|
3
|
+
[简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Single-user remote sign-in for DeepSeek Harness (DSH), with password, TOTP, one-use backup codes, and revocable sessions. The package runs inside DSH and guards its browser routes, APIs, streams, and WebSockets.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Linux with `/proc`, Node.js 24 or newer, pnpm 12.5.1, and the tested DSH **0.1.7-rc.1** runtime.
|
|
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
|
+
- For 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
|
+
|
|
13
|
+
## Minimal local installation from source
|
|
14
|
+
|
|
15
|
+
From a source checkout:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm install --frozen-lockfile
|
|
19
|
+
pnpm pack:local
|
|
20
|
+
dsh --version
|
|
21
|
+
dsh plugin --profile web add "$PWD/artifacts/dsh-auth-remote-0.1.0.tgz"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Check that `dsh --version` prints `0.1.7-rc.1`. Run the commands from the checkout so `$PWD` names the built archive; DSH runs the plugin installer inside the profile directory. `pnpm pack:local` builds and checks a local archive; it does not publish one. These `dsh` commands use the default data directory. An isolated development runtime can be prepared with `pnpm dev:prepare`; see the [development guide](docs/development.md).
|
|
25
|
+
|
|
26
|
+
## Configure the web profile
|
|
27
|
+
|
|
28
|
+
The installed bundle supplies the auth listener with `allowedOrigins: []`, so only literal loopback hosts are admitted. 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` URL; unauthenticated browser navigation redirects to sign-in. Check `/auth-remote/ready` before relying on the listener. Startup prints the listener and configured public origins without a native `?token=` URL.
|
|
29
|
+
|
|
30
|
+
For a public HTTPS origin, use the complete [profile configuration and deployment steps](docs/deployment.md). Its reusable [profile example](examples/web-profile-auth-remote.patch.yml) registers `https://dsh.example.com` and recommends an independent native-listener disable. Replace the example hostname and port consistently before opening a proxy.
|
|
31
|
+
|
|
32
|
+
If a downstream route needs the original public Host, add its path to `preserveOriginPaths`. The bundle configures native Connection trust from `allowedOrigins`; no separate Connection profile row is needed.
|
|
33
|
+
|
|
34
|
+
## Initialize the account
|
|
35
|
+
|
|
36
|
+
Run this in a real terminal against the **same** default `web` profile as the service:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
dsh plugin --profile web exec dsh-auth-remote init --lang en
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Enter one username and a password of 12–256 Unicode characters. The password is not a command-line argument and is not echoed. The login page guides an uninitialized profile back to this command; it cannot create the account. With the default `requireTotp: true`, the first password sign-in requires authenticator setup. Save the ten backup codes when shown: each works once and the list cannot be retrieved later.
|
|
43
|
+
|
|
44
|
+
## Sign in and manage the account
|
|
45
|
+
|
|
46
|
+
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.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dsh plugin --profile web exec dsh-auth-remote status --json
|
|
50
|
+
dsh plugin --profile web exec dsh-auth-remote reset-password --lang en
|
|
51
|
+
dsh plugin --profile web exec dsh-auth-remote reset-totp --lang en
|
|
52
|
+
dsh plugin --profile web exec dsh-auth-remote revoke-sessions --lang en
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Mutating commands require an interactive confirmation. Online commands use a private Unix socket; offline commands acquire the same profile lock. If a management response is lost after submission, check `status` before deciding whether to try again. `status --json` keeps its machine-readable keys regardless of language.
|
|
56
|
+
|
|
57
|
+
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).
|
|
58
|
+
|
|
59
|
+
## Put a proxy in front
|
|
60
|
+
|
|
61
|
+
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; register its exact HTTPS origin in `allowedOrigins`. Keep the DSH listener private and do not cache authentication responses.
|
|
62
|
+
|
|
63
|
+
## Project and maintenance
|
|
64
|
+
|
|
65
|
+
The plugin uses DSH's WebServer, Connection, settings slots, and official workspace browser and preview. It stores one account plus sessions in a private profile JSON file. It provides single-user access without a separate identity server. See [development](docs/development.md) and [deployment](docs/deployment.md) for checks and boundaries. Changes and releases are recorded in the [changelog](CHANGELOG.md); see [contributing](CONTRIBUTING.md), [releasing](docs/releasing.md), and the [MIT license](LICENSE).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# dsh-auth-remote
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、一次性备用码和可撤销会话。插件运行在 DSH 进程内,保护浏览器页面、API、流式响应和 WebSocket。
|
|
6
|
+
|
|
7
|
+
## 前置条件
|
|
8
|
+
|
|
9
|
+
- Linux(含 `/proc`)、Node.js 24 或更高版本、pnpm 12.5.1,以及已测试的 DSH **0.1.7-rc.1** 运行时。
|
|
10
|
+
- DSH 默认的 `~/.dsh` 数据目录和 `web` profile。账号状态属于该 profile,不与其他 profile 共用。
|
|
11
|
+
- 浏览器测试先执行 `pnpm exec playwright install chromium`。测试使用 Playwright 管理的浏览器和专用自签 TLS 夹具。
|
|
12
|
+
|
|
13
|
+
## 从源码最小化本地安装
|
|
14
|
+
|
|
15
|
+
在源码检出目录执行:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm install --frozen-lockfile
|
|
19
|
+
pnpm pack:local
|
|
20
|
+
dsh --version
|
|
21
|
+
dsh plugin --profile web add "$PWD/artifacts/dsh-auth-remote-0.1.0.tgz"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
确认 `dsh --version` 输出 `0.1.7-rc.1`。在源码目录运行命令,使 `$PWD` 指向生成的压缩包;DSH 会在 profile 目录执行插件安装。`pnpm pack:local` 只构建、检查本地压缩包,不发布。这些 `dsh` 命令使用默认数据目录。需要隔离开发运行时时可执行 `pnpm dev:prepare`;参见[开发指南](docs/development.zh-CN.md)。
|
|
25
|
+
|
|
26
|
+
## 配置 web profile
|
|
27
|
+
|
|
28
|
+
安装后的 bundle 提供认证监听,默认 `allowedOrigins: []`,因此只准入字面回环主机。最小安装无需修改 profile 补丁。用 `dsh web --no-open --port 13090` 启动,使用终端打印的 `http://127.0.0.1:13090` 地址;未登录的浏览器访问会跳转到登录页。使用监听前检查 `/auth-remote/ready`。启动输出包含监听地址和已配置的公网来源,不含原生 `?token=` 地址。
|
|
29
|
+
|
|
30
|
+
公网 HTTPS 入口请使用[部署指南](docs/deployment.zh-CN.md)的完整 profile 配置及步骤。可复用的 [profile 示例](examples/web-profile-auth-remote.patch.yml)登记 `https://dsh.example.com`,并建议在 profile 中独立禁用原生监听。开放代理前须一致地替换示例主机名和端口。
|
|
31
|
+
|
|
32
|
+
下游路由若需要原始公网 Host,可把其路径加入 `preserveOriginPaths`。bundle 会根据 `allowedOrigins` 自动配置原生 Connection 的信任地址,无需在 profile 中另写 Connection 条目。
|
|
33
|
+
|
|
34
|
+
## 初始化账号
|
|
35
|
+
|
|
36
|
+
在真实交互终端中,使用与服务**相同**的默认 `web` profile:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
dsh plugin --profile web exec dsh-auth-remote init --lang zh
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
输入一个用户名和 12–256 个 Unicode 字符的密码。密码不作为命令行参数传递,也不会回显。未初始化时登录页会提示该命令,但网页不能创建账号。默认 `requireTotp: true`,首次密码登录必须绑定身份验证器。显示十个备用码时立即妥善保存:每个只能用一次,之后不能重新查看列表。
|
|
43
|
+
|
|
44
|
+
## 登录与账号管理
|
|
45
|
+
|
|
46
|
+
最小化安装时访问本机回环地址;配置公网入口后访问 `https://dsh.example.com/auth-remote/login`。DSH 内的安全设置可以修改密码、绑定 TOTP、在策略允许时关闭 TOTP,以及撤销会话。密码或第二因素变更会撤销已有会话。会话默认固定有效 168 小时,服务重启后仍保留。
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dsh plugin --profile web exec dsh-auth-remote status --json
|
|
50
|
+
dsh plugin --profile web exec dsh-auth-remote reset-password --lang zh
|
|
51
|
+
dsh plugin --profile web exec dsh-auth-remote reset-totp --lang zh
|
|
52
|
+
dsh plugin --profile web exec dsh-auth-remote revoke-sessions --lang zh
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
修改命令需要交互确认。在线命令走私有 Unix socket;离线命令取得同一 profile 锁。如果管理请求已提交但响应丢失,先运行 `status` 再判断是否重试。`status --json` 的机器字段不随语言变化。
|
|
56
|
+
|
|
57
|
+
内嵌安全页跟随 DSH 语言设置。独立登录页默认英文,仅在 `localStorage["dsh-auth-remote.locale"]` 保存 `en` 或 `zh`,登录前不读取 DSH 设置。CLI 人类文案由 `--lang en|zh` 指定;未指定时取首个非空的 `LC_ALL`、`LC_MESSAGES`、`LANG`(中文变体为 `zh`,其他为英文)。
|
|
58
|
+
|
|
59
|
+
## 接入反向代理
|
|
60
|
+
|
|
61
|
+
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS 可在代理终止,但 `allowedOrigins` 必须登记精确的 HTTPS 来源。保持 DSH 监听私有,且不要缓存认证响应。
|
|
62
|
+
|
|
63
|
+
## 项目与维护
|
|
64
|
+
|
|
65
|
+
插件复用 DSH 的 WebServer、Connection、设置 slot、官方工作区浏览与预览。一个账号及其会话存储在 profile 的私有 JSON 文件中;无需独立身份服务。检查和边界参见[开发](docs/development.zh-CN.md)与[部署](docs/deployment.zh-CN.md)。变更记录见[更新日志](CHANGELOG.zh-CN.md);参与项目可阅读[贡献指南](CONTRIBUTING.zh-CN.md)、[发布指南](docs/releasing.zh-CN.md)及 [MIT 协议](LICENSE)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Bundle baseline: replace the native listener with the authenticated WebServer.
|
|
2
|
+
# The plugin reads the listener address from the official web-startup service.
|
|
3
|
+
# A profile-level disable is recommended when protection against a skipped
|
|
4
|
+
# bundle is desired; the bundle itself disables the native row while active.
|
|
5
|
+
- id: webserver
|
|
6
|
+
disabled: true
|
|
7
|
+
|
|
8
|
+
# Keep the native Web surface and trust settings, but replace its token URL
|
|
9
|
+
# announcement and browser handoff with auth-remote startup URLs.
|
|
10
|
+
- id: web-runtime
|
|
11
|
+
inject: [webStartup]
|
|
12
|
+
config:
|
|
13
|
+
openBrowser: false
|
|
14
|
+
printUrl: false
|
|
15
|
+
surfaceContext: true
|
|
16
|
+
trustedHosts: !!js ctx.webStartup.trustedHosts
|
|
17
|
+
|
|
18
|
+
- insert:
|
|
19
|
+
- id: auth-remote
|
|
20
|
+
name: dsh-auth-remote
|
|
21
|
+
inject: [webStartup]
|
|
22
|
+
config:
|
|
23
|
+
allowedOrigins: []
|
|
24
|
+
requireTotp: true
|
|
25
|
+
sessionHours: 168
|
|
26
|
+
preserveOriginPaths: []
|
|
27
|
+
|
|
28
|
+
# Connection starts after the authenticated listener and receives public
|
|
29
|
+
# authorities only when a preserved path needs the original browser Host.
|
|
30
|
+
- id: connection
|
|
31
|
+
inject: [webRuntime, webServer]
|
|
32
|
+
config:
|
|
33
|
+
trustedHosts: !!js '[...ctx.webRuntime.trustedHosts, ...ctx.webServer.connectionTrustedHosts]'
|
|
34
|
+
|
|
35
|
+
# Reuse the official browser directory picker.
|
|
36
|
+
- id: directory-picker
|
|
37
|
+
disabled: true
|
|
38
|
+
|
|
39
|
+
- insert:
|
|
40
|
+
- id: auth-remote-directory-picker
|
|
41
|
+
name: '@deepseek-ai/dsh-host-directory-picker-browse'
|
|
42
|
+
config:
|
|
43
|
+
maxEntries: 1000
|
|
44
|
+
- id: auth-remote-directory-picker-ui
|
|
45
|
+
name: '@deepseek-ai/dsh-client-ui-directory-picker-browse'
|