/** * CIDR-based IP allowlist matching utility. * Zero dependencies — pure functions operating on IPv4 dotted-decimal strings. */ /** * Convert dotted-decimal IPv4 string to a 32-bit unsigned integer. * Returns NaN for invalid inputs. */ export declare function ip4ToInt(ip: string): number; /** * Normalize an IP string for IPv4 CIDR matching. * - Strips "::ffff:" prefix from IPv4-mapped IPv6 addresses * - Maps "::1" (IPv6 loopback) to "127.0.0.1" * - Returns other values unchanged */ export declare function normalizeIp(ip: string): string; /** * Parse a CIDR string "x.x.x.x/prefix" into network and mask. * If no prefix is provided, assume /32 (single host). * Returns null for invalid input. */ export declare function parseCidr(cidr: string): { network: number; mask: number; } | null; /** * Check whether an IP address is allowed by any CIDR in the allowlist. * - Empty/null/undefined list → true (allow all) * - Invalid IP → false (block, safety default) * - Invalid CIDR entries in the list are silently skipped */ export declare function isIpAllowed(ip: string, allowedNetworks: string[]): boolean; //# sourceMappingURL=network-security.d.ts.map