export declare const ALLOW_PRIVATE: boolean; type LookupCallback = (err: NodeJS.ErrnoException | null, address?: string | Array<{ address: string | undefined; family: number; }>, family?: number | undefined) => void; /** * DNS lookup used by the undici dispatcher below. It performs the SINGLE name * resolution that the TCP connection actually uses, and rejects if any * resolved address is private/loopback/link-local. Because the connection * reuses exactly this result, there is no DNS-rebinding TOCTOU window between * the security check and the connect — closing the gap the old code documented * (validate with one dns.lookup, then let fetch re-resolve independently). * TLS still validates the certificate against the hostname (SNI is set by * undici from the URL), so pinning the IP does not weaken cert checking. */ export declare function guardedLookup(hostname: string, options: { all?: boolean | undefined; family?: number | undefined; }, callback: LookupCallback): void; /** * SSRF-guarded fetch with manual, per-hop-revalidated redirects, exported so * other builtin tools (e.g. `search`) get the same protections instead of a * weaker `redirect: 'follow'`. Every hop is re-checked against private/loopback * ranges and the connection is pinned to the validated IP via the undici * dispatcher (no DNS-rebinding TOCTOU). `headers` defaults to the plain `fetch` * tool's; callers may override (e.g. a browser User-Agent for search engines). */ export declare function guardedFetch(url: string, maxRedirects: number, signal: AbortSignal, headers?: Record): Promise; export declare function assertNotPrivate(hostname: string): Promise; export {}; //# sourceMappingURL=_fetch-guard.d.ts.map