2025-06-07 17:28:15 +00:00
|
|
|
import * as plugins from '../plugins.js';
|
|
|
|
|
import * as authInterfaces from '../data/auth.js';
|
|
|
|
|
|
2026-02-23 21:34:50 +00:00
|
|
|
export interface IConfigData {
|
|
|
|
|
system: {
|
|
|
|
|
baseDir: string;
|
|
|
|
|
dataDir: string;
|
|
|
|
|
publicIp: string | null;
|
|
|
|
|
proxyIps: string[];
|
|
|
|
|
uptime: number;
|
|
|
|
|
storageBackend: 'filesystem' | 'custom' | 'memory';
|
|
|
|
|
storagePath: string | null;
|
|
|
|
|
};
|
|
|
|
|
smartProxy: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
routeCount: number;
|
|
|
|
|
acme: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
accountEmail: string;
|
|
|
|
|
useProduction: boolean;
|
|
|
|
|
autoRenew: boolean;
|
|
|
|
|
renewThresholdDays: number;
|
|
|
|
|
} | null;
|
|
|
|
|
};
|
|
|
|
|
email: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
ports: number[];
|
|
|
|
|
portMapping: Record<string, number> | null;
|
|
|
|
|
hostname: string | null;
|
|
|
|
|
domains: string[];
|
|
|
|
|
emailRouteCount: number;
|
|
|
|
|
receivedEmailsPath: string | null;
|
|
|
|
|
};
|
|
|
|
|
dns: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
port: number;
|
|
|
|
|
nsDomains: string[];
|
|
|
|
|
scopes: string[];
|
|
|
|
|
recordCount: number;
|
|
|
|
|
records: Array<{ name: string; type: string; value: string; ttl?: number }>;
|
|
|
|
|
dnsChallenge: boolean;
|
|
|
|
|
};
|
|
|
|
|
tls: {
|
|
|
|
|
contactEmail: string | null;
|
|
|
|
|
domain: string | null;
|
|
|
|
|
source: 'acme' | 'static' | 'none';
|
|
|
|
|
certPath: string | null;
|
|
|
|
|
keyPath: string | null;
|
|
|
|
|
};
|
|
|
|
|
cache: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
storagePath: string | null;
|
|
|
|
|
dbName: string | null;
|
|
|
|
|
defaultTTLDays: number;
|
|
|
|
|
cleanupIntervalHours: number;
|
|
|
|
|
ttlConfig: Record<string, number>;
|
|
|
|
|
};
|
|
|
|
|
radius: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
authPort: number | null;
|
|
|
|
|
acctPort: number | null;
|
|
|
|
|
bindAddress: string | null;
|
|
|
|
|
clientCount: number;
|
|
|
|
|
vlanDefaultVlan: number | null;
|
|
|
|
|
vlanAllowUnknownMacs: boolean | null;
|
|
|
|
|
vlanMappingCount: number;
|
|
|
|
|
};
|
|
|
|
|
remoteIngress: {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
tunnelPort: number | null;
|
|
|
|
|
hubDomain: string | null;
|
|
|
|
|
tlsConfigured: boolean;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-03 23:26:51 +00:00
|
|
|
// Get Configuration (read-only)
|
2025-06-07 17:28:15 +00:00
|
|
|
export interface IReq_GetConfiguration extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
|
|
|
IReq_GetConfiguration
|
|
|
|
|
> {
|
|
|
|
|
method: 'getConfiguration';
|
|
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
section?: string;
|
|
|
|
|
};
|
|
|
|
|
response: {
|
2026-02-23 21:34:50 +00:00
|
|
|
config: IConfigData;
|
2025-06-07 17:28:15 +00:00
|
|
|
section?: string;
|
|
|
|
|
};
|
2026-02-23 21:34:50 +00:00
|
|
|
}
|