dsh-auth-remote 0.1.9 → 0.2.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/CHANGELOG.zh-CN.md +32 -0
  3. package/CONTRIBUTING.md +3 -1
  4. package/CONTRIBUTING.zh-CN.md +3 -1
  5. package/README.md +49 -23
  6. package/README.zh-CN.md +37 -11
  7. package/cordis.patch.yml +4 -3
  8. package/dist/cli.js +91 -46
  9. package/dist/cli.js.map +2 -2
  10. package/dist/client.js +2880 -581
  11. package/dist/client.js.map +4 -4
  12. package/dist/index.js +201 -36
  13. package/dist/index.js.map +4 -4
  14. package/dist/login.css +2 -8
  15. package/dist/login.css.map +2 -2
  16. package/dist/login.js +80 -42
  17. package/dist/login.js.map +2 -2
  18. package/dist/types/adapters/dsh/account-callback.d.ts +3 -0
  19. package/dist/types/adapters/dsh/account-callback.d.ts.map +1 -1
  20. package/dist/types/adapters/dsh/hmr-context.d.ts +10 -0
  21. package/dist/types/adapters/dsh/hmr-context.d.ts.map +1 -0
  22. package/dist/types/auth/service.d.ts +2 -0
  23. package/dist/types/auth/service.d.ts.map +1 -1
  24. package/dist/types/auth/sessions.d.ts +2 -0
  25. package/dist/types/auth/sessions.d.ts.map +1 -1
  26. package/dist/types/config.d.ts +9 -3
  27. package/dist/types/config.d.ts.map +1 -1
  28. package/dist/types/http/account-login.d.ts +5 -3
  29. package/dist/types/http/account-login.d.ts.map +1 -1
  30. package/dist/types/index.d.ts +2 -2
  31. package/dist/types/index.d.ts.map +1 -1
  32. package/dist/types/shared/account-login.d.ts +2 -1
  33. package/dist/types/shared/account-login.d.ts.map +1 -1
  34. package/dist/types/shared/auth-contract.d.ts +2 -0
  35. package/dist/types/shared/auth-contract.d.ts.map +1 -1
  36. package/dist/types/shared/dsh-support.d.ts +38 -0
  37. package/dist/types/shared/dsh-support.d.ts.map +1 -0
  38. package/dist/types/shared/i18n.d.ts +78 -40
  39. package/dist/types/shared/i18n.d.ts.map +1 -1
  40. package/dist/types/shared/locales/en.d.ts +39 -20
  41. package/dist/types/shared/locales/en.d.ts.map +1 -1
  42. package/dist/types/shared/locales/zh.d.ts +39 -20
  43. package/dist/types/shared/locales/zh.d.ts.map +1 -1
  44. package/docs/deployment.md +26 -21
  45. package/docs/deployment.zh-CN.md +26 -21
  46. package/docs/development.md +74 -8
  47. package/docs/development.zh-CN.md +74 -8
  48. package/docs/legacy-compatibility.md +96 -64
  49. package/docs/legacy-compatibility.zh-CN.md +96 -64
  50. package/docs/releasing.md +40 -10
  51. package/docs/releasing.zh-CN.md +40 -10
  52. package/docs/support-history.md +97 -0
  53. package/docs/support-history.zh-CN.md +97 -0
  54. package/docs/support-policy.md +87 -0
  55. package/docs/support-policy.zh-CN.md +87 -0
  56. package/examples/web-profile-auth-remote.patch.yml +6 -3
  57. package/package.json +28 -17
@@ -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 accountLoginTitle: "Sign in to your DeepSeek account";
10
- readonly accountLoginDescription: "Complete authorization in a new tab, then return here to finish signing in.";
11
- readonly accountLoginStepOpen: "Click “Open DeepSeek sign-in” below and sign in on the official page.";
12
- readonly accountLoginStepCopy: "After authorization, the new tab may show a connection error or 404. Copy its full address from the address bar.";
13
- readonly accountLoginStepSubmit: "Return to this dialog, paste the address below and click “Confirm sign-in”.";
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: "Include both code and state. The page does not need to load. Submit before this authorization expires.";
16
- readonly accountLoginOpen: "Open DeepSeek sign-in";
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: "Waiting for the callback address. This authorization lasts at most 10 minutes.";
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 to DSH";
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 to DSH";
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 device.";
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 settingsSectionLabel: "Security";
87
- readonly settingsSectionAria: "Security settings";
88
- readonly settingsTitle: "Account security";
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: "Connect TOTP";
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 device";
117
- readonly settingsSignOutAll: "Sign out every device";
118
- readonly settingsSignOutAllDescription: "Enter your current credentials. All signed-in devices and open connections will be revoked.";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0NL,CAAA"}
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 accountLoginTitle: "登录 DeepSeek 官方账号";
9
- readonly accountLoginDescription: "在新标签页完成官方授权后,返回此处继续登录。";
10
- readonly accountLoginStepOpen: "点击下方“打开 DeepSeek 登录页”,在官方页面登录账号。";
11
- readonly accountLoginStepCopy: "授权后,新标签页可能显示连接失败或 404。请复制该标签页地址栏中的完整地址。";
12
- readonly accountLoginStepSubmit: "返回此弹窗,将地址粘贴到下方输入框,再点击“确认登录”。";
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: "地址须包含 code 和 state;该页面无需能正常打开。请在本次授权到期前提交。";
15
- readonly accountLoginOpen: "打开 DeepSeek 登录页";
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: "等待填写回调地址。本次授权最长有效期为 10 分钟。";
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: "登录 DSH";
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: "登录 DSH";
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 settingsSectionLabel: "安全";
86
- readonly settingsSectionAria: "安全设置";
87
- readonly settingsTitle: "账号安全";
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: "绑定 TOTP";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2M0C,CAAA"}
1
+ {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/shared/locales/zh.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgO0C,CAAA"}
@@ -2,7 +2,9 @@
2
2
 
3
3
  [简体中文](deployment.zh-CN.md)
4
4
 
5
- This guide uses DSH `0.2.1-alpha.3` and its default `~/.dsh` data directory. See the [compatibility matrix](../README.md#dsh-compatibility) for the other six releases and the [development guide](development.md) for isolated source builds. Choose your own hostname, proxy network and service manager.
5
+ The npm example targets plugin `0.2.0`, DSH `0.2.1-rc.2` and its default `~/.dsh` data directory. The eleven supported releases and maintenance dates are in the [compatibility matrix](../README.md#dsh-compatibility); exact-version evidence and distribution records are in [DSH → plugin history](support-history.md#by-dsh). Use the [development guide](development.md) for isolated source builds. Choose your own hostname, proxy network and service manager.
6
+
7
+ Native capability lists below cover the exact DSH releases supported by plugin `0.2.0`, including both `0.2.1` RC releases.
6
8
 
7
9
  ## Minimal installation from npm
8
10
 
@@ -10,12 +12,12 @@ Install the published package into the default `web` profile:
10
12
 
11
13
  ```sh
12
14
  dsh --version
13
- dsh plugin --profile web add dsh-auth-remote@0.1.9
15
+ dsh plugin --profile web add dsh-auth-remote@0.2.0
14
16
  dsh plugin --profile web list
15
17
  dsh web --no-open --port 13090
16
18
  ```
17
19
 
18
- Verify the selected DSH version and plugin list. No profile patch is needed for the default IPv4 HTTP loopback listener. In another terminal, require `/auth-remote/ready` to return `"plugin":"dsh-auth-remote"`, `"protocolVersion":1`, and `"ready":true`, then initialize the account:
20
+ Verify the selected DSH version and plugin list. No profile patch is needed for this local IPv4 HTTP loopback check. Before exposing a remote entry, apply the complete configuration below, including the independent native-listener disable. In another terminal, require `/auth-remote/ready` to return `"plugin":"dsh-auth-remote"`, `"protocolVersion":1`, and `"ready":true`, then initialize the account:
19
21
 
20
22
  ```sh
21
23
  curl -fsS http://127.0.0.1:13090/auth-remote/ready
@@ -37,12 +39,13 @@ For an HTTPS proxy entry, merge the following rows into `~/.dsh/profiles/web/cor
37
39
  publicUrl: https://dsh.example.com/
38
40
  host: 127.0.0.1
39
41
  port: 13090
40
- requireTotp: true
42
+ requireTotp: false
43
+ manualAccountLogin: true
41
44
  sessionHours: 168
42
45
  preserveOriginPaths: []
43
46
  ```
44
47
 
45
- Replace the public hostname consistently in the profile and proxy. This example keeps a private HTTP listener behind external TLS. `publicUrl` selects the browser entry; it does not configure a proxy, certificate or listener protocol. The independent `webserver` disable is recommended; the auth bundle already disables that row while active. Remove the independent disable when uninstalling the plugin and returning to the native listener.
48
+ Replace the public hostname consistently in the profile and proxy. This example keeps a private HTTP listener behind external TLS. `publicUrl` selects the browser entry; it does not configure a proxy, certificate or listener protocol. The independent `webserver` disable in the profile is required when a remote entry relies on this plugin. Loader can skip an incompatible auth bundle and continue composing the profile; the bundle’s own disable then disappears. Keeping the profile-level row prevents native-listener fallback on that path. A plugin that is not loaded cannot enforce this prerequisite itself. Remove the independent disable when uninstalling the plugin and returning to the native listener.
46
49
 
47
50
  DSH replaces the entire plugin `config` when a later patch row supplies one. Preserve the full intended authentication configuration in that row. If a home-level patch also defines `auth-remote`, inspect the final composition with `dsh --profile web --dump-config` before opening access.
48
51
 
@@ -50,19 +53,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
50
53
 
51
54
  All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
52
55
 
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 `true`. With `false`, an unbound account may skip setup; an already bound account still needs its second factor. |
60
- | `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
61
- | `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. |
56
+ | Field | Effective value |
57
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `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`, `0.2.1-rc.1`, `0.2.1-rc.2`; 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. |
59
+ | `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`, `0.2.1-rc.1`, `0.2.1-rc.2` also accept concrete IPv6, including mapped forms. No DNS names or wildcard binds. |
60
+ | `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound. |
61
+ | `tlsCert`, `tlsKey` | DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`. 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. |
62
+ | `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. |
63
+ | `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`, `0.2.1-alpha.5`, `0.2.1-rc.1` and `0.2.1-rc.2`; see README for forward admission and required API checks. |
64
+ | `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
65
+ | `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
66
 
63
67
  **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
68
 
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.
69
+ For a DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` 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
70
 
67
71
  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
72
 
@@ -73,13 +77,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
73
77
 
74
78
  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
79
 
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.
80
+ 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`, `0.2.1-rc.1`, `0.2.1-rc.2`. 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
81
 
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.
82
+ DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` 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
83
 
80
84
  ## Native HTTPS and IPv6
81
85
 
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:
86
+ On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, merge this complete auth row for direct IPv6 loopback HTTPS, using your own certificate and key:
83
87
 
84
88
  ```yaml
85
89
  - id: auth-remote
@@ -88,7 +92,8 @@ On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, merge this complete auth row for direct
88
92
  port: 8443
89
93
  tlsCert: ./tls/dsh.crt
90
94
  tlsKey: ./tls/dsh.key
91
- requireTotp: true
95
+ requireTotp: false
96
+ manualAccountLogin: true
92
97
  sessionHours: 168
93
98
  preserveOriginPaths: []
94
99
  ```
@@ -119,7 +124,7 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
119
124
 
120
125
  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
126
 
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.
127
+ 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`, `0.2.1-rc.1`, `0.2.1-rc.2` 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
128
 
124
129
  ## Start and verify the public entry
125
130
 
@@ -138,4 +143,4 @@ For recovery, stop DSH, check schema/package compatibility, restore with private
138
143
 
139
144
  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
145
 
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.
146
+ Official DeepSeek account authorization on DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` 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.
@@ -2,7 +2,9 @@
2
2
 
3
3
  [English](deployment.md)
4
4
 
5
- 本指南使用 DSH `0.2.1-alpha.3` 和默认 `~/.dsh` 数据目录。其他六版能力见[兼容矩阵](../README.zh-CN.md#dsh-兼容性),隔离源码构建见[开发指南](development.zh-CN.md)。域名、代理网络和服务管理器由部署者选择。
5
+ npm 示例面向插件 `0.2.0`、DSH `0.2.1-rc.2` 与默认 `~/.dsh` 数据目录。十一版支持集合及维护日期见[兼容矩阵](../README.zh-CN.md#dsh-兼容性),精确版本证据和分发记录见 [DSH → 插件历史](support-history.zh-CN.md#by-dsh)。隔离源码构建见[开发指南](development.zh-CN.md)。域名、代理网络和服务管理器由部署者选择。
6
+
7
+ 下文原生能力列表覆盖插件 `0.2.0` 支持的精确 DSH 版本,包括两个 `0.2.1` RC 版本。
6
8
 
7
9
  ## 从 npm 最小化安装
8
10
 
@@ -10,12 +12,12 @@
10
12
 
11
13
  ```sh
12
14
  dsh --version
13
- dsh plugin --profile web add dsh-auth-remote@0.1.9
15
+ dsh plugin --profile web add dsh-auth-remote@0.2.0
14
16
  dsh plugin --profile web list
15
17
  dsh web --no-open --port 13090
16
18
  ```
17
19
 
18
- 核对所选 DSH 版本和插件列表。默认 IPv4 HTTP 回环监听不需要 profile 补丁。在另一终端确认 `/auth-remote/ready` 返回 `"plugin":"dsh-auth-remote"`、`"protocolVersion":1` 和 `"ready":true`,随后初始化账号:
20
+ 核对所选 DSH 版本和插件列表。本地 IPv4 HTTP 回环检查不需要 profile 补丁。开放远程入口前,须应用下方完整配置,包括独立禁用原生监听的条目。在另一终端确认 `/auth-remote/ready` 返回 `"plugin":"dsh-auth-remote"`、`"protocolVersion":1` 和 `"ready":true`,随后初始化账号:
19
21
 
20
22
  ```sh
21
23
  curl -fsS http://127.0.0.1:13090/auth-remote/ready
@@ -37,12 +39,13 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
37
39
  publicUrl: https://dsh.example.com/
38
40
  host: 127.0.0.1
39
41
  port: 13090
40
- requireTotp: true
42
+ requireTotp: false
43
+ manualAccountLogin: true
41
44
  sessionHours: 168
42
45
  preserveOriginPaths: []
43
46
  ```
44
47
 
45
- 在 profile 和代理中一致地替换公网主机名。示例在外部 TLS 后使用私有 HTTP 监听。`publicUrl` 选择浏览器入口,不会配置代理、证书或监听协议。建议独立禁用 `webserver`;认证 bundle 正常加载时已自行禁用该条目。卸载插件并恢复原生监听时,移除独立禁用条目。
48
+ 在 profile 和代理中一致地替换公网主机名。示例在外部 TLS 后使用私有 HTTP 监听。`publicUrl` 选择浏览器入口,不会配置代理、证书或监听协议。远程入口依赖本插件保护时,必须在 profile 中独立禁用 `webserver`。Loader 可以跳过不兼容的认证 bundle 并继续组合 profile,此时 bundle 自带的禁用补丁也会消失。保留 profile 级独立条目才能阻止这条路径回退至原生监听。未加载的插件无法自行实施此前置条件。卸载插件并恢复原生监听时,移除独立禁用条目。
46
49
 
47
50
  后应用的 DSH patch 条目会整段替换插件 `config`,因此该条目必须保留全部预期认证配置。home 级 patch 若也定义 `auth-remote`,开放入口前用 `dsh --profile web --dump-config` 核对最终组合。
48
51
 
@@ -50,19 +53,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
50
53
 
51
54
  以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
52
55
 
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` | 默认 `true`。设为 `false` 时未绑定账号可跳过;已绑定账号仍需第二因素。 |
60
- | `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
61
- | `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
56
+ | 字段 | 生效值 |
57
+ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `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`、`0.2.1-rc.1`、`0.2.1-rc.2` 的 CLI `--public-url` 整项替换文件 URL;否则依次为文件、旧单项迁移、实际监听根地址。仅接受绝对 HTTP(S) 根 URL,可带末尾斜杠,不能带凭据、子路径、查询或片段。 |
59
+ | `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`、`0.2.1-rc.1`、`0.2.1-rc.2` 还接受具体 IPv6,包含 mapped 格式。拒绝 DNS 名称和通配绑定。 |
60
+ | `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
61
+ | `tlsCert`、`tlsKey` | DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 可用。两个文件字段必须成对,CLI `--tls-cert`/`--tls-key` 也必须成对。CLI 整组替换文件组,不混合来源、不读取未采用的文件证书路径。省略 TLS 即 HTTP。 |
62
+ | `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
63
+ | `manualAccountLogin` | 默认 `true`。原生 Settings 写当前 profile override,保存后当前页新授权立即生效且重启保留,不重启认证服务;false 不取消已接纳授权或退出官方账号。完整手动功能实测目标为 DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2`,前向准入与必要 API 检查见 README。 |
64
+ | `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
65
+ | `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
62
66
 
63
67
  **特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
64
68
 
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。
69
+ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 的覆盖示例 `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别替换文件 host、port 和 URL。监听绑定真实空闲端口,显式公开根地址保持不变;代理须到达该实际端口。仅覆盖端口时,省略 `--host` 即保留文件 host。
66
70
 
67
71
  例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
68
72
 
@@ -73,13 +77,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
73
77
 
74
78
  只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
75
79
 
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。
80
+ 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`、`0.2.1-rc.1`、`0.2.1-rc.2` 可用。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
81
 
78
- DSH `0.2.1-alpha.3` 将最终 Web 地址写入模型运行时上下文和 `DSH_WEB_URL`;DSH `0.2.1-alpha.1`、`0.2.1-alpha.2` 将地址写入 Web 提示段落。
82
+ DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 将最终 Web 地址写入模型运行时上下文和 `DSH_WEB_URL`;DSH `0.2.1-alpha.1`、`0.2.1-alpha.2` 将地址写入 Web 提示段落。
79
83
 
80
84
  ## 原生 HTTPS 与 IPv6
81
85
 
82
- DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完整认证条目,使用自己的证书和私钥:
86
+ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 的 IPv6 回环 HTTPS 可合并以下完整认证条目,使用自己的证书和私钥:
83
87
 
84
88
  ```yaml
85
89
  - id: auth-remote
@@ -88,7 +92,8 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
88
92
  port: 8443
89
93
  tlsCert: ./tls/dsh.crt
90
94
  tlsKey: ./tls/dsh.key
91
- requireTotp: true
95
+ requireTotp: false
96
+ manualAccountLogin: true
92
97
  sessionHours: 168
93
98
  preserveOriginPaths: []
94
99
  ```
@@ -119,7 +124,7 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
119
124
 
120
125
  插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
121
126
 
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 不表示账号已初始化。
127
+ 标准 `/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`、`0.2.1-rc.1`、`0.2.1-rc.2` 普通路径使用归一化原生 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
128
 
124
129
  ## 启动并验证公开入口
125
130
 
@@ -138,4 +143,4 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3` 的 IPv6 回环 HTTPS 可合并以下完
138
143
 
139
144
  外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
140
145
 
141
- DSH `0.2.1-alpha.3` 官方 DeepSeek 账号授权使用 [README 中的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器所在电脑无需回调监听器或开放回环端口。`/auth-remote/account/*` 继续经过相同的会话与来源门禁,回填通过同源 JSON POST 提交;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大 `preserveOriginPaths` 或放宽跨站规则。
146
+ DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 官方 DeepSeek 账号授权使用 [README 中的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器所在电脑无需回调监听器或开放回环端口。`/auth-remote/account/*` 继续经过相同的会话与来源门禁,回填通过同源 JSON POST 提交;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大 `preserveOriginPaths` 或放宽跨站规则。