dsh-mobile 0.5.1 → 0.5.3

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/lib/index.d.mts CHANGED
@@ -28,9 +28,9 @@ interface DeviceStore {
28
28
  save(snapshot: DeviceSnapshot): Promise<void>;
29
29
  }
30
30
  /** Validate durable data before it can authorize a device. */
31
- declare function parseDeviceSnapshot(value: unknown, maximumDevices?: number): DeviceSnapshot;
31
+ export declare function parseDeviceSnapshot(value: unknown, maximumDevices?: number): DeviceSnapshot;
32
32
  /** Atomic JSON implementation with symlink refusal and owner-only file creation. */
33
- declare class JsonDeviceStore implements DeviceStore {
33
+ export declare class JsonDeviceStore implements DeviceStore {
34
34
  private readonly file;
35
35
  private readonly maximumDevices;
36
36
  constructor(file: string, maximumDevices?: number);
@@ -38,7 +38,7 @@ declare class JsonDeviceStore implements DeviceStore {
38
38
  save(snapshot: DeviceSnapshot): Promise<void>;
39
39
  }
40
40
  /** In-memory store useful for embedding and deterministic tests. */
41
- declare class MemoryDeviceStore implements DeviceStore {
41
+ export declare class MemoryDeviceStore implements DeviceStore {
42
42
  private snapshot;
43
43
  constructor(initial?: DeviceSnapshot);
44
44
  load(): Promise<DeviceSnapshot>;
@@ -49,7 +49,7 @@ declare class MemoryDeviceStore implements DeviceStore {
49
49
  //#endregion
50
50
  //#region src/access.d.ts
51
51
  /** Stable error categories converted to deliberately terse HTTP responses. */
52
- declare class AccessError extends Error {
52
+ export declare class AccessError extends Error {
53
53
  readonly status: number;
54
54
  readonly code: string;
55
55
  constructor(status: number, code: string);
@@ -105,7 +105,7 @@ interface DeviceSummary {
105
105
  readonly revokedAt?: number;
106
106
  }
107
107
  /** Fixed-window limiter whose attacker-controlled key table is itself bounded. */
108
- declare class BoundedRateLimiter {
108
+ export declare class BoundedRateLimiter {
109
109
  private readonly limit;
110
110
  private readonly windowMs;
111
111
  private readonly maximumKeys;
@@ -117,7 +117,7 @@ declare class BoundedRateLimiter {
117
117
  get size(): number;
118
118
  }
119
119
  /** Pairing, persistent-device, short-Session, revocation, and CSRF state machine. */
120
- declare class AccessController {
120
+ export declare class AccessController {
121
121
  private readonly store;
122
122
  private readonly options;
123
123
  private readonly now;
@@ -194,23 +194,23 @@ interface AuthoritySpec {
194
194
  readonly port?: number;
195
195
  }
196
196
  /** Parse and canonicalize one IPv4 or IPv6 CIDR. */
197
- declare function parseCidr(source: string): ParsedCidr;
197
+ export declare function parseCidr(source: string): ParsedCidr;
198
198
  /** Whether a directly connected socket address belongs to at least one allowed CIDR. */
199
- declare function addressAllowed(address: string | undefined, cidrs: readonly ParsedCidr[]): boolean;
199
+ export declare function addressAllowed(address: string | undefined, cidrs: readonly ParsedCidr[]): boolean;
200
200
  /** Whether an IP literal is loopback and therefore eligible for HTTP-only development. */
201
- declare function isLoopbackAddress(address: string): boolean;
201
+ export declare function isLoopbackAddress(address: string): boolean;
202
202
  /**
203
203
  * Whether a dotted-quad IPv4 literal is globally routable and therefore usable
204
204
  * as a public VPS / remote HTTPS endpoint. Rejects documentation addresses such
205
205
  * as 203.0.113.10 alongside private, shared, and reserved space.
206
206
  */
207
- declare function isGloballyRoutableIpv4(address: string): boolean;
207
+ export declare function isGloballyRoutableIpv4(address: string): boolean;
208
208
  /** Parse a bare host or host:port authority without accepting URL components. */
209
- declare function parseAuthority(source: string): AuthoritySpec;
209
+ export declare function parseAuthority(source: string): AuthoritySpec;
210
210
  /** Resolve an authority against the actual listener port. */
211
- declare function resolveAuthority(spec: AuthoritySpec, listenerPort: number): string;
211
+ export declare function resolveAuthority(spec: AuthoritySpec, listenerPort: number): string;
212
212
  /** Exact Host/Origin/CIDR policy for the directly exposed listener. */
213
- declare class RequestTrustPolicy {
213
+ export declare class RequestTrustPolicy {
214
214
  readonly cidrs: readonly ParsedCidr[];
215
215
  readonly authorities: ReadonlySet<string>;
216
216
  readonly origins: ReadonlySet<string>;
@@ -328,11 +328,11 @@ interface ResolvedGatewayConfig {
328
328
  readonly maxRateLimitKeys: number;
329
329
  }
330
330
  /** Loader-facing defaults; {@link parseGatewayConfig} enforces cross-field security rules. */
331
- declare const Config: z<PluginConfig>;
331
+ export declare const Config: z<PluginConfig>;
332
332
  /** Resolve the hidden runtime-control file independently from gateway configuration. */
333
- declare function parseControlFile(value: unknown): string;
333
+ export declare function parseControlFile(value: unknown): string;
334
334
  /** Parse configuration and reject unsafe topology, credential, and resource combinations. */
335
- declare function parseGatewayConfig(raw: unknown): ResolvedGatewayConfig;
335
+ export declare function parseGatewayConfig(raw: unknown): ResolvedGatewayConfig;
336
336
  //#endregion
337
337
  //#region src/control.d.ts
338
338
  /** Versioned durable preference for the resident mobile-access runtime. */
@@ -350,9 +350,9 @@ interface MobileAccessRuntime {
350
350
  close(): Promise<void>;
351
351
  }
352
352
  /** Validate control state loaded across the filesystem boundary. */
353
- declare function parseMobileAccessControlState(value: unknown): MobileAccessControlState;
353
+ export declare function parseMobileAccessControlState(value: unknown): MobileAccessControlState;
354
354
  /** Atomic JSON store whose absent-file state comes from the installation-time default. */
355
- declare class JsonMobileAccessControlStore implements MobileAccessControlStore {
355
+ export declare class JsonMobileAccessControlStore implements MobileAccessControlStore {
356
356
  private readonly file;
357
357
  private readonly initiallyEnabled;
358
358
  constructor(file: string, initiallyEnabled: boolean);
@@ -362,7 +362,7 @@ declare class JsonMobileAccessControlStore implements MobileAccessControlStore {
362
362
  save(state: MobileAccessControlState): Promise<void>;
363
363
  }
364
364
  /** Serialized persistent lifecycle for the gateway behind the always-loaded Cordis entry. */
365
- declare class MobileAccessGatewayController {
365
+ export declare class MobileAccessGatewayController {
366
366
  private readonly store;
367
367
  private readonly startRuntime;
368
368
  private runtime;
@@ -386,18 +386,18 @@ declare class MobileAccessGatewayController {
386
386
  //#endregion
387
387
  //#region src/websocket-paths.d.ts
388
388
  /** Cap the admin-approved extra WebSocket upgrade paths (exact pathnames). */
389
- declare const MAX_EXTRA_WEBSOCKET_PATHS = 16;
390
- declare const MAX_WEBSOCKET_PATH_LENGTH = 256;
389
+ export declare const MAX_EXTRA_WEBSOCKET_PATHS = 16;
390
+ export declare const MAX_WEBSOCKET_PATH_LENGTH = 256;
391
391
  /**
392
392
  * Validate one exact pathname for proxying. Query strings are matched at
393
393
  * upgrade time, so only the pathname is stored. Rejects anything the
394
394
  * gateway cannot match exactly.
395
395
  */
396
- declare function validateWebSocketPath(value: unknown): string;
396
+ export declare function validateWebSocketPath(value: unknown): string;
397
397
  /** Validate a whole replacement list all-or-nothing; duplicates collapse. */
398
- declare function normalizeWebSocketPaths(value: unknown): string[];
398
+ export declare function normalizeWebSocketPaths(value: unknown): string[];
399
399
  /** Cap remembered rejected upgrade paths offered for one-click approval. */
400
- declare const MAX_BLOCKED_UPGRADE_PATHS = 32;
400
+ export declare const MAX_BLOCKED_UPGRADE_PATHS = 32;
401
401
  interface BlockedUpgradePathEntry {
402
402
  readonly path: string;
403
403
  readonly attempts: number;
@@ -410,13 +410,13 @@ interface BlockedUpgradePathEntry {
410
410
  * Bounded and newest-first; a restart clears it (attempts reappear on
411
411
  * the next blocked handshake).
412
412
  */
413
- declare class BlockedUpgradePathLog {
413
+ export declare class BlockedUpgradePathLog {
414
414
  private readonly entries;
415
415
  record(pathname: string): void;
416
416
  report(): BlockedUpgradePathEntry[];
417
417
  }
418
418
  /** File-backed store shared by every gateway instance (LAN and remote). */
419
- declare class WebSocketPathStore {
419
+ export declare class WebSocketPathStore {
420
420
  private readonly file;
421
421
  private paths;
422
422
  private loaded;
@@ -431,7 +431,7 @@ declare class WebSocketPathStore {
431
431
  //#endregion
432
432
  //#region src/extensions.d.ts
433
433
  /** Maximum sizes enforced at the local-extension filesystem boundary. */
434
- declare const EXTENSION_LIMITS: Readonly<{
434
+ export declare const EXTENSION_LIMITS: Readonly<{
435
435
  manifest: number;
436
436
  script: number;
437
437
  css: number;
@@ -441,7 +441,7 @@ declare const EXTENSION_LIMITS: Readonly<{
441
441
  assetDepth: 8;
442
442
  }>;
443
443
  /** A controlled business failure returned by an extension action or route. */
444
- declare class MobileExtensionError extends Error {
444
+ export declare class MobileExtensionError extends Error {
445
445
  readonly code: string;
446
446
  readonly status: number;
447
447
  constructor(code: string, message: string, status?: number);
@@ -533,11 +533,11 @@ interface ActiveLocalExtension {
533
533
  readonly digest: string;
534
534
  }
535
535
  /** Validate a stable extension id. */
536
- declare function assertExtensionId(value: unknown): string;
536
+ export declare function assertExtensionId(value: unknown): string;
537
537
  /** Validate a manifest from JSON or a plugin definition. */
538
- declare function parseExtensionManifest(value: unknown): LocalExtensionManifest;
538
+ export declare function parseExtensionManifest(value: unknown): LocalExtensionManifest;
539
539
  /** Host registry and service consumed by both npm plugins and local extensions. */
540
- declare class MobileAccessService extends Service {
540
+ export declare class MobileAccessService extends Service {
541
541
  private readonly registered;
542
542
  private readonly local;
543
543
  private readonly retired;
@@ -592,13 +592,13 @@ declare class MobileAccessService extends Service {
592
592
  private retire;
593
593
  }
594
594
  /** Construct the service in a Cordis plugin without importing DSH internals. */
595
- declare function createMobileAccessService(ctx: Context): MobileAccessService;
595
+ export declare function createMobileAccessService(ctx: Context): MobileAccessService;
596
596
  //#endregion
597
597
  //#region src/gateway.d.ts
598
598
  /** Rewrite the dedicated mobile graph; exclusions are opt-in and leave stock DSH unchanged. */
599
- declare function rewriteMobileIndex(html: string, excludedClientModules?: readonly string[]): string;
599
+ export declare function rewriteMobileIndex(html: string, excludedClientModules?: readonly string[]): string;
600
600
  /** Authenticated TLS edge in front of the ordinary loopback-only DSH Web server. */
601
- declare class MobileAccessGateway {
601
+ export declare class MobileAccessGateway {
602
602
  readonly config: ResolvedGatewayConfig;
603
603
  private readonly extensions?;
604
604
  private readonly upstreamAuthenticatedUrl?;
@@ -773,13 +773,13 @@ declare class MobileAccessGateway {
773
773
  }
774
774
  //#endregion
775
775
  //#region src/http-security.d.ts
776
- declare const DEVICE_COOKIE = "dsh_ma_device";
777
- declare const SESSION_COOKIE = "dsh_ma_session";
778
- declare const CSRF_COOKIE = "dsh_ma_csrf";
779
- declare const CSRF_HEADER = "x-dsh-mobile-csrf";
780
- declare const LOCAL_ADMIN_PREFIX = "/api/mobile-access";
781
- declare const AUTH_PREFIX = "/mobile-access";
782
- declare const WS_PATHS: Set<string>;
776
+ export declare const DEVICE_COOKIE = "dsh_ma_device";
777
+ export declare const SESSION_COOKIE = "dsh_ma_session";
778
+ export declare const CSRF_COOKIE = "dsh_ma_csrf";
779
+ export declare const CSRF_HEADER = "x-dsh-mobile-csrf";
780
+ export declare const LOCAL_ADMIN_PREFIX = "/api/mobile-access";
781
+ export declare const AUTH_PREFIX = "/mobile-access";
782
+ export declare const WS_PATHS: Set<string>;
783
783
  //#endregion
784
784
  //#region src/frp-component.d.ts
785
785
  interface FrpArtifact {
@@ -792,7 +792,7 @@ interface FrpArtifact {
792
792
  readonly executableName: string;
793
793
  }
794
794
  /** Pinned official FRP release metadata for supported desktop targets. */
795
- declare const FRP_COMPONENT_RELEASES: Readonly<Record<string, FrpArtifact>>;
795
+ export declare const FRP_COMPONENT_RELEASES: Readonly<Record<string, FrpArtifact>>;
796
796
  /** Public, credential-free description of the managed FRP client. */
797
797
  interface FrpComponentStatus {
798
798
  readonly supported: boolean;
@@ -814,7 +814,7 @@ interface FrpComponentManagerOptions {
814
814
  readonly inspectExecutable?: (executable: string) => Promise<string>;
815
815
  }
816
816
  /** Owns the optional official frpc binary inside the DSH Mobile state directory. */
817
- declare class FrpComponentManager {
817
+ export declare class FrpComponentManager {
818
818
  readonly executable: string;
819
819
  readonly componentRoot: string;
820
820
  readonly componentStorage: string;
@@ -842,13 +842,13 @@ declare class FrpComponentManager {
842
842
  //#endregion
843
843
  //#region src/frp-template.d.ts
844
844
  /** Loopback-only HTTP vhost port used between Caddy and frps. */
845
- declare const FRP_VHOST_HTTP_PORT = 7080;
845
+ export declare const FRP_VHOST_HTTP_PORT = 7080;
846
846
  /** Caddy snippet owned entirely by DSH Mobile; the main Caddyfile only imports it. */
847
- declare const FRP_CADDY_SNIPPET_PATH = "/etc/caddy/dsh-mobile-dsh.caddy";
847
+ export declare const FRP_CADDY_SNIPPET_PATH = "/etc/caddy/dsh-mobile-dsh.caddy";
848
848
  /** First line of the owned snippet; also the legacy whole-file marker. */
849
- declare const FRP_CADDY_SNIPPET_MARKER = "# Managed by DSH Mobile - snippet, safe to delete";
849
+ export declare const FRP_CADDY_SNIPPET_MARKER = "# Managed by DSH Mobile - snippet, safe to delete";
850
850
  /** Exact line the main Caddyfile must contain (uncommented) for the site to load. */
851
- declare const FRP_CADDY_IMPORT_LINE = "import /etc/caddy/dsh-mobile-dsh.caddy";
851
+ export declare const FRP_CADDY_IMPORT_LINE = "import /etc/caddy/dsh-mobile-dsh.caddy";
852
852
  /**
853
853
  * Entry TLS mode for the FRP channel.
854
854
  *
@@ -877,7 +877,7 @@ interface CaddySiteOptions {
877
877
  * signature) or a full {@link CaddySiteOptions} object, so existing callers keep
878
878
  * working unchanged.
879
879
  */
880
- declare function createCaddySite(publicHost: string, options?: CaddySiteOptions | string): string;
880
+ export declare function createCaddySite(publicHost: string, options?: CaddySiteOptions | string): string;
881
881
  /**
882
882
  * Build the only supported frps config and Caddy snippet from validated user inputs.
883
883
  *
@@ -885,15 +885,15 @@ declare function createCaddySite(publicHost: string, options?: CaddySiteOptions
885
885
  * passes the user's real vhost port, and `self-signed` is rejected because that
886
886
  * mode publishes a raw TCP proxy instead of an HTTP vhost.
887
887
  */
888
- declare function createRestrictedFrpServerTemplate(serverPort: number, token: string, publicOrigin: string, options?: CaddySiteOptions): string;
888
+ export declare function createRestrictedFrpServerTemplate(serverPort: number, token: string, publicOrigin: string, options?: CaddySiteOptions): string;
889
889
  //#endregion
890
890
  //#region src/frp-config.d.ts
891
891
  /** How the restricted FRP channel is provisioned on the VPS. */
892
892
  type FrpMode = 'deploy' | 'attach';
893
893
  /** Public entry port used by the self-signed TCP passthrough (never 443 by requirement). */
894
- declare const FRP_DEFAULT_PUBLIC_PORT = 33080;
894
+ export declare const FRP_DEFAULT_PUBLIC_PORT = 33080;
895
895
  /** Ports owned by other DSH Mobile listeners; the public entry may never reuse them. */
896
- declare const FRP_RESERVED_PORTS: readonly number[];
896
+ export declare const FRP_RESERVED_PORTS: readonly number[];
897
897
  /** Credentials and endpoints required by the restricted FRP provider. */
898
898
  interface FrpSettings {
899
899
  readonly version: 1;
@@ -921,6 +921,8 @@ interface FrpConfigurationStatus {
921
921
  readonly publicOrigin?: string;
922
922
  readonly vhostHttpPort: number;
923
923
  readonly storagePath: string;
924
+ /** Proxy name frpc registers on the shared frps; unique per DSH installation. */
925
+ readonly proxyName: string;
924
926
  readonly errorCode?: string;
925
927
  /** Present only when the saved configuration leaves the upstream `deploy` default. */
926
928
  readonly mode?: FrpMode;
@@ -930,31 +932,31 @@ interface FrpConfigurationStatus {
930
932
  readonly publicPort?: number;
931
933
  }
932
934
  /** Validate the FRP server hostname or IP address. */
933
- declare function validateFrpServerAddress(value: unknown): string;
935
+ export declare function validateFrpServerAddress(value: unknown): string;
934
936
  /** Validate the FRP control port. */
935
- declare function validateFrpServerPort(value: unknown): number;
937
+ export declare function validateFrpServerPort(value: unknown): number;
936
938
  /** Validate a high-entropy FRP token before durable storage. */
937
- declare function validateFrpToken(value: unknown): string;
939
+ export declare function validateFrpToken(value: unknown): string;
938
940
  /** Validate the public HTTPS origin used by Caddy and Android pairing. */
939
- declare function validateFrpPublicOrigin(value: unknown): string;
941
+ export declare function validateFrpPublicOrigin(value: unknown): string;
940
942
  /** Validate the provisioning mode. */
941
- declare function validateFrpMode(value: unknown): FrpMode;
943
+ export declare function validateFrpMode(value: unknown): FrpMode;
942
944
  /** Validate the entry TLS mode. */
943
- declare function validateFrpEntryTls(value: unknown): FrpEntryTls;
945
+ export declare function validateFrpEntryTls(value: unknown): FrpEntryTls;
944
946
  /** Validate the loopback vhost port of the target frps. */
945
- declare function validateFrpVhostHttpPort(value: unknown): number;
947
+ export declare function validateFrpVhostHttpPort(value: unknown): number;
946
948
  /** Validate the public entry port of the self-signed TCP proxy. */
947
- declare function validateFrpPublicPort(value: unknown): number;
949
+ export declare function validateFrpPublicPort(value: unknown): number;
948
950
  /** Effective provisioning mode; an absent field keeps the upstream behaviour. */
949
- declare function resolveFrpMode(settings: FrpSettings): FrpMode;
951
+ export declare function resolveFrpMode(settings: FrpSettings): FrpMode;
950
952
  /** Effective entry TLS mode; an absent field keeps the upstream behaviour. */
951
- declare function resolveFrpEntryTls(settings: FrpSettings): FrpEntryTls;
953
+ export declare function resolveFrpEntryTls(settings: FrpSettings): FrpEntryTls;
952
954
  /** Effective loopback vhost port; an absent field keeps the upstream behaviour. */
953
- declare function resolveFrpVhostHttpPort(settings: FrpSettings): number;
955
+ export declare function resolveFrpVhostHttpPort(settings: FrpSettings): number;
954
956
  /** Effective public entry port of the self-signed passthrough. */
955
- declare function resolveFrpPublicPort(settings: FrpSettings): number;
957
+ export declare function resolveFrpPublicPort(settings: FrpSettings): number;
956
958
  /** True when the gateway terminates TLS itself behind a raw frps TCP proxy. */
957
- declare function isFrpSelfSignedIngress(settings: FrpSettings): boolean;
959
+ export declare function isFrpSelfSignedIngress(settings: FrpSettings): boolean;
958
960
  /**
959
961
  * Parse FRP settings at the loopback request and filesystem boundaries.
960
962
  *
@@ -965,37 +967,77 @@ declare function isFrpSelfSignedIngress(settings: FrpSettings): boolean;
965
967
  * attach mode with a public-CA entry must state the user's real vhost port —
966
968
  * silently assuming 7080 would disable the plaintext-exposure gate.
967
969
  */
968
- declare function parseFrpSettings(value: unknown): FrpSettings;
970
+ export declare function parseFrpSettings(value: unknown): FrpSettings;
969
971
  /**
970
972
  * Merge a partial VPS request body with the saved configuration so a blank
971
973
  * field keeps its saved value ("已保存时可留空"). Every merged field is still
972
974
  * validated; with nothing saved and nothing supplied the result reports a
973
975
  * missing configuration instead of silently deploying blanks.
974
976
  */
975
- declare function mergeSavedFrpSettings(partial: Readonly<Record<string, unknown>>, saved: FrpSettings | undefined): FrpSettings;
977
+ export declare function mergeSavedFrpSettings(partial: Readonly<Record<string, unknown>>, saved: FrpSettings | undefined): FrpSettings;
976
978
  /** Merge a VPS target (address and control port) with the saved configuration. */
977
- declare function mergeSavedFrpTarget(partial: Readonly<Record<string, unknown>>, saved: FrpSettings | undefined): {
979
+ export declare function mergeSavedFrpTarget(partial: Readonly<Record<string, unknown>>, saved: FrpSettings | undefined): {
978
980
  readonly serverAddress: string;
979
981
  readonly serverPort: number;
980
982
  };
983
+ /**
984
+ * Legacy proxy name, kept only as the default of {@link createFrpcToml}.
985
+ *
986
+ * A shared frps accepts one proxy per name across *all* its clients, so a fixed
987
+ * name let any other DSH installation — or a not yet reaped session of this one —
988
+ * own `dsh-mobile` first. frpc then logged `start error: proxy name [dsh-mobile]
989
+ * is already in use`, kept running without publishing the entry port, and the
990
+ * start-up self-check ended in `frp_start_timeout` ("the public endpoint did not
991
+ * become ready"). Product callers therefore pass an installation-derived name
992
+ * from {@link frpProxyName}; this constant only keeps the exported API and the
993
+ * byte-for-byte compatibility test working for legacy callers.
994
+ */
995
+ export declare const FRP_DEFAULT_PROXY_NAME = "dsh-mobile";
996
+ /**
997
+ * Validate a proxy name for the generated frpc configuration.
998
+ *
999
+ * frps accepts one proxy per name on the whole server, so the name must be a
1000
+ * single safe token: no whitespace, no quotes, no path or bracket characters.
1001
+ */
1002
+ export declare function validateFrpProxyName(value: unknown): string;
1003
+ /**
1004
+ * Proxy name for one DSH installation.
1005
+ *
1006
+ * Derived from the stable installation identity so two computers sharing one
1007
+ * frps never register the same proxy, while a single installation keeps the
1008
+ * same name across restarts (so its own stale registration is the only possible
1009
+ * conflict, and that one expires with the frps heartbeat).
1010
+ */
1011
+ export declare function frpProxyName(instanceId: string): string;
981
1012
  /**
982
1013
  * Build the single-purpose frpc configuration for the current loopback gateway.
983
1014
  *
984
1015
  * The default (public-CA) entry is an HTTP vhost behind Caddy and is emitted byte
985
1016
  * for byte as before. The self-signed entry cannot use a vhost at all: frps only
986
1017
  * forwards raw TCP, and the gateway terminates TLS on that connection.
1018
+ *
1019
+ * `proxyName` defaults to the legacy fixed name only for legacy callers; the
1020
+ * provider and the attach preview always pass {@link frpProxyName}.
987
1021
  */
988
- declare function createFrpcToml(settings: FrpSettings, localPort: number): string;
1022
+ export declare function createFrpcToml(settings: FrpSettings, localPort: number, proxyName?: string): string;
989
1023
  /** Build the matching restricted frps and Caddy templates for one VPS. */
990
- declare function createFrpServerTemplate(settings: FrpSettings): string;
1024
+ export declare function createFrpServerTemplate(settings: FrpSettings): string;
991
1025
  /** Owns private FRP settings and generation-specific frpc configuration. */
992
- declare class FrpConfigStore {
1026
+ export declare class FrpConfigStore {
993
1027
  readonly stateRoot: string;
994
1028
  readonly settingsFile: string;
995
1029
  readonly runtimeConfigFile: string;
1030
+ /**
1031
+ * Proxy name every generated frpc.toml registers.
1032
+ *
1033
+ * Injected by the composing plugin ({@link frpProxyName}) so one frps can
1034
+ * serve several DSH installations; the legacy fixed name stays the default
1035
+ * for direct constructions in tests and for the exported API.
1036
+ */
1037
+ readonly proxyName: string;
996
1038
  private settingsValue;
997
1039
  private errorCode;
998
- constructor(stateDirectory: string);
1040
+ constructor(stateDirectory: string, proxyName?: string);
999
1041
  /** Load private settings while rejecting links, oversized files, and unknown fields. */
1000
1042
  initialize(): Promise<void>;
1001
1043
  /**
@@ -1018,13 +1060,13 @@ declare class FrpConfigStore {
1018
1060
  //#endregion
1019
1061
  //#region src/frp-attach.d.ts
1020
1062
  /** Default proof path used to confirm the public entry answered from this computer. */
1021
- declare const FRP_ATTACH_DISCOVERY_PATH = "/mobile-access/discovery";
1063
+ export declare const FRP_ATTACH_DISCOVERY_PATH = "/mobile-access/discovery";
1022
1064
  /** Declaration printed above the VPS half of an attach template. */
1023
- declare const FRP_ATTACH_VPS_DECLARATION: string;
1065
+ export declare const FRP_ATTACH_VPS_DECLARATION: string;
1024
1066
  /** Declaration printed above the local half of an attach template. */
1025
- declare const FRP_ATTACH_LOCAL_DECLARATION = "# 本机只写入 frpc.toml 并启动 frpc:不安装、不改动本机 frps,也不改动 DSH 自身配置。";
1067
+ export declare const FRP_ATTACH_LOCAL_DECLARATION = "# 本机只写入 frpc.toml 并启动 frpc:不安装、不改动本机 frps,也不改动 DSH 自身配置。";
1026
1068
  /** Declaration for the self-signed passthrough, which keeps its CA on this computer. */
1027
- declare const FRP_ATTACH_SELF_SIGNED_DECLARATION: string;
1069
+ export declare const FRP_ATTACH_SELF_SIGNED_DECLARATION: string;
1028
1070
  /** Optional inputs for attach artefacts; every field falls back to the validated settings. */
1029
1071
  interface FrpAttachOptions {
1030
1072
  readonly vhostHttpPort?: number;
@@ -1032,6 +1074,14 @@ interface FrpAttachOptions {
1032
1074
  readonly certDir?: string;
1033
1075
  /** Absolute path of the plugin-written frpc.toml, used for the `frpc verify` self-check. */
1034
1076
  readonly configFile?: string;
1077
+ /**
1078
+ * Proxy name the previewed frpc.toml registers.
1079
+ *
1080
+ * Defaults to the legacy fixed name; the panel and the provider pass the
1081
+ * installation-derived {@link frpProxyName} so a preview never describes a
1082
+ * registration that would collide on a shared frps.
1083
+ */
1084
+ readonly proxyName?: string;
1035
1085
  /** Loopback port the gateway will listen on; only a placeholder inside the copied runbook. */
1036
1086
  readonly localPort?: number;
1037
1087
  /**
@@ -1056,7 +1106,7 @@ interface FrpAttachTemplate {
1056
1106
  * artefact is produced. Attach never installs frps, so it must know the user's
1057
1107
  * real vhost port (unless the self-signed passthrough removes the vhost entirely).
1058
1108
  */
1059
- declare function validateAttachSettings(settings: FrpSettings, options?: FrpAttachOptions): void;
1109
+ export declare function validateAttachSettings(settings: FrpSettings, options?: FrpAttachOptions): void;
1060
1110
  /** Shared VPS-side inputs of both the copied runbook and the panel plan. */
1061
1111
  interface FrpAttachVpsParts {
1062
1112
  readonly publicHost: string;
@@ -1070,7 +1120,7 @@ interface FrpAttachVpsParts {
1070
1120
  * Derive every VPS-side value once so the copied runbook and the panel plan can
1071
1121
  * never drift apart.
1072
1122
  */
1073
- declare function frpAttachVpsParts(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachVpsParts;
1123
+ export declare function frpAttachVpsParts(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachVpsParts;
1074
1124
  /**
1075
1125
  * Build the attach artefact for an existing frps.
1076
1126
  *
@@ -1080,9 +1130,9 @@ declare function frpAttachVpsParts(settings: FrpSettings, options?: FrpAttachOpt
1080
1130
  * contains the generated frpc.toml plus its `frpc verify` self-check. Neither
1081
1131
  * half installs, rewrites, or restarts the user's frps.
1082
1132
  */
1083
- declare function createFrpAttachTemplateParts(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachTemplate;
1133
+ export declare function createFrpAttachTemplateParts(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachTemplate;
1084
1134
  /** Combined attach artefact, ready for the clipboard. */
1085
- declare function createFrpAttachTemplate(settings: FrpSettings, options?: FrpAttachOptions): string;
1135
+ export declare function createFrpAttachTemplate(settings: FrpSettings, options?: FrpAttachOptions): string;
1086
1136
  //#endregion
1087
1137
  //#region src/frp-attach-plan.d.ts
1088
1138
  /** Stable step identifiers; the panel maps each one to a translated title. */
@@ -1121,11 +1171,11 @@ interface FrpAttachPlan {
1121
1171
  * filesystem write: the caller renders or copies the steps and the local frpc
1122
1172
  * configuration is written by the ordinary provider lifecycle.
1123
1173
  */
1124
- declare function createFrpAttachPlan(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachPlan;
1174
+ export declare function createFrpAttachPlan(settings: FrpSettings, options?: FrpAttachOptions): FrpAttachPlan;
1125
1175
  //#endregion
1126
1176
  //#region src/cert-renewal.d.ts
1127
1177
  /** Days left below which the entry certificate is reported as expiring. */
1128
- declare const CERT_EXPIRING_DAYS = 2;
1178
+ export declare const CERT_EXPIRING_DAYS = 2;
1129
1179
  /** Read-only lifetime verdict for one certificate; never mutates or renews anything. */
1130
1180
  interface CertRenewalStatus {
1131
1181
  readonly state: 'ok' | 'expiring' | 'expired' | 'unknown';
@@ -1137,14 +1187,14 @@ interface CertRenewalStatus {
1137
1187
  readonly errorCode?: string;
1138
1188
  }
1139
1189
  /** Evaluate one `notAfter` timestamp against the current clock. */
1140
- declare function evaluateCertificateLifetime(notAfter: number, now?: number): CertRenewalStatus;
1190
+ export declare function evaluateCertificateLifetime(notAfter: number, now?: number): CertRenewalStatus;
1141
1191
  /**
1142
1192
  * Read one PEM certificate from disk and report only its lifetime.
1143
1193
  *
1144
1194
  * A missing or unreadable file yields `unknown` with the stable
1145
1195
  * `frp_attach_cert_unknown` code so the panel can explain how to re-issue it.
1146
1196
  */
1147
- declare function readCertificateRenewal(file: string, now?: number): Promise<CertRenewalStatus>;
1197
+ export declare function readCertificateRenewal(file: string, now?: number): Promise<CertRenewalStatus>;
1148
1198
  /**
1149
1199
  * Ask a live TLS endpoint for its leaf certificate and report its lifetime.
1150
1200
  *
@@ -1152,7 +1202,7 @@ declare function readCertificateRenewal(file: string, now?: number): Promise<Cer
1152
1202
  * an endpoint whose trust anchor is already pinned elsewhere, and a self-signed
1153
1203
  * leaf is the expected answer for the passthrough entry.
1154
1204
  */
1155
- declare function probeOriginCertificate(host: string, port: number, timeoutMs?: number): Promise<CertRenewalStatus>;
1205
+ export declare function probeOriginCertificate(host: string, port: number, timeoutMs?: number): Promise<CertRenewalStatus>;
1156
1206
  //#endregion
1157
1207
  //#region src/frp-ingress.d.ts
1158
1208
  /** Private files owned by the self-signed FRP ingress. */
@@ -1192,7 +1242,7 @@ interface FrpIngressSelfCheck {
1192
1242
  };
1193
1243
  }
1194
1244
  /** Private ingress directory, always a sibling of the remote device file. */
1195
- declare function frpIngressPaths(stateFile: string): FrpIngressPaths;
1245
+ export declare function frpIngressPaths(stateFile: string): FrpIngressPaths;
1196
1246
  /**
1197
1247
  * Materialize the CA and leaf the gateway terminates TLS with.
1198
1248
  *
@@ -1200,14 +1250,14 @@ declare function frpIngressPaths(stateFile: string): FrpIngressPaths;
1200
1250
  * replaced silently. The leaf is re-signed when expiring or no longer valid for
1201
1251
  * the public IPv4, and the running gateway reloads it after a renewal check.
1202
1252
  */
1203
- declare function ensureFrpIngressCertificate(settings: FrpSettings, stateFile: string, now?: number, expectedCaFingerprint?: string): Promise<FrpIngressCertificate>;
1253
+ export declare function ensureFrpIngressCertificate(settings: FrpSettings, stateFile: string, now?: number, expectedCaFingerprint?: string): Promise<FrpIngressCertificate>;
1204
1254
  /**
1205
1255
  * Build the read-only self-check payload shown in the desktop panel.
1206
1256
  *
1207
1257
  * No secret ever leaves this function: the CA is reported by fingerprint only,
1208
1258
  * and the token is never read.
1209
1259
  */
1210
- declare function frpIngressSelfCheck(settings: FrpSettings, stateFile: string): Promise<FrpIngressSelfCheck>;
1260
+ export declare function frpIngressSelfCheck(settings: FrpSettings, stateFile: string): Promise<FrpIngressSelfCheck>;
1211
1261
  //#endregion
1212
1262
  //#region src/managed-setup.d.ts
1213
1263
  /** One host a server leaf must be valid for: an IP literal, a DNS name, or both. */
@@ -1234,7 +1284,7 @@ interface ServerCertificateAuthority {
1234
1284
  * required for console addresses (`type: 7`), DNS entries (`type: 2`) cover named
1235
1285
  * hosts; the Android client accepts either through its pinned CA.
1236
1286
  */
1237
- declare function issueServerCertificate(authority: ServerCertificateAuthority, target: ServerCertificateTarget, output: ServerCertificateFiles, lifetimeDays?: number): Promise<void>;
1287
+ export declare function issueServerCertificate(authority: ServerCertificateAuthority, target: ServerCertificateTarget, output: ServerCertificateFiles, lifetimeDays?: number): Promise<void>;
1238
1288
  //#endregion
1239
1289
  //#region src/remote.d.ts
1240
1290
  /** Remote transports supported by the desktop plugin and Android client. */
@@ -1264,11 +1314,11 @@ interface RemoteProviderState {
1264
1314
  readonly version: 1;
1265
1315
  readonly provider: RemoteProvider;
1266
1316
  }
1267
- declare const REMOTE_PROVIDERS: readonly RemoteProvider[];
1317
+ export declare const REMOTE_PROVIDERS: readonly RemoteProvider[];
1268
1318
  /** Validate the provider selection loaded across the filesystem boundary. */
1269
- declare function parseRemoteProviderState(value: unknown): RemoteProviderState;
1319
+ export declare function parseRemoteProviderState(value: unknown): RemoteProviderState;
1270
1320
  /** Atomic selection store whose absent-file state uses the configured default. */
1271
- declare class JsonRemoteProviderStore {
1321
+ export declare class JsonRemoteProviderStore {
1272
1322
  private readonly file;
1273
1323
  private readonly defaultProvider;
1274
1324
  constructor(file: string, defaultProvider: RemoteProvider);
@@ -1276,7 +1326,7 @@ declare class JsonRemoteProviderStore {
1276
1326
  save(state: RemoteProviderState): Promise<void>;
1277
1327
  }
1278
1328
  /** Resolve the first-run provider without letting environment values bypass validation. */
1279
- declare function configuredRemoteProvider(environment: NodeJS.ProcessEnv): RemoteProvider;
1329
+ export declare function configuredRemoteProvider(environment: NodeJS.ProcessEnv): RemoteProvider;
1280
1330
  //#endregion
1281
1331
  //#region src/frp.d.ts
1282
1332
  /** Product-facing states for the restricted self-hosted FRP transport. */
@@ -1345,7 +1395,7 @@ interface FrpControllerOptions {
1345
1395
  readonly retryIntervalMs?: number;
1346
1396
  }
1347
1397
  /** Owns frpc, its generation-specific configuration, and the remote gateway. */
1348
- declare class FrpController implements RemoteProviderController {
1398
+ export declare class FrpController implements RemoteProviderController {
1349
1399
  private readonly options;
1350
1400
  private enabled;
1351
1401
  private initialized;
@@ -1396,7 +1446,7 @@ declare class FrpController implements RemoteProviderController {
1396
1446
  }
1397
1447
  //#endregion
1398
1448
  //#region src/origin-proxy-config.d.ts
1399
- declare const DEFAULT_ORIGIN_LISTEN_PORT = 3444;
1449
+ export declare const DEFAULT_ORIGIN_LISTEN_PORT = 3444;
1400
1450
  /** A private HTTP listener behind a user-managed HTTPS reverse proxy. */
1401
1451
  interface OriginSettings {
1402
1452
  readonly version: 1;
@@ -1417,16 +1467,16 @@ interface OriginConfigurationStatus {
1417
1467
  readonly errorCode?: string;
1418
1468
  }
1419
1469
  /** Require a public HTTPS origin; custom external ports are supported. */
1420
- declare function validateOriginPublicOrigin(value: unknown): string;
1470
+ export declare function validateOriginPublicOrigin(value: unknown): string;
1421
1471
  /** Bind only one explicit loopback or RFC1918 IPv4 interface, never all interfaces. */
1422
- declare function validateOriginListenHost(value: unknown): string;
1423
- declare function validateOriginListenPort(value: unknown): number;
1472
+ export declare function validateOriginListenHost(value: unknown): string;
1473
+ export declare function validateOriginListenPort(value: unknown): number;
1424
1474
  /** Authorize direct proxy socket peers, not untrusted forwarded client headers. */
1425
- declare function validateOriginAllowedCidrs(value: unknown, listenHost: string): readonly string[];
1475
+ export declare function validateOriginAllowedCidrs(value: unknown, listenHost: string): readonly string[];
1426
1476
  /** Validate both saved settings and local administrative requests. */
1427
- declare function parseOriginSettings(value: unknown): OriginSettings;
1477
+ export declare function parseOriginSettings(value: unknown): OriginSettings;
1428
1478
  /** Owns only origin settings; shared paired-device storage is never removed. */
1429
- declare class OriginConfigStore {
1479
+ export declare class OriginConfigStore {
1430
1480
  readonly stateRoot: string;
1431
1481
  readonly settingsFile: string;
1432
1482
  private settingsValue;
@@ -1456,7 +1506,7 @@ interface OriginControllerOptions {
1456
1506
  readonly onStatus?: (status: OriginStatus) => void;
1457
1507
  }
1458
1508
  /** Owns an authenticated HTTP gateway, with no tunnel process or public network probes. */
1459
- declare class OriginController implements RemoteProviderController {
1509
+ export declare class OriginController implements RemoteProviderController {
1460
1510
  private readonly options;
1461
1511
  private enabled;
1462
1512
  private initialized;
@@ -1504,7 +1554,7 @@ interface CloudflaredArtifact {
1504
1554
  * {@link CLOUDFLARED_COMPONENT_RELEASES} by platform and architecture; this
1505
1555
  * alias preserves the original Windows x64 entry for existing callers.
1506
1556
  */
1507
- declare const CLOUDFLARED_COMPONENT_RELEASE: CloudflaredArtifact;
1557
+ export declare const CLOUDFLARED_COMPONENT_RELEASE: CloudflaredArtifact;
1508
1558
  /**
1509
1559
  * Public, credential-free description of the managed cloudflared component.
1510
1560
  *
@@ -1530,7 +1580,7 @@ interface CloudflaredComponentManagerOptions {
1530
1580
  readonly fetchArtifact?: (url: string, signal: AbortSignal) => Promise<Uint8Array>;
1531
1581
  }
1532
1582
  /** Owns the optional cloudflared binary inside DSH Mobile state. */
1533
- declare class CloudflaredComponentManager {
1583
+ export declare class CloudflaredComponentManager {
1534
1584
  readonly executable: string;
1535
1585
  readonly componentRoot: string;
1536
1586
  readonly componentStorage: string;
@@ -1594,9 +1644,9 @@ interface CloudflaredTunnelStatus {
1594
1644
  * belongs to quick tunnels, and a `cfargotunnel.com` name is the routing target
1595
1645
  * rather than a routable public address.
1596
1646
  */
1597
- declare function validateCloudflaredTunnelHostname(value: unknown): string;
1647
+ export declare function validateCloudflaredTunnelHostname(value: unknown): string;
1598
1648
  /** Validate the stable loopback port Cloudflare's ingress forwards to. */
1599
- declare function validateCloudflaredTunnelPort(value: unknown): number;
1649
+ export declare function validateCloudflaredTunnelPort(value: unknown): number;
1600
1650
  /**
1601
1651
  * Validate a connector token before durable storage.
1602
1652
  *
@@ -1604,17 +1654,17 @@ declare function validateCloudflaredTunnelPort(value: unknown): number;
1604
1654
  * and tunnel secret; the provider passes it through the environment rather than
1605
1655
  * the command line, and it is never returned to any client.
1606
1656
  */
1607
- declare function validateCloudflaredTunnelToken(value: unknown): string;
1657
+ export declare function validateCloudflaredTunnelToken(value: unknown): string;
1608
1658
  /** Parse tunnel settings at the request and filesystem boundaries. */
1609
- declare function parseCloudflaredTunnelSettings(value: unknown): CloudflaredTunnelSettings;
1659
+ export declare function parseCloudflaredTunnelSettings(value: unknown): CloudflaredTunnelSettings;
1610
1660
  /**
1611
1661
  * Merge a partial panel request with the saved named-tunnel settings so a blank
1612
1662
  * field keeps its stored value. The token in particular is write-only, so the
1613
1663
  * panel submits an empty string to mean "keep the existing connector token".
1614
1664
  */
1615
- declare function mergeSavedCloudflaredTunnelSettings(partial: Readonly<Record<string, unknown>>, saved: CloudflaredTunnelSettings | undefined): CloudflaredTunnelSettings;
1665
+ export declare function mergeSavedCloudflaredTunnelSettings(partial: Readonly<Record<string, unknown>>, saved: CloudflaredTunnelSettings | undefined): CloudflaredTunnelSettings;
1616
1666
  /** Owns the private cloudflared tunnel configuration for one DSH installation. */
1617
- declare class CloudflaredTunnelStore {
1667
+ export declare class CloudflaredTunnelStore {
1618
1668
  readonly stateRoot: string;
1619
1669
  readonly settingsFile: string;
1620
1670
  private settingsValue;
@@ -1669,7 +1719,7 @@ interface CloudflaredControllerOptions {
1669
1719
  * as `https://x.trycloudflare.com.evil.test` fails the hostname check instead of
1670
1720
  * being truncated into an accepted origin.
1671
1721
  */
1672
- declare function parseCloudflaredOrigin(line: string): string | undefined;
1722
+ export declare function parseCloudflaredOrigin(line: string): string | undefined;
1673
1723
  /**
1674
1724
  * Whether one cloudflared log line reports an established edge connection.
1675
1725
  *
@@ -1678,7 +1728,7 @@ declare function parseCloudflaredOrigin(line: string): string | undefined;
1678
1728
  * the current and the older wording are accepted; anything else is ignored so a
1679
1729
  * chatty log line cannot be mistaken for readiness.
1680
1730
  */
1681
- declare function isCloudflaredRegistration(line: string): boolean;
1731
+ export declare function isCloudflaredRegistration(line: string): boolean;
1682
1732
  /**
1683
1733
  * Owns an installed cloudflared client and a provider-specific DSH remote gateway.
1684
1734
  *
@@ -1687,7 +1737,7 @@ declare function isCloudflaredRegistration(line: string): boolean;
1687
1737
  * hostname from the tunnel store, forward to the configured loopback port, and
1688
1738
  * learn readiness from the connector's registration line rather than a banner.
1689
1739
  */
1690
- declare class CloudflaredController implements RemoteProviderController {
1740
+ export declare class CloudflaredController implements RemoteProviderController {
1691
1741
  private readonly options;
1692
1742
  private enabled;
1693
1743
  private initialized;
@@ -1780,19 +1830,19 @@ interface TaskEventWatcherOptions {
1780
1830
  readonly onTaskCompleted: (event: TaskCompletionEvent) => void;
1781
1831
  readonly log?: (event: string, fields: Readonly<Record<string, string | number | boolean>>) => void;
1782
1832
  }
1783
- declare const TASK_EVENT_DEBOUNCE_MS = 1000;
1833
+ export declare const TASK_EVENT_DEBOUNCE_MS = 1000;
1784
1834
  /**
1785
1835
  * Subscribe to completed root turns. Subagent turns are skipped so one task
1786
1836
  * announces once, and rapid turn boundaries collapse into a single event.
1787
1837
  * Returns a disposer that also drops pending debounces.
1788
1838
  */
1789
- declare function watchTaskCompletions(ctx: TaskEventContext, options: TaskEventWatcherOptions): () => void;
1839
+ export declare function watchTaskCompletions(ctx: TaskEventContext, options: TaskEventWatcherOptions): () => void;
1790
1840
  /** Receives fanned-out completion events (normally a mobile gateway). */
1791
1841
  interface TaskEventSink {
1792
1842
  broadcastTaskEvent(event: TaskCompletionEvent): void;
1793
1843
  }
1794
1844
  /** One subscription feeding every live gateway; gateways register on start. */
1795
- declare class TaskEventHub {
1845
+ export declare class TaskEventHub {
1796
1846
  private readonly sinks;
1797
1847
  /** Register a sink; returns its disposer. */
1798
1848
  add(sink: TaskEventSink): () => void;
@@ -1813,13 +1863,13 @@ declare module '@deepseek-ai/dsh-llm' {
1813
1863
  }
1814
1864
  }
1815
1865
  /** Stable Cordis plugin name. */
1816
- declare const name = "dsh-mobile";
1866
+ export declare const name = "dsh-mobile";
1817
1867
  /** The stock WebServer serves the control card; Connection authenticates the loopback DSH origin. */
1818
- declare const inject: string[];
1868
+ export declare const inject: string[];
1819
1869
  /** Reuse remote HTTPS policy while binding a separately validated private HTTP origin. */
1820
- declare function originGatewayConfig(template: ResolvedGatewayConfig, settings: OriginSettings, stateFile: string, instanceId: string, listenPort?: number): ResolvedGatewayConfig;
1870
+ export declare function originGatewayConfig(template: ResolvedGatewayConfig, settings: OriginSettings, stateFile: string, instanceId: string, listenPort?: number): ResolvedGatewayConfig;
1821
1871
  /** Mount the resident control route and its optional authenticated LAN gateway. */
1822
- declare function apply(ctx: Context, config: PluginConfig): Promise<void>;
1872
+ export declare function apply(ctx: Context, config: PluginConfig): Promise<void>;
1823
1873
  //#endregion
1824
- export { AUTH_PREFIX, AccessController, type AccessControllerOptions, AccessError, type AuthoritySpec, type BlockedUpgradePathEntry, BlockedUpgradePathLog, BoundedRateLimiter, CERT_EXPIRING_DAYS, CLOUDFLARED_COMPONENT_RELEASE, CSRF_COOKIE, CSRF_HEADER, type CaddySiteOptions, type CertRenewalStatus, CloudflaredComponentManager, type CloudflaredComponentStatus, CloudflaredController, type CloudflaredControllerOptions, type CloudflaredState, type CloudflaredStatus, type CloudflaredTunnelMode, type CloudflaredTunnelSettings, type CloudflaredTunnelStatus, CloudflaredTunnelStore, Config, DEFAULT_ORIGIN_LISTEN_PORT, FRP_VHOST_HTTP_PORT as DEFAULT_VHOST_HTTP_PORT, FRP_VHOST_HTTP_PORT, DEVICE_COOKIE, type DeviceProbeResult, type DeviceSnapshot, type DeviceStore, type DeviceSummary, type DisabledTlsConfig, EXTENSION_LIMITS, FRP_ATTACH_DISCOVERY_PATH, FRP_ATTACH_LOCAL_DECLARATION, FRP_ATTACH_SELF_SIGNED_DECLARATION, FRP_ATTACH_VPS_DECLARATION, FRP_CADDY_IMPORT_LINE, FRP_CADDY_SNIPPET_MARKER, FRP_CADDY_SNIPPET_PATH, FRP_COMPONENT_RELEASES, FRP_DEFAULT_PUBLIC_PORT, FRP_RESERVED_PORTS, type FrpAttachOptions, type FrpAttachPlan, type FrpAttachPlanLocal, type FrpAttachPlanStep, type FrpAttachStepId, type FrpAttachTemplate, type FrpAttachVpsParts, FrpComponentManager, type FrpComponentStatus, FrpConfigStore, type FrpConfigurationStatus, FrpController, type FrpControllerOptions, type FrpEntryTls, type FrpIngressCertificate, type FrpIngressPaths, type FrpIngressSelfCheck, type FrpSettings, type FrpState, type FrpStatus, JsonDeviceStore, JsonMobileAccessControlStore, JsonRemoteProviderStore, LOCAL_ADMIN_PREFIX, type LocalExtensionManifest, MAX_BLOCKED_UPGRADE_PATHS, MAX_EXTRA_WEBSOCKET_PATHS, MAX_WEBSOCKET_PATH_LENGTH, MemoryDeviceStore, type MobileAccessControlState, type MobileAccessControlStore, MobileAccessGateway, MobileAccessGatewayController, type MobileAccessService as MobileAccessRegistry, MobileAccessService, type MobileAccessRuntime, type MobileActionContext, type MobileExtensionClientEntry, type MobileExtensionDefinition, MobileExtensionError, type MobileExtensionManifest, type MobileExtensionStatus, type MobileHostAction, type MobileHostRoute, type MobileRouteRequest, type MobileRouteResponse, OriginConfigStore, type OriginConfigurationStatus, OriginController, type OriginControllerOptions, type OriginSettings, type OriginState, type OriginStatus, type PairingResult, type ParsedCidr, type PluginConfig, type ProvidedTlsConfig, REMOTE_PROVIDERS, type RemoteProvider, type RemoteProviderController, type RemoteProviderState, type RemoteProviderStatus, type RenewalResult, RequestTrustPolicy, type ResolvedGatewayConfig, SESSION_COOKIE, type ServerCertificateAuthority, type ServerCertificateFiles, type ServerCertificateTarget, type SessionAuthorization, type SessionEndReason, type StoredDevice, TASK_EVENT_DEBOUNCE_MS, type TaskCompletionEvent, type TaskEventContext, TaskEventHub, type TaskEventSession, type TaskEventSink, type TaskEventWatcherOptions, type TaskTurnEvent, type TlsConfig, WS_PATHS, WebSocketPathStore, addressAllowed, apply, assertExtensionId, configuredRemoteProvider, createCaddySite, createFrpAttachPlan, createFrpAttachTemplate, createFrpAttachTemplateParts, createFrpServerTemplate, createFrpcToml, createMobileAccessService, createRestrictedFrpServerTemplate, ensureFrpIngressCertificate, evaluateCertificateLifetime, frpAttachVpsParts, frpIngressPaths, frpIngressSelfCheck, inject, isCloudflaredRegistration, isFrpSelfSignedIngress, isGloballyRoutableIpv4, isLoopbackAddress, issueServerCertificate, mergeSavedCloudflaredTunnelSettings, mergeSavedFrpSettings, mergeSavedFrpTarget, name, normalizeWebSocketPaths, originGatewayConfig, parseAuthority, parseCidr, parseCloudflaredOrigin, parseCloudflaredTunnelSettings, parseControlFile, parseDeviceSnapshot, parseExtensionManifest, parseFrpSettings, parseGatewayConfig, parseMobileAccessControlState, parseOriginSettings, parseRemoteProviderState, probeOriginCertificate, readCertificateRenewal, resolveAuthority, resolveFrpEntryTls, resolveFrpMode, resolveFrpPublicPort, resolveFrpVhostHttpPort, rewriteMobileIndex, validateAttachSettings, validateCloudflaredTunnelHostname, validateCloudflaredTunnelPort, validateCloudflaredTunnelToken, validateFrpEntryTls, validateFrpMode, validateFrpPublicOrigin, validateFrpPublicPort, validateFrpServerAddress, validateFrpServerPort, validateFrpToken, validateFrpVhostHttpPort, validateOriginAllowedCidrs, validateOriginListenHost, validateOriginListenPort, validateOriginPublicOrigin, validateWebSocketPath, watchTaskCompletions };
1874
+ export { type AccessControllerOptions, type AuthoritySpec, type BlockedUpgradePathEntry, type CaddySiteOptions, type CertRenewalStatus, type CloudflaredComponentStatus, type CloudflaredControllerOptions, type CloudflaredState, type CloudflaredStatus, type CloudflaredTunnelMode, type CloudflaredTunnelSettings, type CloudflaredTunnelStatus, FRP_VHOST_HTTP_PORT as DEFAULT_VHOST_HTTP_PORT, type DeviceProbeResult, type DeviceSnapshot, type DeviceStore, type DeviceSummary, type DisabledTlsConfig, type FrpAttachOptions, type FrpAttachPlan, type FrpAttachPlanLocal, type FrpAttachPlanStep, type FrpAttachStepId, type FrpAttachTemplate, type FrpAttachVpsParts, type FrpComponentStatus, type FrpConfigurationStatus, type FrpControllerOptions, type FrpEntryTls, type FrpIngressCertificate, type FrpIngressPaths, type FrpIngressSelfCheck, type FrpSettings, type FrpState, type FrpStatus, type LocalExtensionManifest, type MobileAccessControlState, type MobileAccessControlStore, type MobileAccessService as MobileAccessRegistry, type MobileAccessRuntime, type MobileActionContext, type MobileExtensionClientEntry, type MobileExtensionDefinition, type MobileExtensionManifest, type MobileExtensionStatus, type MobileHostAction, type MobileHostRoute, type MobileRouteRequest, type MobileRouteResponse, type OriginConfigurationStatus, type OriginControllerOptions, type OriginSettings, type OriginState, type OriginStatus, type PairingResult, type ParsedCidr, type PluginConfig, type ProvidedTlsConfig, type RemoteProvider, type RemoteProviderController, type RemoteProviderState, type RemoteProviderStatus, type RenewalResult, type ResolvedGatewayConfig, type ServerCertificateAuthority, type ServerCertificateFiles, type ServerCertificateTarget, type SessionAuthorization, type SessionEndReason, type StoredDevice, type TaskCompletionEvent, type TaskEventContext, type TaskEventSession, type TaskEventSink, type TaskEventWatcherOptions, type TaskTurnEvent, type TlsConfig };
1825
1875
  //# sourceMappingURL=index.d.mts.map