/** * SSOT: default public / panel ports for YSK Server managed services. * Used by Firewall open-port chips and docs — package names vary by distro, * but these are the listen ports YSK configures by default. * * Ranges use "from:to" (UFW syntax). Prefer not exposing DB/Redis/panel on 0.0.0.0. */ export type ServicePortProto = 'tcp' | 'udp' | 'both'; export type ServicePortCategory = 'panel' | 'web' | 'ssh' | 'mail' | 'ftp' | 'db' | 'dns' | 'cache' | 'other'; export type ServicePortDef = { /** Stable id */ id: string; /** * Single port "80" or UFW range "30000:30100". * Value used as chip value / API port field. */ port: string; proto: ServicePortProto; /** Short chip label (English brand + port) */ label: string; /** YSK feature / service id */ service: string; category: ServicePortCategory; /** Opening on public interface is usually a bad idea */ privateRecommended?: boolean; /** Shown in hint only */ hint?: string; }; /** * Full catalog of YSK-related service ports (defaults). * Order = chip display order (panel → web → ssh → mail → ftp → dns → db → cache). */ export declare const YSK_SERVICE_PORTS: ServicePortDef[]; /** * Chip options for firewall UI. * `value` is always `port/proto` (e.g. `80/tcp`, `53/udp`, `30000:30100/tcp`) * so DNS TCP+UDP can both appear and selection is unique. * MariaDB shares MySQL 3306 — one chip only. */ export declare function listFirewallPortChips(): Array<{ value: string; label: string; proto: 'tcp' | 'udp'; port: string; privateRecommended?: boolean; service: string; category: ServicePortCategory; hint?: string; }>; /** * Parse chip/API value: `80`, `80/tcp`, `30000:30100`, `30000:30100/tcp`. */ export declare function parsePortChipValue(raw: string): { port: string; from: number; to: number; proto?: 'tcp' | 'udp'; } | null; /** Parse "80" or "30000:30100" into from/to (same if single). */ export declare function parsePortSpec(raw: string): { from: number; to: number; } | null; /** True if spec is a multi-port range. */ export declare function isPortRange(raw: string): boolean; /** Protocol for allow-port UI / API. `both` opens TCP and UDP. */ export type FirewallPortProto = 'tcp' | 'udp' | 'both'; /** UFW rule target: `80/tcp` or `30000:30100/tcp`. Not used for `both` (dual allow). */ export declare function ufwPortTarget(port: string, proto: 'tcp' | 'udp'): string | null; //# sourceMappingURL=service-ports.d.ts.map