/**
 * Shared IP extraction helper with trusted proxy + CIDR support.
 *
 * Used by app.ts to extract the real client IP from Hono context,
 * respecting proxy headers only when the direct connection comes
 * from a configured trusted proxy.
 */
import type { Context } from 'hono';
import type { ConnInfo } from 'hono/conninfo';
/**
 * Normalize an IP address by stripping the IPv6-mapped IPv4 prefix.
 * E.g., '::ffff:127.0.0.1' -> '127.0.0.1'
 */
export declare function normalizeIp(ip: string): string;
/**
 * Check if a socket IP is a trusted proxy.
 * Supports exact IP matches and CIDR ranges.
 * IPv6-mapped IPv4 addresses are normalized before comparison.
 */
export declare function isTrustedProxy(socketIp: string, trustedProxies: string[]): boolean;
/**
 * Extract the real remote IP from a Hono request context.
 *
 * - If the direct socket is a trusted proxy, reads X-Real-IP or X-Forwarded-For
 * - Otherwise, returns the socket IP directly (ignoring proxy headers)
 * - Returns 'unknown' if socket address is not available
 */
export declare function extractRemoteIp(c: Context, connInfo: ConnInfo, trustedProxies: string[]): string;
//# sourceMappingURL=ip-extraction.d.ts.map