/** * URL Validation Utilities (SMI-721, SMI-729) * * SSRF prevention validators for URL access. * * Security Features: * - Protocol validation (http/https only) * - Private IPv4 range blocking * - Private IPv6 range blocking * - Localhost and loopback blocking */ /** * Get human-readable IP range name for error messages */ export declare function getIpRangeName(a: number, b: number): string; /** * Validate IPv6 address to prevent SSRF attacks (SMI-729) * * Blocks: * - Link-local: fe80::/10 * - Unique local addresses (ULA): fc00::/7 * - Multicast: ff00::/8 * - IPv4-mapped IPv6: ::ffff:0:0/96 * - Loopback ::1 (already blocked above) * * @param hostname - IPv6 hostname to validate * @param url - Full URL for error context * @throws {ValidationError} if IPv6 address is not allowed */ export declare function validateIPv6(hostname: string, url: string): void; /** * Validate URL to prevent SSRF attacks (SMI-721, SMI-729) * * Blocks: * - Non-http(s) protocols * - Private IPv4 ranges (10.x, 172.16-31.x, 192.168.x) * - Private IPv6 ranges (fe80::/10, fc00::/7, ff00::/8, ::ffff:0:0/96) * - Localhost variants (127.x, localhost, ::1, 0.0.0.0) * - Link-local addresses (169.254.x, fe80::/10) * - Current network (0.x) * * @param url - URL to validate * @throws {ValidationError} if URL is not allowed * * @example * ```typescript * validateUrl('https://example.com/api') // OK * validateUrl('http://localhost:3000') // Throws ValidationError * validateUrl('ftp://example.com') // Throws ValidationError * validateUrl('http://192.168.1.1') // Throws ValidationError * validateUrl('http://[fe80::1]') // Throws ValidationError (IPv6 link-local) * ``` */ export declare function validateUrl(url: string): void; //# sourceMappingURL=url-validators.d.ts.map