dsh-auth-remote 0.1.3 → 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 +14 -0
- package/CHANGELOG.zh-CN.md +14 -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 +11 -5
- package/docs/development.zh-CN.md +11 -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 +19 -10
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ This file records user-visible changes to the released package. Version numbers
|
|
|
8
8
|
|
|
9
9
|
No changes recorded yet.
|
|
10
10
|
|
|
11
|
+
## 0.1.6 - 2026-10-10
|
|
12
|
+
|
|
13
|
+
- Use DSH 0.2.1-alpha.2 for development and default verification, repair native WebServer/Connection composition, and retain all six declared releases in the CLI, smoke and browser CI matrix.
|
|
14
|
+
- Select one top-level `publicUrl`; resolve CLI/file listener settings before startup and derive missing URLs only after the actual port binds. Alpha.1/2 native Web prompts and `DSH_WEB_URL` use that final root; older runtimes keep their own model-side projection.
|
|
15
|
+
- Support alpha.2 native concrete IPv6 and HTTPS through the official listener, with whole-pair `tlsCert`/`tlsKey` overrides and explicit profile-versus-cwd path rules. Native cookies follow the listener protocol, while browser cookies follow the effective external origin. Preserve guarded uploads, streams, upgrades and revocation through both proxy protocol directions.
|
|
16
|
+
- Migrate legacy zero/single `allowedOrigins` inputs in memory with one warning per activation. Multiple entries and explicit coexistence with file/CLI `publicUrl` fail; existing multi-entry profiles must choose one root. Account state and profile files are not rewritten.
|
|
17
|
+
- Document the six-version capability matrix, native TLS/IPv6 setup and migration in both languages. Add a single Chinese legacy inventory with separate runtime and plugin-contract retirement rules; keep task files, test keys and runtime data outside the npm archive.
|
|
18
|
+
|
|
19
|
+
## 0.1.5 - 2026-10-03
|
|
20
|
+
|
|
21
|
+
- Verify DSH 0.2.1-alpha.1 with the existing authentication implementation and add it to the CLI, installation smoke, and browser CI matrix, retaining all previously tested versions.
|
|
22
|
+
- Declare all verified releases in `dsh.compatibility.dshReleases` and use DSH 0.2.1-alpha.1 as the default development, test, and release runtime; update pinned dependencies and bilingual guides.
|
|
23
|
+
- Wait for the native API key onboarding prompt before interacting with Host settings or the workspace picker, preventing delayed host dialogs from blocking browser verification.
|
|
24
|
+
|
|
11
25
|
## 0.1.3 - 2026-09-30
|
|
12
26
|
|
|
13
27
|
- Verify DSH 0.2.0-rc.2 and add it to the CLI, installation smoke, and browser CI matrix, retaining all previously tested versions.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
暂无记录。
|
|
10
10
|
|
|
11
|
+
## 0.1.6 - 2026-10-10
|
|
12
|
+
|
|
13
|
+
- 开发与默认验证运行时升级为 DSH 0.2.1-alpha.2,修复原生 WebServer/Connection 组合,CLI、smoke 和浏览器 CI 矩阵保留六个声明版本。
|
|
14
|
+
- 使用唯一顶层 `publicUrl`;启动前解析 CLI/文件监听参数,缺省 URL 在实际端口绑定后派生。alpha.1/2 原生 Web 提示和 `DSH_WEB_URL` 使用最终根地址,旧运行时保留自身模型侧投影。
|
|
15
|
+
- 通过官方监听支持 alpha.2 原生具体 IPv6 和 HTTPS;`tlsCert`/`tlsKey` 整组覆盖,明确 profile 与 cwd 路径基准。原生 Cookie 跟随监听协议,浏览器 Cookie 跟随生效外部来源,两种代理协议方向均保留上传、流、升级及撤销门禁。
|
|
16
|
+
- 旧 `allowedOrigins` 零项/单项在内存迁移,每次激活告警一次。多项及任意与文件/CLI `publicUrl` 显式共存报错;旧多入口 profile 须选择唯一根地址。不改写账号状态或 profile 文件。
|
|
17
|
+
- 双语说明六版能力矩阵、原生 TLS/IPv6 配置和迁移;新增单一中文 legacy 清单,区分 runtime 与插件契约退役规则;任务文件、测试密钥和运行数据不入 npm 包。
|
|
18
|
+
|
|
19
|
+
## 0.1.5 - 2026-10-03
|
|
20
|
+
|
|
21
|
+
- 验证现有认证实现可直接支持 DSH 0.2.1-alpha.1,将其加入 CLI、安装冒烟和浏览器 CI 矩阵,并保留之前已测试的所有版本。
|
|
22
|
+
- 在 `dsh.compatibility.dshReleases` 中声明已验证版本,将默认开发、测试和发布运行时升级为 DSH 0.2.1-alpha.1,同步更新锁定依赖与中英文指南。
|
|
23
|
+
- 操作宿主设置或工作区选择器前,等待并完成原生 API Key 引导,避免迟到的宿主弹窗阻塞浏览器验证。
|
|
24
|
+
|
|
11
25
|
## 0.1.3 - 2026-09-30
|
|
12
26
|
|
|
13
27
|
- 验证 DSH 0.2.0-rc.2,将其加入 CLI、安装冒烟和浏览器 CI 矩阵,并保留之前已测试的所有版本。
|
package/CONTRIBUTING.md
CHANGED
|
@@ -16,6 +16,8 @@ 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) (maintained in Chinese). 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 and update the inventory when compatibility code changes.
|
|
20
|
+
|
|
19
21
|
## Open a pull request
|
|
20
22
|
|
|
21
23
|
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.
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
感谢改进 dsh-auth-remote。认证或部署行为的改动应说明安全影响,并提供可验证的结果。不要在公开 issue 中提供漏洞细节或密钥。如果 GitHub 私密漏洞报告已启用,请使用该渠道;否则仅请求私下联系渠道,不要公开技术细节。
|
|
6
6
|
|
|
7
|
+
修改支持版本前,先阅读 [Legacy 兼容维护清单](docs/legacy-compatibility.md),共同检查 manifest peers/兼容声明、运行时准入、测试目标、CI 矩阵及用户声明。适用 DSH 与支持集合无交集时须同次删除专属适配并更新清单;旧插件配置按自身迁移策略退役。保留共享安全逻辑,兼容代码变更同步维护清单。
|
|
8
|
+
|
|
7
9
|
## 准备源码环境
|
|
8
10
|
|
|
9
11
|
使用带 `/proc` 的 Linux、Node.js 24 或更高版本、pnpm 12.5.1。在仓库根目录安装依赖和测试浏览器:
|
package/README.md
CHANGED
|
@@ -6,17 +6,23 @@ 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
|
|
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.2** (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
|
-
|
|
15
|
+
Compatibility is declared for the six releases above in `dsh.compatibility.dshReleases`; development defaults to **0.2.1-alpha.2**. The host peer declaration and runtime version check both use `>=0.1.7-rc.1`, with no upper bound, including prereleases.
|
|
16
16
|
|
|
17
|
-
|
|
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/rc.2, 0.2.0-rc.1/rc.2 | Yes | No `--public-url`; native model-side URL remains `http://127.0.0.1:<actual-port>` | Unsupported |
|
|
20
|
+
| 0.2.1-alpha.1 | Yes | Yes; uses the plugin's final public root | Unsupported |
|
|
21
|
+
| 0.2.1-alpha.2 | Yes | Yes; uses the plugin's final public root | Yes, through the official listener |
|
|
18
22
|
|
|
19
|
-
|
|
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 six declared versions.
|
|
24
|
+
|
|
25
|
+
The plugin's single-entry configuration works on all six releases. Native IPv6/TLS needs alpha.2; an external HTTPS proxy can serve older HTTP listeners. For source builds, see the [development guide](docs/development.md).
|
|
20
26
|
|
|
21
27
|
## Install from npm
|
|
22
28
|
|
|
@@ -24,19 +30,19 @@ With DSH installed, verify its version and install the published plugin into the
|
|
|
24
30
|
|
|
25
31
|
```sh
|
|
26
32
|
dsh --version
|
|
27
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
33
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.6
|
|
28
34
|
dsh plugin --profile web list
|
|
29
35
|
```
|
|
30
36
|
|
|
31
|
-
Check that `dsh --version` prints `0.2.
|
|
37
|
+
Check that `dsh --version` prints `0.2.1-alpha.2` (or another compatible release above) and the plugin list includes `dsh-auth-remote@0.1.6`. These commands use DSH's default data directory. For source builds and an isolated development runtime, see the [development guide](docs/development.md).
|
|
32
38
|
|
|
33
39
|
## Configure the web profile
|
|
34
40
|
|
|
35
|
-
The
|
|
41
|
+
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.
|
|
36
42
|
|
|
37
|
-
For a public HTTPS
|
|
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`. Alpha.2 also supports 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.
|
|
38
44
|
|
|
39
|
-
If a downstream route needs the original public Host, add its path to `preserveOriginPaths`.
|
|
45
|
+
If a downstream route needs the original public Host, add its path to `preserveOriginPaths`. Native Connection trust follows the final public origin; no extra `--trusted-host` or Connection row is needed. 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.
|
|
40
46
|
|
|
41
47
|
## Initialize the account
|
|
42
48
|
|
|
@@ -65,7 +71,7 @@ The embedded Security page follows DSH's language setting. The standalone login
|
|
|
65
71
|
|
|
66
72
|
## Put a proxy in front
|
|
67
73
|
|
|
68
|
-
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;
|
|
74
|
+
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.
|
|
69
75
|
|
|
70
76
|
## Project and maintenance
|
|
71
77
|
|
package/README.zh-CN.md
CHANGED
|
@@ -6,17 +6,23 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
6
6
|
|
|
7
7
|
## 前置条件
|
|
8
8
|
|
|
9
|
-
- Linux(含 `/proc`)、Node.js 24
|
|
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**(默认)。仅从源码构建时需要 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
|
-
|
|
15
|
+
`dsh.compatibility.dshReleases` 声明上述六个版本,开发默认使用 **0.2.1-alpha.2**。宿主 peer 声明和运行时版本检查统一使用 `>=0.1.7-rc.1`,不设上限且包含预发布版本。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
| DSH 版本 | 具体 IPv4 HTTP | 原生公开 URL CLI、Web 提示与 `DSH_WEB_URL` | 原生 IPv6 / HTTPS |
|
|
18
|
+
| -------------------------------- | -------------- | -------------------------------------------------------------------- | ----------------- |
|
|
19
|
+
| 0.1.7-rc.1/rc.2、0.2.0-rc.1/rc.2 | 支持 | 无 `--public-url`;原生模型侧 URL 保持 `http://127.0.0.1:<实际端口>` | 不支持 |
|
|
20
|
+
| 0.2.1-alpha.1 | 支持 | 支持;使用插件最终公开根地址 | 不支持 |
|
|
21
|
+
| 0.2.1-alpha.2 | 支持 | 支持;使用插件最终公开根地址 | 通过官方监听支持 |
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
后续版本属于向前准入,并不宣称已经逐版测试。插件仍检查必需的 WebServer/Connection 接口、宿主包实例一致性和原生认证交换。缺少能力时认证入口保持不可用并给出诊断。CI 在六个声明版本上运行 CLI、安装冒烟和浏览器回归。
|
|
24
|
+
|
|
25
|
+
六版均使用插件的单入口配置。原生 IPv6/TLS 需要 alpha.2;旧版 HTTP 监听可由外部 HTTPS 代理提供入口。源码构建参见[开发指南](docs/development.zh-CN.md)。
|
|
20
26
|
|
|
21
27
|
## 从 npm 安装
|
|
22
28
|
|
|
@@ -24,19 +30,19 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
24
30
|
|
|
25
31
|
```sh
|
|
26
32
|
dsh --version
|
|
27
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
33
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.6
|
|
28
34
|
dsh plugin --profile web list
|
|
29
35
|
```
|
|
30
36
|
|
|
31
|
-
确认 `dsh --version` 输出 `0.2.
|
|
37
|
+
确认 `dsh --version` 输出 `0.2.1-alpha.2`(或上文其他兼容版本),且插件列表中有 `dsh-auth-remote@0.1.6`。这些命令使用 DSH 默认数据目录。源码构建及隔离开发运行时参见[开发指南](docs/development.zh-CN.md)。
|
|
32
38
|
|
|
33
39
|
## 配置 web profile
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
最小安装无需修改 profile 补丁。用 `dsh web --no-open --port 13090` 启动,使用终端打印的 `http://127.0.0.1:13090/` 根地址。未显式设置 `publicUrl` 时,插件根据监听的实际协议、地址和绑定端口生成唯一根地址,包含 `--port 0` 的实际结果。未登录导航跳转登录页;使用服务前检查 `/auth-remote/ready`。启动输出包含监听地址和一个不同的公开根地址,不含原生 `?token=` URL。
|
|
36
42
|
|
|
37
|
-
公网 HTTPS 入口请使用[部署指南](docs/deployment.zh-CN.md)
|
|
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。
|
|
38
44
|
|
|
39
|
-
下游路由若需要原始公网 Host
|
|
45
|
+
下游路由若需要原始公网 Host,可把路径加入 `preserveOriginPaths`。原生 Connection 信任来自最终公开来源,无需额外 `--trusted-host` 或 Connection 条目。CLI 的 host/port 和公开 URL 覆盖文件值;TLS 按完整一对覆盖。升级 `allowedOrigins` 前阅读[迁移和路径规则](docs/deployment.zh-CN.md#配置优先级与路径基准):零项或单项在内存迁移并告警,多项及任意显式新旧字段共存报错。
|
|
40
46
|
|
|
41
47
|
## 初始化账号
|
|
42
48
|
|
|
@@ -65,7 +71,7 @@ dsh plugin --profile web exec dsh-auth-remote revoke-sessions --lang zh
|
|
|
65
71
|
|
|
66
72
|
## 接入反向代理
|
|
67
73
|
|
|
68
|
-
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS
|
|
74
|
+
参见[反向代理指南](docs/reverse-proxy.zh-CN.md)以及 [Nginx](examples/nginx.conf) 或 [Traefik](examples/traefik-dsh.yml) 示例。保留浏览器原始 Host、Origin、WebSocket 升级和流式响应。TLS 可在代理终止;把其精确 HTTPS 根地址设置为 `publicUrl`。保持 DSH 监听私有,且不要缓存认证响应。
|
|
69
75
|
|
|
70
76
|
## 项目与维护
|
|
71
77
|
|
package/cordis.patch.yml
CHANGED
|
@@ -8,19 +8,18 @@
|
|
|
8
8
|
# Keep the native Web surface and trust settings, but replace its token URL
|
|
9
9
|
# announcement and browser handoff with auth-remote startup URLs.
|
|
10
10
|
- id: web-runtime
|
|
11
|
-
inject: [webStartup]
|
|
11
|
+
inject: [webStartup, webServer]
|
|
12
12
|
config:
|
|
13
13
|
openBrowser: false
|
|
14
14
|
printUrl: false
|
|
15
|
+
publicUrl: !!js ctx.webServer.publicUrl
|
|
15
16
|
surfaceContext: true
|
|
16
|
-
trustedHosts: !!js ctx.webStartup.trustedHosts
|
|
17
17
|
|
|
18
18
|
- insert:
|
|
19
19
|
- id: auth-remote
|
|
20
20
|
name: dsh-auth-remote
|
|
21
21
|
inject: [webStartup]
|
|
22
22
|
config:
|
|
23
|
-
allowedOrigins: []
|
|
24
23
|
requireTotp: true
|
|
25
24
|
sessionHours: 168
|
|
26
25
|
preserveOriginPaths: []
|
|
@@ -28,9 +27,9 @@
|
|
|
28
27
|
# Connection starts after the authenticated listener and receives public
|
|
29
28
|
# authorities only when a preserved path needs the original browser Host.
|
|
30
29
|
- id: connection
|
|
31
|
-
inject: [
|
|
30
|
+
inject: [webStartup, webServer]
|
|
32
31
|
config:
|
|
33
|
-
trustedHosts: !!js '[...ctx.
|
|
32
|
+
trustedHosts: !!js '[...ctx.webStartup.trustedHosts, ...ctx.webServer.connectionTrustedHosts]'
|
|
34
33
|
|
|
35
34
|
# Reuse the official browser directory picker.
|
|
36
35
|
- id: directory-picker
|
package/dist/client.js
CHANGED
|
@@ -2154,8 +2154,8 @@ function assertRemoteHostCapability(ctx) {
|
|
|
2154
2154
|
if (typeof location === "undefined") return;
|
|
2155
2155
|
const connection = ctx.get("connection");
|
|
2156
2156
|
if (connection === void 0) throw new Error("auth-remote: browser Connection is missing");
|
|
2157
|
-
const hostname = location.hostname.toLowerCase();
|
|
2158
|
-
const loopback = hostname === "localhost" || hostname === "::1" || hostname.
|
|
2157
|
+
const hostname = location.hostname.toLowerCase().replace(/^\[|\]$/gu, "");
|
|
2158
|
+
const loopback = hostname === "localhost" || hostname === "::1" || /^127(?:\.[0-9]{1,3}){3}$/u.test(hostname) || /^::ffff:7f[0-9a-f]{2}:[0-9a-f]{1,4}$/u.test(hostname);
|
|
2159
2159
|
if (!loopback && connection.isLoopback !== true) {
|
|
2160
2160
|
throw new Error("auth-remote: Host settings capability was not installed before Connection");
|
|
2161
2161
|
}
|