dsh-auth-remote 0.1.5 → 0.1.6
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 -0
- package/CHANGELOG.zh-CN.md +8 -0
- package/CONTRIBUTING.md +2 -0
- package/CONTRIBUTING.zh-CN.md +2 -0
- package/README.md +16 -10
- package/README.zh-CN.md +16 -10
- package/cordis.patch.yml +4 -5
- package/dist/client.js +2 -2
- package/dist/client.js.map +2 -2
- package/dist/index.js +280 -87
- package/dist/index.js.map +4 -4
- package/dist/types/adapters/dsh/browser-auth.d.ts +3 -0
- package/dist/types/adapters/dsh/browser-auth.d.ts.map +1 -1
- package/dist/types/adapters/dsh/public-url.d.ts +10 -0
- package/dist/types/adapters/dsh/public-url.d.ts.map +1 -0
- package/dist/types/adapters/dsh/readiness.d.ts +2 -3
- package/dist/types/adapters/dsh/readiness.d.ts.map +1 -1
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts +46 -0
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts.map +1 -0
- package/dist/types/adapters/dsh/startup-urls.d.ts +2 -2
- package/dist/types/adapters/dsh/startup-urls.d.ts.map +1 -1
- package/dist/types/adapters/dsh/webserver.d.ts +8 -2
- package/dist/types/adapters/dsh/webserver.d.ts.map +1 -1
- package/dist/types/config.d.ts +48 -14
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/http/gate.d.ts +1 -2
- package/dist/types/http/gate.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/docs/deployment.md +83 -38
- package/docs/deployment.zh-CN.md +84 -39
- package/docs/development.md +9 -5
- package/docs/development.zh-CN.md +9 -5
- package/docs/legacy-compatibility.md +115 -0
- package/docs/releasing.md +7 -5
- package/docs/releasing.zh-CN.md +7 -5
- package/docs/reverse-proxy.md +7 -5
- package/docs/reverse-proxy.zh-CN.md +7 -5
- package/examples/web-profile-auth-remote.patch.yml +7 -3
- package/package.json +9 -8
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[English](reverse-proxy.md)
|
|
4
4
|
|
|
5
|
-
DSH Auth Remote 会先验证浏览器 authority,再为 DSH
|
|
5
|
+
DSH Auth Remote 会先验证浏览器 authority,再为 DSH 改写已认证流量。选择唯一 HTTP(S) 根地址,设置为 `publicUrl`,例如 `https://dsh.example.com/`。它配置准入和公布入口,不改变代理路由或 TLS。桥接无需额外 Connection 条目或 `--trusted-host`。TLS 可以在代理终止,DSH 继续监听私有 HTTP。
|
|
6
6
|
|
|
7
7
|
## 回环直连
|
|
8
8
|
|
|
9
|
-
按 [profile 示例](../examples/web-profile-auth-remote.patch.yml),DSH 绑定 `127.0.0.1:13090`。同机浏览器可以使用 `http://127.0.0.1:13090
|
|
9
|
+
按 [profile 示例](../examples/web-profile-auth-remote.patch.yml),DSH 绑定 `127.0.0.1:13090`。同机浏览器可以使用 `http://127.0.0.1:13090/`。字面 `localhost`、规范 `127.0.0.0/8` 和方括号 `::1` 隐式准入,实际监听须可达。IPv4-mapped IPv6 回环来源只有作为生效 `publicUrl` 时才准入,可以显式配置,也可以从监听地址派生。alpha.2 的 IPv6 HTTP/HTTPS 监听见[原生传输配置](deployment.zh-CN.md#原生-https-与-ipv6)。认证 bundle 禁用原生 `webserver`,并建议 profile 独立禁用。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
准入为唯一生效公开来源加字面回环;未设置公开 URL 时,根据实际监听协议、地址、端口派生唯一根地址。只支持根路径,拒绝子路径、查询、片段、凭据。修改请求和 WebSocket 升级的 Origin 须匹配 Host,额外 CLI 原生 trusted hosts 不扩大策略。无 Origin 且协议不明的 GET 不能写入或清除认证 Cookie。变更旧数组前参阅[旧字段迁移](deployment.zh-CN.md#迁移旧-allowedorigins)。
|
|
12
12
|
|
|
13
13
|
## Nginx 外部 TLS
|
|
14
14
|
|
|
@@ -16,12 +16,14 @@ DSH Auth Remote 会先验证浏览器 authority,再为 DSH 改写已认证流
|
|
|
16
16
|
|
|
17
17
|
用 `$http_host` 保留含非默认端口的原始 Host,用 `$http_origin` 转交真实 Origin。Nginx 必须显式转交 WebSocket 的 `Upgrade` 和映射后的 `Connection`。上游 HTTP/1.1、关闭响应缓冲/缓存与请求缓冲、加长读写超时,保障事件流、上传和长连接。不要把 Origin 改成上游 URL,也不要删除浏览器修改请求的 Origin。代理不应缓存登录、状态或已认证响应。
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
示例设置 `publicUrl: https://dsh.example.com/`;公网 `:8443` 则使用 `https://dsh.example.com:8443/`,转发 Host 保留端口。插件 Secure Cookie 跟随已验证外部 HTTPS 来源,不取私有 HTTP socket 或转发协议提示。仅在路径需要原始公网 Host 时加入 `preserveOriginPaths`,原生 Connection 信任自动取最终来源。
|
|
20
20
|
|
|
21
21
|
## Traefik 外部 TLS
|
|
22
22
|
|
|
23
23
|
[Traefik file-provider 示例](../examples/traefik-dsh.yml)定义一个 Host router、可替换的 TLS resolver 和上游 URL、`passHostHeader: true` 及即时响应刷新。根据实际 Traefik 网络提供私有可达上游。示例刻意不配置删除 Origin、改写 Host 或缓存响应的 middleware;外围代理栈应保留 WebSocket 与流的转发。
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
使用唯一规范公开入口,在请求到达受保护上游前,把其他主机名导向该入口。入口变更后替换 `publicUrl` 并重启,核对新根地址以及旧非回环来源被拒绝。检查匿名跳转/API 拒绝、密码加 TOTP、Cookie、设置、WebSocket、SSE、上传、预览及撤销。`/auth-remote/ready` 返回预期插件/协议与 `ready: true` 前保持访问私有。
|
|
26
|
+
|
|
27
|
+
alpha.2 原生 HTTPS 上游也可位于公开 HTTP 或 HTTPS 代理后。使用 HTTPS 上游 URL,配置代理的上游证书验证和与证书对应的 hostname/SNI。插件 Cookie 按外部入口协议,服务端原生 Cookie 按监听的 HTTPS audience/Secure;两个协议不同时仍保留 Host/Origin。文件和 CLI 相对证书路径基准不同,见[路径规则](deployment.zh-CN.md#配置优先级与路径基准)。
|
|
26
28
|
|
|
27
29
|
认证门禁不会用 `Forwarded` 或 `X-Forwarded-*` 作信任判断,避免把客户端可伪造提示当成 TLS 或主机证明。源码检出的浏览器套件使用自有 Node HTTP/HTTPS 转发器测试这些规则,不运行 Nginx 或 Traefik 二进制。
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# Merge these rows into the web profile's cordis.patch.yml. Keep unrelated
|
|
2
2
|
# model and plugin rows. Install this package into the same profile first.
|
|
3
|
-
# Replace dsh.example.com in the public
|
|
4
|
-
#
|
|
3
|
+
# Replace dsh.example.com in the unique public root URL. This example uses
|
|
4
|
+
# HTTP behind a TLS proxy. CLI --host/--port override the file individually.
|
|
5
|
+
# For alpha.2 native TLS, supply both tlsCert and tlsKey; relative file paths
|
|
6
|
+
# resolve from this profile directory, while CLI TLS paths resolve from cwd.
|
|
5
7
|
# Disabling the native row here is recommended for an independent fallback.
|
|
6
8
|
- id: webserver
|
|
7
9
|
disabled: true
|
|
8
10
|
|
|
9
11
|
- id: auth-remote
|
|
10
12
|
config:
|
|
11
|
-
|
|
13
|
+
publicUrl: https://dsh.example.com/
|
|
14
|
+
host: 127.0.0.1
|
|
15
|
+
port: 13090
|
|
12
16
|
requireTotp: true
|
|
13
17
|
sessionHours: 168
|
|
14
18
|
preserveOriginPaths: []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-auth-remote",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Single-user remote authentication for DeepSeek Harness: password, TOTP and revocable sessions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@deepseek-ai/cordis": "4.0.5-alpha.1",
|
|
55
|
-
"@deepseek-ai/dsh-client-connection": "0.2.1-alpha.
|
|
56
|
-
"@deepseek-ai/dsh-client-locale": "0.2.1-alpha.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-scope": "0.2.1-alpha.
|
|
55
|
+
"@deepseek-ai/dsh-client-connection": "0.2.1-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.2",
|
|
61
61
|
"@deepseek-ai/schemastery": "3.18.5-alpha.1",
|
|
62
62
|
"@playwright/test": "1.63.0",
|
|
63
63
|
"@types/node": "24.13.6",
|
|
@@ -90,7 +90,8 @@
|
|
|
90
90
|
"0.1.7-rc.2": "compatible",
|
|
91
91
|
"0.2.0-rc.1": "compatible",
|
|
92
92
|
"0.2.0-rc.2": "compatible",
|
|
93
|
-
"0.2.1-alpha.1": "compatible"
|
|
93
|
+
"0.2.1-alpha.1": "compatible",
|
|
94
|
+
"0.2.1-alpha.2": "compatible"
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
},
|