/** * GeoIP-based timezone and locale detection from proxy IP. * * Optional feature — requires `mmdb-lib` package: * npm install mmdb-lib * * Downloads GeoLite2-City.mmdb (~70 MB) on first use, * caches in `~/.cloakbrowser/geoip/`. */ import type { LaunchOptions } from "./types.js"; /** Country ISO code → BCP 47 locale (covers ~90% of proxy traffic). */ export declare const COUNTRY_LOCALE_MAP: Record; export interface GeoResult { timezone: string | null; locale: string | null; exitIp: string | null; } /** * Resolve timezone and locale from a proxy's IP address. * Returns `{ timezone, locale }` — either may be null on failure. * Never throws. * * When `proxyUrl` is falsy, the machine's own public IP is used instead * (echo services queried directly, no proxy), so geoip works proxy-free. */ export declare function resolveProxyGeo(proxyUrl: string | null): Promise; /** @internal Exported for testing. */ export declare function resolveProxyIp(proxyUrl: string): Promise; /** * Auto-fill timezone/locale from the egress IP when geoip is enabled. * Also returns exitIp as a free bonus (reused for WebRTC spoofing). * * With a proxy the egress IP is the proxy's exit IP; with no proxy it is * the machine's own public IP, so geoip works proxy-free too. */ export declare function maybeResolveGeoip(options: LaunchOptions): Promise<{ timezone?: string; locale?: string; exitIp?: string; }>; /** * Append `--fingerprint-webrtc-ip=` unless the user already set the flag. * The exit IP comes free from the geoip lookup; it spoofs the WebRTC IP to the * egress IP. No-op when there is no exit IP or the flag is already present. This * rule must stay identical across every launch path, so it lives in one place. */ export declare function appendWebrtcExitIp(args: string[] | undefined, exitIp: string | undefined): string[] | undefined; /** * Replace --fingerprint-webrtc-ip=auto with the resolved proxy exit IP. * Returns args unchanged if no ``auto`` value is present. */ export declare function resolveWebrtcArgs(options: LaunchOptions): Promise; //# sourceMappingURL=geoip.d.ts.map