export interface SsrfFetchOptions {
    /** Max bytes to read from the response body. Defaults to 64 KiB. */
    maxBytes?: number;
    /** Request timeout in ms. Defaults to 5000ms. */
    timeoutMs?: number;
    /** Allowed schemes. Defaults to ["https:"]. Set to ["http:", "https:"] for tests. */
    allowedSchemes?: string[];
    /**
     * When true, hostnames resolving to private/loopback ranges (and
     * `localhost`) are allowed. Intended for tests only.
     */
    allowPrivateHosts?: boolean;
}
/**
 * Build SSRF fetch options from the environment. In production only https and
 * public hosts are allowed; the `ALLOW_PRIVATE_OUTBOUND_FETCH` override (tests
 * and local dev) relaxes this so loopback/http targets can be reached.
 */
export declare function ssrfFetchOptionsFromEnv(env: {
    ALLOW_PRIVATE_OUTBOUND_FETCH?: boolean;
}): SsrfFetchOptions;
export declare class SsrfBlockedError extends Error {
    constructor(reason: string);
}
/**
 * Inspect a URL string and throw {@link SsrfBlockedError} if its literal
 * hostname is an IP address in a blocked range (see {@link isBlockedIPv4},
 * {@link isBlockedIPv6}) or a known loopback/broadcast hostname (see
 * {@link BLOCKED_HOSTNAMES}).
 *
 * IMPORTANT: this function does NOT perform DNS resolution. A public-looking
 * hostname whose A/AAAA records point to a private/loopback/metadata IP will
 * pass this check and only be rejected later (or not at all) by the underlying
 * fetch. Production deployments that need full SSRF protection must add either:
 *   - egress controls (firewall / network policy blocking RFC1918 + 169.254 +
 *     fc00::/7 + fe80::/10 from the auth server), or
 *   - a server-side DNS check that resolves the host with `dns.lookup` and
 *     re-runs {@link isBlockedIPv4}/{@link isBlockedIPv6} on each address (or
 *     connect by resolved IP while passing the original Host header).
 */
export declare function assertSsrfSafeUrl(rawUrl: string, opts?: SsrfFetchOptions): URL;
/**
 * Fetch a URL with SSRF protection: blocks private/loopback/link-local
 * targets, requires https by default, applies a strict timeout, and caps the
 * response body. Intended for fetching client-published artifacts (jwks_uri,
 * request_uri) where the URL comes from untrusted client metadata.
 */
export declare function ssrfSafeFetch(rawUrl: string, opts?: SsrfFetchOptions): Promise<{
    status: number;
    body: string;
    contentType: string | null;
}>;
