camoufox
Version:
JavaScript port of Camoufox - a tool for Firefox anti-fingerprinting and browser automation.
27 lines (26 loc) • 1.09 kB
TypeScript
export declare const ALLOW_GEOIP = true;
declare class Locale {
language: string;
region?: string;
script?: string;
constructor(language: string, region?: string, script?: string);
asString(): string;
asConfig(): Record<string, string>;
}
declare class Geolocation {
locale: Locale;
longitude: number;
latitude: number;
timezone: string;
accuracy?: number;
constructor(locale: Locale, longitude: number, latitude: number, timezone: string, accuracy?: number);
asConfig(): Record<string, any>;
}
export declare function normalizeLocale(locale: string): Locale;
export declare function handleLocale(locale: string, ignoreRegion?: boolean): Locale;
export declare function handleLocales(locales: string | string[], config: Record<string, any>): void;
export declare function geoipAllowed(): void;
export declare function downloadMMDB(mmdb_file?: string): Promise<void>;
export declare function removeMMDB(mmdb_file?: string): void;
export declare function getGeolocation(ip: string, mmdb_file?: string): Promise<Geolocation>;
export {};