dsh-auth-remote 0.1.9 → 0.1.10
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 +11 -0
- package/CHANGELOG.zh-CN.md +11 -0
- package/README.md +17 -11
- package/README.zh-CN.md +17 -11
- package/cordis.patch.yml +2 -1
- package/dist/cli.js +91 -46
- package/dist/cli.js.map +2 -2
- package/dist/client.js +2880 -581
- package/dist/client.js.map +4 -4
- package/dist/index.js +133 -36
- package/dist/index.js.map +3 -3
- package/dist/login.css +2 -8
- package/dist/login.css.map +2 -2
- package/dist/login.js +80 -42
- package/dist/login.js.map +2 -2
- package/dist/types/adapters/dsh/account-callback.d.ts +3 -0
- package/dist/types/adapters/dsh/account-callback.d.ts.map +1 -1
- package/dist/types/adapters/dsh/hmr-context.d.ts +10 -0
- package/dist/types/adapters/dsh/hmr-context.d.ts.map +1 -0
- package/dist/types/auth/service.d.ts +2 -0
- package/dist/types/auth/service.d.ts.map +1 -1
- package/dist/types/auth/sessions.d.ts +2 -0
- package/dist/types/auth/sessions.d.ts.map +1 -1
- package/dist/types/config.d.ts +9 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/http/account-login.d.ts +5 -3
- package/dist/types/http/account-login.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/account-login.d.ts +2 -1
- package/dist/types/shared/account-login.d.ts.map +1 -1
- package/dist/types/shared/auth-contract.d.ts +2 -0
- package/dist/types/shared/auth-contract.d.ts.map +1 -1
- package/dist/types/shared/i18n.d.ts +78 -40
- package/dist/types/shared/i18n.d.ts.map +1 -1
- package/dist/types/shared/locales/en.d.ts +39 -20
- package/dist/types/shared/locales/en.d.ts.map +1 -1
- package/dist/types/shared/locales/zh.d.ts +39 -20
- package/dist/types/shared/locales/zh.d.ts.map +1 -1
- package/docs/deployment.md +22 -19
- package/docs/deployment.zh-CN.md +22 -19
- package/docs/development.md +20 -8
- package/docs/development.zh-CN.md +20 -8
- package/docs/legacy-compatibility.md +86 -64
- package/docs/legacy-compatibility.zh-CN.md +86 -64
- package/docs/releasing.md +5 -5
- package/docs/releasing.zh-CN.md +5 -5
- package/examples/web-profile-auth-remote.patch.yml +4 -2
- package/package.json +18 -14
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
/** Human-facing text only. Protocol identifiers and command names stay unchanged. */
|
|
2
2
|
export declare const en: {
|
|
3
|
-
readonly brand: "DSH · Remote sign-in";
|
|
4
3
|
readonly errorNetwork: "Connection failed. Check your network and try again.";
|
|
5
4
|
readonly errorRateLimited: "Too many attempts. Try again in about {seconds} seconds.";
|
|
6
5
|
readonly errorUnauthorized: "Your session has expired. Sign in again.";
|
|
7
6
|
readonly errorServiceUnavailable: "The service is temporarily unavailable. Try again later.";
|
|
8
7
|
readonly errorGeneric: "The operation could not be completed. Try again.";
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
8
|
+
readonly accountLoginDisabled: "Manual account sign-in is disabled. Refresh this page to use the native sign-in entry.";
|
|
9
|
+
readonly settingsLoginConfiguration: "Sign-in preferences";
|
|
10
|
+
readonly settingsManualDescription: "Authorize in a new tab, then paste the callback address.";
|
|
11
|
+
readonly settingsManualAccountLogin: "Remote DeepSeek account sign-in";
|
|
12
|
+
readonly settingsManualConfigUnavailable: "Sign-in preferences are temporarily unavailable.";
|
|
13
|
+
readonly settingsManualUnavailable: "Manual account sign-in is unavailable in this DSH environment.";
|
|
14
|
+
readonly settingsManualSaveFailed: "Could not save this preference. Check the current value and try again.";
|
|
15
|
+
readonly settingsSaving: "Saving…";
|
|
16
|
+
readonly settingsRetry: "Retry";
|
|
17
|
+
readonly accountLoginTitle: "Sign in to DeepSeek";
|
|
18
|
+
readonly accountLoginStepOpen: "Sign in to DeepSeek in a new tab.";
|
|
19
|
+
readonly accountLoginStepCopy: "Copy the full address after authorization and paste it here.";
|
|
14
20
|
readonly accountLoginCallbackLabel: "Full callback address";
|
|
15
|
-
readonly accountLoginCallbackHint: "
|
|
16
|
-
readonly accountLoginOpen: "Open
|
|
21
|
+
readonly accountLoginCallbackHint: "A connection error or 404 after authorization is expected. Copy the full address.";
|
|
22
|
+
readonly accountLoginOpen: "Open sign-in page";
|
|
17
23
|
readonly accountLoginConfirm: "Confirm sign-in";
|
|
18
24
|
readonly accountLoginCancel: "Cancel";
|
|
19
25
|
readonly accountLoginUseApiKey: "Use API key";
|
|
@@ -22,7 +28,7 @@ export declare const en: {
|
|
|
22
28
|
readonly accountLoginReopen: "Reopen authorization page";
|
|
23
29
|
readonly accountLoginPopupBlocked: "The new tab was blocked.";
|
|
24
30
|
readonly accountLoginInitializing: "Preparing authorization…";
|
|
25
|
-
readonly accountLoginWaiting: "
|
|
31
|
+
readonly accountLoginWaiting: "Authorization lasts at most 10 minutes.";
|
|
26
32
|
readonly accountLoginExchanging: "Completing sign-in…";
|
|
27
33
|
readonly accountLoginInvalidCallback: "This callback address does not match the current authorization. Copy the full address, including code and state, from the latest authorization tab.";
|
|
28
34
|
readonly accountLoginExpired: "This authorization has expired. Start again.";
|
|
@@ -31,7 +37,7 @@ export declare const en: {
|
|
|
31
37
|
readonly accountLoginUnavailable: "This DSH version does not provide compatible account sign-in.";
|
|
32
38
|
readonly accountLoginFailed: "Authorization could not be completed. Start again and submit the address from the new tab.";
|
|
33
39
|
readonly accountLoginNoResponse: "The DeepSeek platform did not respond. Check the DSH server’s network connection and start again.";
|
|
34
|
-
readonly loginInitialTitle: "Sign in
|
|
40
|
+
readonly loginInitialTitle: "Sign in";
|
|
35
41
|
readonly loginInitialLoading: "Checking sign-in status…";
|
|
36
42
|
readonly loginLanguageLabel: "Language";
|
|
37
43
|
readonly loginSetupTitle: "Set up your account first";
|
|
@@ -41,8 +47,7 @@ export declare const en: {
|
|
|
41
47
|
readonly loginSetupCopied: "Command copied.";
|
|
42
48
|
readonly loginSetupCopyFallback: "Select and copy the command manually.";
|
|
43
49
|
readonly loginSetupNotFound: "No account was found. Check that the command used this profile, then try again.";
|
|
44
|
-
readonly loginTitle: "Sign in
|
|
45
|
-
readonly loginDescription: "Enter the single-user account created in the server terminal.";
|
|
50
|
+
readonly loginTitle: "Sign in";
|
|
46
51
|
readonly loginUsername: "Username";
|
|
47
52
|
readonly loginPassword: "Password";
|
|
48
53
|
readonly loginContinue: "Continue";
|
|
@@ -75,7 +80,7 @@ export declare const en: {
|
|
|
75
80
|
readonly loginOptionalSkipLater: "Connect later and enter DSH";
|
|
76
81
|
readonly loginReasonExpired: "Your session has expired. Sign in again.";
|
|
77
82
|
readonly loginReasonUpdated: "Security settings changed. Sign in again.";
|
|
78
|
-
readonly loginReasonSignedOut: "You signed out of this
|
|
83
|
+
readonly loginReasonSignedOut: "You signed out of this session.";
|
|
79
84
|
readonly loginUnavailableTitle: "Sign-in is temporarily unavailable";
|
|
80
85
|
readonly loginUnavailableDescription: "The service status is unavailable. Check the connection and retry.";
|
|
81
86
|
readonly loginRetry: "Check again";
|
|
@@ -83,15 +88,25 @@ export declare const en: {
|
|
|
83
88
|
readonly loginErrorInvalidFactor: "The verification or backup code is incorrect. After five failed attempts, you must enter your password again.";
|
|
84
89
|
readonly loginErrorChallenge: "This verification expired. Enter your username and password again.";
|
|
85
90
|
readonly loginErrorUninitialized: "The account is not set up. Run the setup command in the server terminal.";
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
91
|
+
readonly settingsClose: "Close";
|
|
92
|
+
readonly settingsCancel: "Cancel";
|
|
93
|
+
readonly settingsOverview: "Account overview";
|
|
94
|
+
readonly settingsUsername: "DSH sign-in username";
|
|
95
|
+
readonly settingsCreatedAt: "Signed in at";
|
|
96
|
+
readonly settingsExpiresAt: "Session expires at";
|
|
97
|
+
readonly settingsActiveSessions: "Active sessions";
|
|
98
|
+
readonly settingsTotpRequired: "TOTP is required by configuration and cannot be turned off.";
|
|
99
|
+
readonly settingsPasswordTitle: "Password";
|
|
100
|
+
readonly settingsSignOutCurrentDescription: "Sign out this session? Other sessions will stay signed in.";
|
|
101
|
+
readonly settingsSectionLabel: "Security & sign-in";
|
|
102
|
+
readonly settingsSectionAria: "Security & sign-in settings";
|
|
103
|
+
readonly settingsTitle: "Security & sign-in";
|
|
89
104
|
readonly settingsAccountSummary: "Account: {username} · TOTP: {totp}";
|
|
90
105
|
readonly settingsTotpEnabled: "Enabled";
|
|
91
106
|
readonly settingsTotpNotBound: "Not connected";
|
|
92
107
|
readonly settingsLoading: "Loading account status…";
|
|
93
108
|
readonly settingsChangePassword: "Change password";
|
|
94
|
-
readonly settingsBindTotp: "
|
|
109
|
+
readonly settingsBindTotp: "Turn on TOTP";
|
|
95
110
|
readonly settingsRebindTotp: "Reconnect TOTP";
|
|
96
111
|
readonly settingsSessions: "Session management";
|
|
97
112
|
readonly settingsPasswordMismatch: "The new passwords do not match.";
|
|
@@ -113,9 +128,13 @@ export declare const en: {
|
|
|
113
128
|
readonly settingsNewCode: "Six-digit code from the new authenticator";
|
|
114
129
|
readonly settingsConfirmBinding: "Confirm setup";
|
|
115
130
|
readonly settingsRestartBinding: "Start over";
|
|
116
|
-
readonly settingsSignOutCurrent: "Sign out this
|
|
117
|
-
readonly settingsSignOutAll: "Sign out
|
|
118
|
-
readonly settingsSignOutAllDescription: "Enter your current credentials. All
|
|
131
|
+
readonly settingsSignOutCurrent: "Sign out this session";
|
|
132
|
+
readonly settingsSignOutAll: "Sign out all sessions";
|
|
133
|
+
readonly settingsSignOutAllDescription: "Enter your current credentials. All sessions, including this one, and open connections will be revoked.";
|
|
134
|
+
readonly settingsOldBackupInvalid: "Your previous backup codes no longer work.";
|
|
135
|
+
readonly settingsCopyAll: "Copy all";
|
|
136
|
+
readonly settingsBackupCopied: "Backup codes copied.";
|
|
137
|
+
readonly settingsBackupCopyFailed: "Could not copy. Select the codes and copy them manually.";
|
|
119
138
|
readonly settingsBackupTitle: "Save your backup codes";
|
|
120
139
|
readonly settingsBackupDescription: "These codes are shown only once. Store them safely; each code can be used only once.";
|
|
121
140
|
readonly settingsBackupSaved: "I saved them; sign in again";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/shared/locales/en.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/shared/locales/en.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8OL,CAAA"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
export declare const zh: {
|
|
2
|
-
readonly brand: "DSH · 远程登录";
|
|
3
2
|
readonly errorNetwork: "连接失败,请检查网络后重试。";
|
|
4
3
|
readonly errorRateLimited: "尝试过于频繁,请约 {seconds} 秒后重试。";
|
|
5
4
|
readonly errorUnauthorized: "会话已失效,请重新登录。";
|
|
6
5
|
readonly errorServiceUnavailable: "服务暂时不可用,请稍后重试。";
|
|
7
6
|
readonly errorGeneric: "操作未完成,请重试。";
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
7
|
+
readonly accountLoginDisabled: "手动账号登录已关闭。请刷新页面,使用原生登录入口。";
|
|
8
|
+
readonly settingsLoginConfiguration: "登录配置";
|
|
9
|
+
readonly settingsManualDescription: "在新标签页授权后,粘贴回调地址登录。";
|
|
10
|
+
readonly settingsManualAccountLogin: "远程 DeepSeek 账号登录";
|
|
11
|
+
readonly settingsManualConfigUnavailable: "登录配置暂时不可用。";
|
|
12
|
+
readonly settingsManualUnavailable: "当前 DSH 环境不支持手动账号登录。";
|
|
13
|
+
readonly settingsManualSaveFailed: "配置保存失败。请检查当前值后重试。";
|
|
14
|
+
readonly settingsSaving: "正在保存…";
|
|
15
|
+
readonly settingsRetry: "重试";
|
|
16
|
+
readonly accountLoginTitle: "登录 DeepSeek 账号";
|
|
17
|
+
readonly accountLoginStepOpen: "在新标签页完成 DeepSeek 登录。";
|
|
18
|
+
readonly accountLoginStepCopy: "复制授权后地址栏的完整地址,返回此处粘贴。";
|
|
13
19
|
readonly accountLoginCallbackLabel: "完整回调地址";
|
|
14
|
-
readonly accountLoginCallbackHint: "
|
|
15
|
-
readonly accountLoginOpen: "
|
|
20
|
+
readonly accountLoginCallbackHint: "授权后即使页面显示连接失败或 404,也可以复制完整地址。";
|
|
21
|
+
readonly accountLoginOpen: "打开登录页";
|
|
16
22
|
readonly accountLoginConfirm: "确认登录";
|
|
17
23
|
readonly accountLoginCancel: "取消";
|
|
18
24
|
readonly accountLoginUseApiKey: "使用 API Key";
|
|
@@ -21,7 +27,7 @@ export declare const zh: {
|
|
|
21
27
|
readonly accountLoginReopen: "重新打开授权页";
|
|
22
28
|
readonly accountLoginPopupBlocked: "新标签页被浏览器拦截。";
|
|
23
29
|
readonly accountLoginInitializing: "正在准备授权…";
|
|
24
|
-
readonly accountLoginWaiting: "
|
|
30
|
+
readonly accountLoginWaiting: "授权有效期最长 10 分钟。";
|
|
25
31
|
readonly accountLoginExchanging: "正在完成登录…";
|
|
26
32
|
readonly accountLoginInvalidCallback: "回调地址与当前授权不匹配,请从最近一次授权标签页复制包含 code 和 state 的完整地址。";
|
|
27
33
|
readonly accountLoginExpired: "本次授权已过期,请重新开始。";
|
|
@@ -30,7 +36,7 @@ export declare const zh: {
|
|
|
30
36
|
readonly accountLoginUnavailable: "当前 DSH 版本未提供兼容的账号登录功能。";
|
|
31
37
|
readonly accountLoginFailed: "未能完成授权,请重新开始,并提交新标签页中的回调地址。";
|
|
32
38
|
readonly accountLoginNoResponse: "DeepSeek 平台未响应,请检查 DSH 服务器的网络连接后重新开始。";
|
|
33
|
-
readonly loginInitialTitle: "登录
|
|
39
|
+
readonly loginInitialTitle: "登录";
|
|
34
40
|
readonly loginInitialLoading: "正在检查登录状态…";
|
|
35
41
|
readonly loginLanguageLabel: "语言";
|
|
36
42
|
readonly loginSetupTitle: "先初始化账号";
|
|
@@ -40,8 +46,7 @@ export declare const zh: {
|
|
|
40
46
|
readonly loginSetupCopied: "命令已复制。";
|
|
41
47
|
readonly loginSetupCopyFallback: "请手动选择并复制命令。";
|
|
42
48
|
readonly loginSetupNotFound: "尚未检测到账号。请确认命令使用了当前 profile,再重新检查。";
|
|
43
|
-
readonly loginTitle: "登录
|
|
44
|
-
readonly loginDescription: "输入服务器终端创建的单用户账号。";
|
|
49
|
+
readonly loginTitle: "登录";
|
|
45
50
|
readonly loginUsername: "用户名";
|
|
46
51
|
readonly loginPassword: "密码";
|
|
47
52
|
readonly loginContinue: "继续";
|
|
@@ -74,7 +79,7 @@ export declare const zh: {
|
|
|
74
79
|
readonly loginOptionalSkipLater: "稍后绑定,进入 DSH";
|
|
75
80
|
readonly loginReasonExpired: "会话已失效,请重新登录。";
|
|
76
81
|
readonly loginReasonUpdated: "安全设置已更新,请重新登录。";
|
|
77
|
-
readonly loginReasonSignedOut: "
|
|
82
|
+
readonly loginReasonSignedOut: "已退出当前会话。";
|
|
78
83
|
readonly loginUnavailableTitle: "暂时无法登录";
|
|
79
84
|
readonly loginUnavailableDescription: "服务状态暂时无法取得,请检查连接并重试。";
|
|
80
85
|
readonly loginRetry: "重新检查";
|
|
@@ -82,15 +87,25 @@ export declare const zh: {
|
|
|
82
87
|
readonly loginErrorInvalidFactor: "验证码或备用码不正确;连续失败 5 次后需重新输入密码。";
|
|
83
88
|
readonly loginErrorChallenge: "本次验证已失效,请重新输入用户名和密码。";
|
|
84
89
|
readonly loginErrorUninitialized: "账号尚未初始化,请先在服务器终端运行初始化命令。";
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
90
|
+
readonly settingsClose: "关闭";
|
|
91
|
+
readonly settingsCancel: "取消";
|
|
92
|
+
readonly settingsOverview: "账户概览";
|
|
93
|
+
readonly settingsUsername: "DSH 登录用户名";
|
|
94
|
+
readonly settingsCreatedAt: "本次登录时间";
|
|
95
|
+
readonly settingsExpiresAt: "当前会话到期时间";
|
|
96
|
+
readonly settingsActiveSessions: "有效会话数量";
|
|
97
|
+
readonly settingsTotpRequired: "配置要求开启 TOTP,无法关闭。";
|
|
98
|
+
readonly settingsPasswordTitle: "密码";
|
|
99
|
+
readonly settingsSignOutCurrentDescription: "确定退出当前会话?其他会话将继续保持登录。";
|
|
100
|
+
readonly settingsSectionLabel: "安全与登录";
|
|
101
|
+
readonly settingsSectionAria: "安全与登录设置";
|
|
102
|
+
readonly settingsTitle: "安全与登录";
|
|
88
103
|
readonly settingsAccountSummary: "账号:{username} · TOTP:{totp}";
|
|
89
104
|
readonly settingsTotpEnabled: "已启用";
|
|
90
105
|
readonly settingsTotpNotBound: "未绑定";
|
|
91
106
|
readonly settingsLoading: "正在读取账号状态…";
|
|
92
107
|
readonly settingsChangePassword: "修改密码";
|
|
93
|
-
readonly settingsBindTotp: "
|
|
108
|
+
readonly settingsBindTotp: "开启 TOTP";
|
|
94
109
|
readonly settingsRebindTotp: "重新绑定 TOTP";
|
|
95
110
|
readonly settingsSessions: "会话管理";
|
|
96
111
|
readonly settingsPasswordMismatch: "两次输入的新密码不一致。";
|
|
@@ -112,9 +127,13 @@ export declare const zh: {
|
|
|
112
127
|
readonly settingsNewCode: "新身份验证器的 6 位验证码";
|
|
113
128
|
readonly settingsConfirmBinding: "确认绑定";
|
|
114
129
|
readonly settingsRestartBinding: "重新开始";
|
|
115
|
-
readonly settingsSignOutCurrent: "
|
|
116
|
-
readonly settingsSignOutAll: "
|
|
117
|
-
readonly settingsSignOutAllDescription: "
|
|
130
|
+
readonly settingsSignOutCurrent: "退出当前会话";
|
|
131
|
+
readonly settingsSignOutAll: "退出所有会话";
|
|
132
|
+
readonly settingsSignOutAllDescription: "请输入当前凭证;提交后包括当前会话在内的全部会话和长连接都会失效。";
|
|
133
|
+
readonly settingsOldBackupInvalid: "旧备用码已失效。";
|
|
134
|
+
readonly settingsCopyAll: "复制全部";
|
|
135
|
+
readonly settingsBackupCopied: "备用码已复制。";
|
|
136
|
+
readonly settingsBackupCopyFailed: "复制失败,请选中备用码手动复制。";
|
|
118
137
|
readonly settingsBackupTitle: "保存备用码";
|
|
119
138
|
readonly settingsBackupDescription: "这些备用码只会显示这一次。请存放在安全的位置,每个备用码只能使用一次。";
|
|
120
139
|
readonly settingsBackupSaved: "我已保存,重新登录";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/shared/locales/zh.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/shared/locales/zh.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgO0C,CAAA"}
|
package/docs/deployment.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](deployment.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This guide uses DSH `0.2.1-alpha.
|
|
5
|
+
This guide uses DSH `0.2.1-alpha.5` and its default `~/.dsh` data directory. See the [compatibility matrix](../README.md#dsh-compatibility) for the other eight releases and the [development guide](development.md) for isolated source builds. Choose your own hostname, proxy network and service manager.
|
|
6
6
|
|
|
7
7
|
## Minimal installation from npm
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Install the published package into the default `web` profile:
|
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
dsh --version
|
|
13
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
13
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.10
|
|
14
14
|
dsh plugin --profile web list
|
|
15
15
|
dsh web --no-open --port 13090
|
|
16
16
|
```
|
|
@@ -37,7 +37,8 @@ For an HTTPS proxy entry, merge the following rows into `~/.dsh/profiles/web/cor
|
|
|
37
37
|
publicUrl: https://dsh.example.com/
|
|
38
38
|
host: 127.0.0.1
|
|
39
39
|
port: 13090
|
|
40
|
-
requireTotp:
|
|
40
|
+
requireTotp: false
|
|
41
|
+
manualAccountLogin: true
|
|
41
42
|
sessionHours: 168
|
|
42
43
|
preserveOriginPaths: []
|
|
43
44
|
```
|
|
@@ -50,19 +51,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
|
|
|
50
51
|
|
|
51
52
|
All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
|
|
52
53
|
|
|
53
|
-
| Field | Effective value
|
|
54
|
-
| --------------------- |
|
|
55
|
-
| `publicUrl` | CLI `--public-url` replaces the whole file URL on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`; otherwise file URL, migrated legacy single item, then actual listener root. Accept only absolute HTTP(S) roots with optional final slash, no credentials/path/query/fragment.
|
|
56
|
-
| `host` | CLI `--host`, then file, then `127.0.0.1`. Require a concrete IPv4 literal; DSH `0.2.1-alpha.2`, `0.2.1-alpha.3` also accept concrete IPv6, including mapped forms. No DNS names or wildcard binds.
|
|
57
|
-
| `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound.
|
|
58
|
-
| `tlsCert`, `tlsKey` | DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`. Supply both file fields, or both CLI `--tls-cert`/`--tls-key`. A CLI pair replaces the whole file pair; sources are never mixed and unused file certificate paths are not read. Omit TLS for HTTP.
|
|
59
|
-
| `requireTotp` | Defaults to `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
54
|
+
| Field | Effective value |
|
|
55
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| `publicUrl` | CLI `--public-url` replaces the whole file URL on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`; otherwise file URL, migrated legacy single item, then actual listener root. Accept only absolute HTTP(S) roots with optional final slash, no credentials/path/query/fragment. |
|
|
57
|
+
| `host` | CLI `--host`, then file, then `127.0.0.1`. Require a concrete IPv4 literal; DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5` also accept concrete IPv6, including mapped forms. No DNS names or wildcard binds. |
|
|
58
|
+
| `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound. |
|
|
59
|
+
| `tlsCert`, `tlsKey` | DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`. Supply both file fields, or both CLI `--tls-cert`/`--tls-key`. A CLI pair replaces the whole file pair; sources are never mixed and unused file certificate paths are not read. Omit TLS for HTTP. |
|
|
60
|
+
| `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. |
|
|
61
|
+
| `manualAccountLogin` | Defaults to `true`. Native Settings writes the current profile override; accepted saves affect new attempts immediately and persist across restarts without restarting authentication. False preserves admitted attempts and official credentials. Full manual-feature verification targets DSH `0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5`; see README for forward admission and required API checks. |
|
|
62
|
+
| `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
|
|
63
|
+
| `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. |
|
|
62
64
|
|
|
63
65
|
**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.
|
|
64
66
|
|
|
65
|
-
For a DSH `0.2.1-alpha.2`, `0.2.1-alpha.3` override example, `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` replaces file host, port and URL independently. The listener binds an actual free port; the explicit public root stays unchanged. Configure any proxy to reach that actual port. Omit `--host` to keep the file host when overriding only the port.
|
|
67
|
+
For a DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5` override example, `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` replaces file host, port and URL independently. The listener binds an actual free port; the explicit public root stays unchanged. Configure any proxy to reach that actual port. Omit `--host` to keep the file host when overriding only the port.
|
|
66
68
|
|
|
67
69
|
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:
|
|
68
70
|
|
|
@@ -73,13 +75,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
73
75
|
|
|
74
76
|
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.
|
|
75
77
|
|
|
76
|
-
CLI public URL overrides are available only on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `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` reject that unknown flag and need the plugin file field; their Web prompt and `DSH_WEB_URL` retain the native fixed IPv4 loopback URL with the actual port. The plugin admission and printed public root still follow its effective configuration. 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` reject native IPv6/TLS.
|
|
78
|
+
CLI public URL overrides are available only on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`. DSH `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2` reject that unknown flag and need the plugin file field; their Web prompt and `DSH_WEB_URL` retain the native fixed IPv4 loopback URL with the actual port. The plugin admission and printed public root still follow its effective configuration. 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` reject native IPv6/TLS.
|
|
77
79
|
|
|
78
|
-
DSH `0.2.1-alpha.3` publishes the final Web URL in model runtime context and `DSH_WEB_URL`; DSH `0.2.1-alpha.1`, `0.2.1-alpha.2` embed it in the Web prompt section.
|
|
80
|
+
DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5` publishes the final Web URL in model runtime context and `DSH_WEB_URL`; DSH `0.2.1-alpha.1`, `0.2.1-alpha.2` embed it in the Web prompt section.
|
|
79
81
|
|
|
80
82
|
## Native HTTPS and IPv6
|
|
81
83
|
|
|
82
|
-
On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, merge this complete auth row for direct IPv6 loopback HTTPS, using your own certificate and key:
|
|
84
|
+
On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, merge this complete auth row for direct IPv6 loopback HTTPS, using your own certificate and key:
|
|
83
85
|
|
|
84
86
|
```yaml
|
|
85
87
|
- id: auth-remote
|
|
@@ -88,7 +90,8 @@ On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, merge this complete auth row for direct
|
|
|
88
90
|
port: 8443
|
|
89
91
|
tlsCert: ./tls/dsh.crt
|
|
90
92
|
tlsKey: ./tls/dsh.key
|
|
91
|
-
requireTotp:
|
|
93
|
+
requireTotp: false
|
|
94
|
+
manualAccountLogin: true
|
|
92
95
|
sessionHours: 168
|
|
93
96
|
preserveOriginPaths: []
|
|
94
97
|
```
|
|
@@ -119,7 +122,7 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
|
|
|
119
122
|
|
|
120
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.
|
|
121
124
|
|
|
122
|
-
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 DSH `0.2.1-alpha.2`, `0.2.1-alpha.3` routes use the normalized native bind authority; Connection on 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` retains its internal HTTP loopback bridge. Both paths still 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.
|
|
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 DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5` routes use the normalized native bind authority; Connection on 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` retains its internal HTTP loopback bridge. Both paths still 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.
|
|
123
126
|
|
|
124
127
|
## Start and verify the public entry
|
|
125
128
|
|
|
@@ -138,4 +141,4 @@ For recovery, stop DSH, check schema/package compatibility, restore with private
|
|
|
138
141
|
|
|
139
142
|
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.
|
|
140
143
|
|
|
141
|
-
Official DeepSeek account authorization on DSH `0.2.1-alpha.3` uses the manual callback dialog described in the [README](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. Keep `/auth-remote/account/*` behind the same session/origin gate; submissions use same-origin JSON POSTs. Direct HTTP access to the native `/oauth/callback` cannot complete this manual handoff. No proxy exception, broader `preserveOriginPaths`, or cross-site allowance is required.
|
|
144
|
+
Official DeepSeek account authorization on DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5` uses the manual callback dialog described in the [README](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. Keep `/auth-remote/account/*` behind the same session/origin gate; submissions use same-origin JSON POSTs. Direct HTTP access to the native `/oauth/callback` cannot complete this manual handoff. No proxy exception, broader `preserveOriginPaths`, or cross-site allowance is required.
|
package/docs/deployment.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](deployment.md)
|
|
4
4
|
|
|
5
|
-
本指南使用 DSH `0.2.1-alpha.
|
|
5
|
+
本指南使用 DSH `0.2.1-alpha.5` 和默认 `~/.dsh` 数据目录。其他八版能力见[兼容矩阵](../README.zh-CN.md#dsh-兼容性),隔离源码构建见[开发指南](development.zh-CN.md)。域名、代理网络和服务管理器由部署者选择。
|
|
6
6
|
|
|
7
7
|
## 从 npm 最小化安装
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
dsh --version
|
|
13
|
-
dsh plugin --profile web add dsh-auth-remote@0.1.
|
|
13
|
+
dsh plugin --profile web add dsh-auth-remote@0.1.10
|
|
14
14
|
dsh plugin --profile web list
|
|
15
15
|
dsh web --no-open --port 13090
|
|
16
16
|
```
|
|
@@ -37,7 +37,8 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
|
|
|
37
37
|
publicUrl: https://dsh.example.com/
|
|
38
38
|
host: 127.0.0.1
|
|
39
39
|
port: 13090
|
|
40
|
-
requireTotp:
|
|
40
|
+
requireTotp: false
|
|
41
|
+
manualAccountLogin: true
|
|
41
42
|
sessionHours: 168
|
|
42
43
|
preserveOriginPaths: []
|
|
43
44
|
```
|
|
@@ -50,19 +51,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
|
|
|
50
51
|
|
|
51
52
|
以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
|
|
52
53
|
|
|
53
|
-
| 字段 | 生效值
|
|
54
|
-
| --------------------- |
|
|
55
|
-
| `publicUrl` | DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3` 的 CLI `--public-url` 整项替换文件 URL;否则依次为文件、旧单项迁移、实际监听根地址。仅接受绝对 HTTP(S) 根 URL,可带末尾斜杠,不能带凭据、子路径、查询或片段。
|
|
56
|
-
| `host` | CLI `--host`、文件、默认 `127.0.0.1`。要求具体 IPv4 字面量;DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 还接受具体 IPv6,包含 mapped 格式。拒绝 DNS 名称和通配绑定。
|
|
57
|
-
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。
|
|
58
|
-
| `tlsCert`、`tlsKey` | DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 可用。两个文件字段必须成对,CLI `--tls-cert`/`--tls-key` 也必须成对。CLI 整组替换文件组,不混合来源、不读取未采用的文件证书路径。省略 TLS 即 HTTP。
|
|
59
|
-
| `requireTotp` | 默认 `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
54
|
+
| 字段 | 生效值 |
|
|
55
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| `publicUrl` | DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 的 CLI `--public-url` 整项替换文件 URL;否则依次为文件、旧单项迁移、实际监听根地址。仅接受绝对 HTTP(S) 根 URL,可带末尾斜杠,不能带凭据、子路径、查询或片段。 |
|
|
57
|
+
| `host` | CLI `--host`、文件、默认 `127.0.0.1`。要求具体 IPv4 字面量;DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 还接受具体 IPv6,包含 mapped 格式。拒绝 DNS 名称和通配绑定。 |
|
|
58
|
+
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
|
|
59
|
+
| `tlsCert`、`tlsKey` | DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 可用。两个文件字段必须成对,CLI `--tls-cert`/`--tls-key` 也必须成对。CLI 整组替换文件组,不混合来源、不读取未采用的文件证书路径。省略 TLS 即 HTTP。 |
|
|
60
|
+
| `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
|
|
61
|
+
| `manualAccountLogin` | 默认 `true`。原生 Settings 写当前 profile override,保存后当前页新授权立即生效且重启保留,不重启认证服务;false 不取消已接纳授权或退出官方账号。完整手动功能实测目标为 DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`,前向准入与必要 API 检查见 README。 |
|
|
62
|
+
| `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
|
|
63
|
+
| `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
|
|
62
64
|
|
|
63
65
|
**特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
|
|
64
66
|
|
|
65
|
-
DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的覆盖示例 `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别替换文件 host、port 和 URL。监听绑定真实空闲端口,显式公开根地址保持不变;代理须到达该实际端口。仅覆盖端口时,省略 `--host` 即保留文件 host。
|
|
67
|
+
DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 的覆盖示例 `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别替换文件 host、port 和 URL。监听绑定真实空闲端口,显式公开根地址保持不变;代理须到达该实际端口。仅覆盖端口时,省略 `--host` 即保留文件 host。
|
|
66
68
|
|
|
67
69
|
例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
|
|
68
70
|
|
|
@@ -73,13 +75,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
73
75
|
|
|
74
76
|
只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
|
|
75
77
|
|
|
76
|
-
CLI 公开 URL 覆盖仅在 DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`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` 对该未知参数报错,须使用插件文件字段;其 Web 提示和 `DSH_WEB_URL` 保留原生固定 IPv4 回环 URL 加实际端口,插件准入和公开地址输出仍取生效配置。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` 明确拒绝原生 IPv6/TLS。
|
|
78
|
+
CLI 公开 URL 覆盖仅在 DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 可用。DSH `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2` 对该未知参数报错,须使用插件文件字段;其 Web 提示和 `DSH_WEB_URL` 保留原生固定 IPv4 回环 URL 加实际端口,插件准入和公开地址输出仍取生效配置。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` 明确拒绝原生 IPv6/TLS。
|
|
77
79
|
|
|
78
|
-
DSH `0.2.1-alpha.3` 将最终 Web 地址写入模型运行时上下文和 `DSH_WEB_URL`;DSH `0.2.1-alpha.1`、`0.2.1-alpha.2` 将地址写入 Web 提示段落。
|
|
80
|
+
DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 将最终 Web 地址写入模型运行时上下文和 `DSH_WEB_URL`;DSH `0.2.1-alpha.1`、`0.2.1-alpha.2` 将地址写入 Web 提示段落。
|
|
79
81
|
|
|
80
82
|
## 原生 HTTPS 与 IPv6
|
|
81
83
|
|
|
82
|
-
DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完整认证条目,使用自己的证书和私钥:
|
|
84
|
+
DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 的 IPv6 回环 HTTPS 可合并以下完整认证条目,使用自己的证书和私钥:
|
|
83
85
|
|
|
84
86
|
```yaml
|
|
85
87
|
- id: auth-remote
|
|
@@ -88,7 +90,8 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
|
|
|
88
90
|
port: 8443
|
|
89
91
|
tlsCert: ./tls/dsh.crt
|
|
90
92
|
tlsKey: ./tls/dsh.key
|
|
91
|
-
requireTotp:
|
|
93
|
+
requireTotp: false
|
|
94
|
+
manualAccountLogin: true
|
|
92
95
|
sessionHours: 168
|
|
93
96
|
preserveOriginPaths: []
|
|
94
97
|
```
|
|
@@ -119,7 +122,7 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
|
|
|
119
122
|
|
|
120
123
|
插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
|
|
121
124
|
|
|
122
|
-
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 普通路径使用归一化原生 bind authority,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` 的 Connection 保留内部 HTTP 回环桥接;两类路径均需完整会话。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
|
|
125
|
+
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 普通路径使用归一化原生 bind authority,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` 的 Connection 保留内部 HTTP 回环桥接;两类路径均需完整会话。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
|
|
123
126
|
|
|
124
127
|
## 启动并验证公开入口
|
|
125
128
|
|
|
@@ -138,4 +141,4 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
|
|
|
138
141
|
|
|
139
142
|
外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
|
|
140
143
|
|
|
141
|
-
DSH `0.2.1-alpha.3` 官方 DeepSeek 账号授权使用 [README 中的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器所在电脑无需回调监听器或开放回环端口。`/auth-remote/account/*` 继续经过相同的会话与来源门禁,回填通过同源 JSON POST 提交;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大 `preserveOriginPaths` 或放宽跨站规则。
|
|
144
|
+
DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 官方 DeepSeek 账号授权使用 [README 中的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器所在电脑无需回调监听器或开放回环端口。`/auth-remote/account/*` 继续经过相同的会话与来源门禁,回填通过同源 JSON POST 提交;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大 `preserveOriginPaths` 或放宽跨站规则。
|
package/docs/development.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](development.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.1-alpha.
|
|
5
|
+
Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.1-alpha.5`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
|
|
6
6
|
|
|
7
7
|
## Set up and check a checkout
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ pnpm pack:local
|
|
|
14
14
|
pnpm smoke
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
`pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.1.
|
|
17
|
+
`pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.1.10.tgz` after static checks; it does not publish. `pnpm smoke` installs that archive into an isolated DSH home, starts the pinned DSH runtime briefly, checks readiness, anonymous redirection/denial and an online CLI status, then stops it.
|
|
18
18
|
|
|
19
19
|
## Use the isolated development profile
|
|
20
20
|
|
|
@@ -29,16 +29,16 @@ The scripts manage only `.dev/runtime-<version>` and `.dev/dsh-home` under this
|
|
|
29
29
|
For direct inspection, use the same isolated home explicitly:
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
-
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-alpha.
|
|
32
|
+
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-alpha.5/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
The development home contains test account data. Keep it private and do not commit or copy it into a deployment profile.
|
|
36
36
|
|
|
37
37
|
## Test boundaries
|
|
38
38
|
|
|
39
|
-
`pnpm test:unit` covers the auth state machine, TOTP, backup codes, origin policy, translations, storage durability and lock recovery. `pnpm test:integration` exercises real HTTP/WebSocket sockets, native readiness, cookies, origin decisions and revocation. `pnpm test:cli` builds the real archive and tests interactive and noninteractive commands against isolated profiles and Unix sockets. `pnpm test:browser` boots the selected DSH version with temporary profiles and verifies the login and Security UI, native settings, workspace, upload/preview, SSE, WebSocket and an HTTPS forwarding chain.
|
|
39
|
+
`pnpm test:unit` covers the auth state machine, TOTP, backup codes, origin policy, translations, storage durability and lock recovery. `pnpm test:integration` exercises real HTTP/WebSocket sockets, native readiness, cookies, origin decisions and revocation. `pnpm test:cli` builds the real archive and tests interactive and noninteractive commands against isolated profiles and Unix sockets. `pnpm test:browser` boots the selected DSH version with temporary profiles and verifies the login and Security & sign-in UI, native settings, workspace, upload/preview, SSE, WebSocket and an HTTPS forwarding chain.
|
|
40
40
|
|
|
41
|
-
Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.1-alpha.
|
|
41
|
+
Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.1-alpha.5`).
|
|
42
42
|
|
|
43
43
|
The DSH test runtime lives in `.cache/test-runtime/<version>` and is pinned separately from the source dependencies. Host services and React remain external to the client bundle. The [deployment guide](deployment.md) describes profile and backup rules.
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Isolated verification installs use pnpm file copies so shared package hardlink m
|
|
|
48
48
|
|
|
49
49
|
## Cross-version verification
|
|
50
50
|
|
|
51
|
-
The default test target is DSH `0.2.1-alpha.
|
|
51
|
+
The default test target is DSH `0.2.1-alpha.5`. Set `DSH_TEST_VERSION` to `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`, `0.2.1-alpha.4`, or `0.2.1-alpha.5`; test runtimes live separately under `.cache/test-runtime/<version>` and development runtimes under `.dev/runtime-<version>`. `DSH_TEST_BIN` must report the exact selected version. CI runs CLI, installation smoke and browser tests for all nine versions. Development types and integration tests use the pinned DSH `0.2.1-alpha.5` packages. The source checkout test guide (`tests/README.md`) describes real Loader/model URL checks and native IPv6/TLS positive or unsupported-capability assertions; unavailable native test transport fails instead of skipping.
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
54
|
DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
|
|
@@ -63,14 +63,26 @@ DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:cli
|
|
|
63
63
|
DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:browser
|
|
64
64
|
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:cli
|
|
65
65
|
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:browser
|
|
66
|
+
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:cli
|
|
67
|
+
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:browser
|
|
68
|
+
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:cli
|
|
69
|
+
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:browser
|
|
66
70
|
pnpm test:cli
|
|
67
71
|
pnpm test:browser
|
|
68
72
|
```
|
|
69
73
|
|
|
70
74
|
Browser tests save light/dark, desktop/narrow-screen screenshots under `.cache/ui-review/<version>` for visual review. Security CSS is installed and removed with the plugin, scopes its selectors to the plugin page, and reads the host's live `--dsw-*` tokens. The standalone login uses a subset of DSH 0.2.0-rc.1 theme tokens and the system color scheme without reading host preferences before authentication.
|
|
71
75
|
|
|
72
|
-
Official-account tests use a local Platform stand-in with the actual DSH `0.2.1-alpha.
|
|
76
|
+
Official-account tests use a local Platform stand-in with the actual DSH `0.2.1-alpha.5` account provider. They check the original redirect URI and PKCE verifier during exchange, rejected state/URL/session combinations, duplicate submissions, cancellation, expiry and retries. Browser coverage checks the instruction-first menu and onboarding dialog, failed loopback navigation followed by paste/confirm, blocked popups, live locale and responsive light/dark layout. These tests do not establish a real official-account authorization session.
|
|
73
77
|
|
|
74
78
|
Core account tests load the exact provider from locked development dependencies, so they do not require a pre-existing CLI runtime cache. Browser tests still exercise the provider installed into each isolated DSH profile.
|
|
75
79
|
|
|
76
|
-
This temporary adapter
|
|
80
|
+
This temporary adapter uses `>=0.2.1-alpha.3` including prereleases, required capabilities and live configuration. Full manual-feature regression covers `0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5`. 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` verify base authentication, complete Security & sign-in interactions, live configuration persistence and unavailable manual-feature feedback. Future admission is not verification. Support or shared host-adapter changes require the same final tgz across all nine CLI, browser and smoke runs. Run test files directly and use smoke:packed in that loop, avoiding the repacking test:cli/test:browser/smoke entries, and check SHA-256 after every release. See `DSH-ACCOUNT-001` for public-callback evidence, migration and retirement conditions.
|
|
81
|
+
|
|
82
|
+
`live-config.spec.ts` observes the real Loader reference/fiber, auth/store identity, lock, listener and SSE/WebSocket continuity, checks the loaded dependency chain and restarts to verify the profile override. It does not fabricate services. Dialog regression covers cancellation/errors, focus/keyboard, optional/enforced TOTP, one-time code copying and redirect holds after revocation. Task documents, test credentials, profiles, screenshots and generated directories must remain outside the npm archive.
|
|
83
|
+
|
|
84
|
+
`account-login.spec.ts` also exercises real native configuration HMR on every declared release: changing ordinary `sessionHours` rebuilds the listener, then an external Settings write must wait for an existing native transaction while genuine nesting is rejected. On `0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5`, modifying the isolated installed plugin additionally verifies native module replacement followed by re-enabling manual sign-in. The test-only transaction probe calls the real HMR service; it replaces no service and never enters the npm archive. The narrow listener-context adaptation is documented in `DSH-HMR-001`.
|
|
85
|
+
|
|
86
|
+
The account preference binding recovers an initial failed read through the native describe mirror’s `ensure()` API. Recovery of an already held namespace uses the explicitly injected `remote.settings` transport and folds the accepted namespace back into that mirror. A sign-in click while the preference is loading waits for the shared read, then uses the latest accepted true/false value; loading does not select the native flow. Browser regression covers initial failure, a temporarily missing namespace and delayed reads for both routing choices.
|
|
87
|
+
|
|
88
|
+
`browser/host-release.spec.ts` runs on `0.2.1-alpha.4` and `0.2.1-alpha.5`. It prepares actual `0.2.1-alpha.3` for the `0.2.1-alpha.4` target, and actual `0.2.1-alpha.4` for the `0.2.1-alpha.5` target. Each case switches Host in one temporary profile/port while retaining the page, checks the native release prompt, reloads and verifies authentication, the original session and saved configuration, then restores its starting release. The `0.2.1-alpha.3` destination has no release metadata and reads unknown; the `0.2.1-alpha.4` destination must show its real version. No upstream source, version or graph metadata is fabricated.
|