dsh-auth-remote 0.2.0 → 0.3.1
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 +10 -0
- package/CHANGELOG.zh-CN.md +10 -0
- package/CONTRIBUTING.md +2 -0
- package/CONTRIBUTING.zh-CN.md +2 -0
- package/README.md +19 -41
- package/README.zh-CN.md +19 -41
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/index.js +45 -49
- package/dist/index.js.map +3 -3
- package/dist/types/adapters/dsh/compatibility.d.ts +1 -1
- package/dist/types/adapters/dsh/compatibility.d.ts.map +1 -1
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts +6 -11
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts.map +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/http/account-login.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/dsh-support.d.ts.map +1 -1
- package/docs/deployment.md +22 -20
- package/docs/deployment.zh-CN.md +22 -20
- package/docs/development.md +59 -56
- package/docs/development.zh-CN.md +59 -56
- package/docs/legacy-compatibility.md +97 -80
- package/docs/legacy-compatibility.zh-CN.md +90 -73
- package/docs/releasing.md +14 -8
- package/docs/releasing.zh-CN.md +14 -8
- package/docs/reverse-proxy.md +2 -2
- package/docs/reverse-proxy.zh-CN.md +2 -2
- package/docs/support-history.md +66 -60
- package/docs/support-history.zh-CN.md +66 -60
- package/examples/web-profile-auth-remote.patch.yml +1 -1
- package/package.json +16 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type { HostConnectionHandle } from '@deepseek-ai/dsh-client-connection';
|
|
3
|
-
export declare const SUPPORTED_DSH_RANGE = ">=0.1
|
|
3
|
+
export declare const SUPPORTED_DSH_RANGE = ">=0.2.1-alpha.3";
|
|
4
4
|
/** Verify the loaded module and the profile's host resolve to one DSH copy. */
|
|
5
5
|
export declare function assertWebServerCompatibility(ctx: Context): string;
|
|
6
6
|
/** Check Connection after it appears; readiness must be withdrawn on its loss. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/compatibility.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAQ9E,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/compatibility.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAQ9E,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AAwBpD,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAsBjE;AAED,kFAAkF;AAClF,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,oBAAoB,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAgBR"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { OriginProtocol } from '../../http/origin-policy.js';
|
|
2
|
-
export interface RuntimeCapabilities {
|
|
3
|
-
readonly version: string;
|
|
4
|
-
readonly publicUrl: boolean;
|
|
5
|
-
readonly nativeTransport: boolean;
|
|
6
|
-
}
|
|
7
2
|
export interface NativeListenerConfig {
|
|
8
3
|
host: string;
|
|
9
4
|
port: number;
|
|
@@ -25,19 +20,19 @@ interface NativeApi {
|
|
|
25
20
|
normalizeBindAddress?: (host: string) => string;
|
|
26
21
|
}
|
|
27
22
|
/** Version admission and API verification remain separate checks. */
|
|
28
|
-
export declare function
|
|
29
|
-
/**
|
|
30
|
-
export declare function validateListenerConfig(
|
|
31
|
-
/**
|
|
23
|
+
export declare function assertRuntimeVersion(version: string): void;
|
|
24
|
+
/** Validate the native schema before opening resources. */
|
|
25
|
+
export declare function validateListenerConfig(config: NativeListenerConfig, native?: NativeApi): NativeListenerConfig;
|
|
26
|
+
/** Missing or invalid native protocols fail closed. */
|
|
32
27
|
export declare function listenerProtocol(server: {
|
|
33
28
|
readonly protocol?: string;
|
|
34
|
-
}
|
|
29
|
+
}): OriginProtocol;
|
|
35
30
|
/** Match Connection's bind-authority URL rules, including mapped/scoped IPv6. */
|
|
36
31
|
export declare function listenerTransport(actual: {
|
|
37
32
|
host: string;
|
|
38
33
|
port: number;
|
|
39
34
|
protocol: OriginProtocol;
|
|
40
|
-
}
|
|
35
|
+
}): {
|
|
41
36
|
authority: string;
|
|
42
37
|
origin: string;
|
|
43
38
|
loopback: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/runtime-capabilities.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/adapters/dsh/runtime-capabilities.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAGjE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC;AAED,UAAU,SAAS;IACjB,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IACjF,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAC1C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAC1C,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAChD;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAK1D;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,GAAE,SAA2B,GAClC,oBAAoB,CAiBtB;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAIvF;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,CAAA;CACzB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAa3D"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from '@deepseek-ai/schemastery';
|
|
2
2
|
import type { Volatile } from '@deepseek-ai/cordis';
|
|
3
3
|
import { type RootPublicUrl } from './adapters/dsh/public-url.js';
|
|
4
|
-
import { type
|
|
4
|
+
import { type NativeListenerConfig } from './adapters/dsh/runtime-capabilities.js';
|
|
5
5
|
import { type OriginPolicy, type OriginProtocol } from './http/origin-policy.js';
|
|
6
6
|
export interface AuthConfig {
|
|
7
7
|
publicUrl?: string;
|
|
@@ -42,7 +42,7 @@ export interface WebStartupConfig {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
export interface PendingAuthConfig extends NativeListenerConfig {
|
|
45
|
-
readonly
|
|
45
|
+
readonly version: string;
|
|
46
46
|
readonly publicUrl: RootPublicUrl | undefined;
|
|
47
47
|
readonly publicUrlSource: 'cli' | 'file' | 'legacy' | 'derived';
|
|
48
48
|
readonly tlsSource: 'cli' | 'file' | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAGnD,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACpG,OAAO,EAIL,KAAK,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAGnD,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACpG,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAEpG,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IACrC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,E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AsB,IAAI,SAAS,MAAM,EAAE,CAK9C;CACF;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh-support.d.ts","sourceRoot":"","sources":["../../../src/shared/dsh-support.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAA;AACnE,MAAM,MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAC7D;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAanE,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"dsh-support.d.ts","sourceRoot":"","sources":["../../../src/shared/dsh-support.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,C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deployment.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](deployment.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This guide targets unpublished plugin candidate `0.3.1` with recommended DSH `0.2.1-rc.4` and default `~/.dsh` data directory. See [README](../README.md#dsh-compatibility) for seven-version support/dates, [history](support-history.md#by-dsh) for old pairs and distribution, and [development](development.md) for source builds.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The native capabilities below apply to `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`, `0.2.1-rc.3` and `0.2.1-rc.4`.
|
|
8
8
|
|
|
9
9
|
## Minimal installation from npm
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`0.3.1` is unpublished. Run the npm installation below only after its [exact distribution record](support-history.md#plugin-0.3.1) confirms publication; during preparation replace the package name with a verified local `./artifacts/dsh-auth-remote-0.3.1.tgz` path. Use the same default `web` profile:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
dsh --version
|
|
15
|
-
dsh plugin --profile web add dsh-auth-remote@0.
|
|
15
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.1
|
|
16
16
|
dsh plugin --profile web list
|
|
17
17
|
dsh web --no-open --port 13090
|
|
18
18
|
```
|
|
@@ -53,20 +53,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
|
|
|
53
53
|
|
|
54
54
|
All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
|
|
55
55
|
|
|
56
|
-
| Field | Effective value
|
|
57
|
-
| --------------------- |
|
|
58
|
-
| `publicUrl` | CLI `--public-url` replaces the
|
|
59
|
-
| `host` | CLI
|
|
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` |
|
|
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
|
|
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.
|
|
56
|
+
| Field | Effective value |
|
|
57
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `publicUrl` | CLI `--public-url` replaces the file URL, then migrated legacy single item, then actual listener root. HTTP(S) roots only, optional final slash, no credentials/path/query/fragment. |
|
|
59
|
+
| `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and 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` | Supply both file fields or both CLI `--tls-cert`/`--tls-key`; CLI replaces the entire pair, without mixed sources or reading unused file paths. Omit 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 true. Native Settings writes the profile override; accepted saves immediately affect new authorizations and survive restart without restarting authentication. False preserves admitted attempts and official credentials. All seven have complete regression targets; see README for future admission/APIs. |
|
|
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. |
|
|
66
66
|
|
|
67
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.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
On every supported version, `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` overrides file host, port and URL independently. The listener uses an actual free port while the explicit public root stays fixed; configure the proxy for that port. Omit host when overriding only port.
|
|
70
70
|
|
|
71
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:
|
|
72
72
|
|
|
@@ -77,13 +77,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
77
77
|
|
|
78
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.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
All supported versions natively provide `--public-url`, IPv6 and TLS; this candidate removes the older missing-option and unsupported-transport branches.
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
All seven project the final Web URL through model runtime context and `DSH_WEB_URL`; tests still scan all Web sections for duplicate URLs or tokens.
|
|
83
83
|
|
|
84
84
|
## Native HTTPS and IPv6
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
All seven supported versions can use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
|
|
87
87
|
|
|
88
88
|
```yaml
|
|
89
89
|
- id: auth-remote
|
|
@@ -124,7 +124,7 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
|
|
|
124
124
|
|
|
125
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.
|
|
126
126
|
|
|
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
|
|
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 routes on all seven use the normalized native bind authority and 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.
|
|
128
128
|
|
|
129
129
|
## Start and verify the public entry
|
|
130
130
|
|
|
@@ -137,10 +137,12 @@ Startup prints the actual protocol/address/port and one distinct public root, de
|
|
|
137
137
|
|
|
138
138
|
## Backup, recovery and changes
|
|
139
139
|
|
|
140
|
+
Before upgrading an old deployment to `0.3.1`, stop DSH and back up the authentication directory, profile patch and package/lock files. Keep access private and retain independent `webserver disabled: true`. Upgrade DSH to a listed target first (recommended `0.2.1-rc.4`), then install the plugin and verify readiness, anonymous denial, login and revocation. The six retired hosts cannot install `0.3.1`; do not grant a version-risk exemption. To roll back, stop the service, select an explicit old host (for example `0.2.1-alpha.2`) with last supported plugin `0.2.0`, and restore matching package/lock/patch backups. This migration does not change authentication data format; still check schema when restoring and never overwrite live state.
|
|
141
|
+
|
|
140
142
|
Stop DSH and verify it released the profile lock before copying `~/.dsh/profiles/web/auth-remote/auth-state.json`. Keep the copy in a private directory (0700) with file mode 0600. It contains password hashes, the TOTP secret, backup-code hashes and sessions. Do not copy an in-progress temporary file, overwrite live locked state or commit it. Back up the corresponding profile patch and package/lock files.
|
|
141
143
|
|
|
142
144
|
For recovery, stop DSH, check schema/package compatibility, restore with private ownership/mode, then check readiness and CLI `status --json`. Local `reset-password`, `reset-totp` and `revoke-sessions` revoke sessions. A lost management response has an uncertain outcome; inspect status before another mutation.
|
|
143
145
|
|
|
144
146
|
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.
|
|
145
147
|
|
|
146
|
-
Official DeepSeek
|
|
148
|
+
Official DeepSeek authorization on all seven uses the [README manual callback dialog](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. `/auth-remote/account/*` retains the session/origin gate and same-origin JSON POSTs; direct HTTP access to native `/oauth/callback` cannot complete this handoff. No proxy exception, broader paths or cross-site allowance is required.
|
package/docs/deployment.zh-CN.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[English](deployment.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本指南面向未发布插件候选 `0.3.1` 与推荐 DSH `0.2.1-rc.4`,使用默认 `~/.dsh` 数据目录。七版支持/日期见 [README](../README.zh-CN.md#dsh-兼容性),旧组合与分发事实见[历史](support-history.zh-CN.md#by-dsh)。源码构建见[开发指南](development.zh-CN.md)。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
下列原生能力适用于 `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`、`0.2.1-rc.3`、`0.2.1-rc.4`。
|
|
8
8
|
|
|
9
9
|
## 从 npm 最小化安装
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`0.3.1` 尚未发布;只有[精确分发记录](support-history.zh-CN.md#plugin-0.3.1)确认发布后才运行下方 npm 安装。准备期间用已验证本地归档路径 `./artifacts/dsh-auth-remote-0.3.1.tgz` 替代包名。保持同一默认 `web` profile:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
dsh --version
|
|
15
|
-
dsh plugin --profile web add dsh-auth-remote@0.
|
|
15
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.1
|
|
16
16
|
dsh plugin --profile web list
|
|
17
17
|
dsh web --no-open --port 13090
|
|
18
18
|
```
|
|
@@ -53,20 +53,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
|
|
|
53
53
|
|
|
54
54
|
以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
|
|
55
55
|
|
|
56
|
-
| 字段 | 生效值
|
|
57
|
-
| --------------------- |
|
|
58
|
-
| `publicUrl` |
|
|
59
|
-
| `host` | CLI
|
|
60
|
-
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。
|
|
61
|
-
| `tlsCert`、`tlsKey` |
|
|
62
|
-
| `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。
|
|
63
|
-
| `manualAccountLogin` | 默认
|
|
64
|
-
| `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。
|
|
65
|
-
| `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。
|
|
56
|
+
| 字段 | 生效值 |
|
|
57
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
58
|
+
| `publicUrl` | CLI `--public-url` 整项覆盖文件,其次旧单项迁移、实际监听根。只接纳 HTTP(S) 根 URL,可带末尾斜杠,无凭据/子路径/查询/片段。 |
|
|
59
|
+
| `host` | CLI、文件、默认 `127.0.0.1`。具体 IPv4/IPv6(含 mapped),拒绝 DNS 与通配绑定。 |
|
|
60
|
+
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
|
|
61
|
+
| `tlsCert`、`tlsKey` | 文件字段或 CLI `--tls-cert`/`--tls-key` 必须成对,CLI 整组覆盖,不混来源,不读未采用文件。省略即 HTTP。 |
|
|
62
|
+
| `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
|
|
63
|
+
| `manualAccountLogin` | 默认 true,原生 Settings 写当前 profile override;保存立即影响新授权且重启保留,不重启认证。false 保留已接纳授权和官方凭据。七版完整回归,未来准入及必要 API 见 README。 |
|
|
64
|
+
| `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
|
|
65
|
+
| `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
|
|
66
66
|
|
|
67
67
|
**特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
全部支持版本中,`dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别覆盖文件 host、port、URL。监听使用实际空闲端口,公开根地址保持显式值,代理须到达该实际端口;仅覆盖 port 时可省略 host。
|
|
70
70
|
|
|
71
71
|
例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
|
|
72
72
|
|
|
@@ -77,13 +77,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
77
77
|
|
|
78
78
|
只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
全部支持版本原生提供 `--public-url`、IPv6 和 TLS;本候选已移除旧版未知参数及不支持传输分支。
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
七版均把最终 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`;测试仍扫描所有 Web 提示段,要求无重复地址或 token。
|
|
83
83
|
|
|
84
84
|
## 原生 HTTPS 与 IPv6
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
全部七个支持版本都可合并以下完整认证条目提供 IPv6 回环 HTTPS,使用自己的证书/私钥:
|
|
87
87
|
|
|
88
88
|
```yaml
|
|
89
89
|
- id: auth-remote
|
|
@@ -124,7 +124,7 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2
|
|
|
124
124
|
|
|
125
125
|
插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
|
|
126
126
|
|
|
127
|
-
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection
|
|
127
|
+
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。七版普通路径统一使用归一化原生 bind authority,经过完整会话认证。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
|
|
128
128
|
|
|
129
129
|
## 启动并验证公开入口
|
|
130
130
|
|
|
@@ -137,10 +137,12 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2
|
|
|
137
137
|
|
|
138
138
|
## 备份、恢复与变更
|
|
139
139
|
|
|
140
|
+
升级旧部署到 `0.3.1` 前,停止 DSH 并备份认证目录、profile patch、package/lock;保持入口私有和独立 `webserver disabled: true`。先把宿主升级至所列七版(推荐 `0.2.1-rc.4`),再安装新插件并核对 ready、匿名拒绝、登录及撤销。六个已退役宿主不能安装 `0.3.1`,不要授予版本风险豁免。回退时停服,选择明确旧宿主(例如 `0.2.1-alpha.2`)与最后支持插件 `0.2.0`,恢复匹配的包/锁/patch 备份。此次迁移不改变认证数据格式;恢复时仍核对 schema,禁止覆盖运行中的状态。
|
|
141
|
+
|
|
140
142
|
停止 DSH 并确认释放 profile 锁,再复制 `~/.dsh/profiles/web/auth-remote/auth-state.json`。副本目录权限 0700、文件权限 0600;它含密码哈希、TOTP 密钥、备用码哈希和会话。不要复制写入中的临时文件、覆盖运行中持锁状态或提交 Git;同时备份对应 profile patch 和包/锁文件。
|
|
141
143
|
|
|
142
144
|
恢复时先停止 DSH,检查 schema/包兼容,以私有属主/权限恢复,再核对 ready 和 CLI `status --json`。本地 `reset-password`、`reset-totp`、`revoke-sessions` 均撤销会话。管理响应丢失后结果不明,先查状态再执行下一次修改。
|
|
143
145
|
|
|
144
146
|
外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
全部七个支持版本的官方 DeepSeek 账号授权使用 [README 的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器电脑无需监听器或开放回环端口。`/auth-remote/account/*` 保持相同会话/来源门禁,只接纳同源 JSON POST;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大路径或放宽跨站规则。
|