UNPKG

@cylution/is-cloudflare-ip

Version:
20 lines (19 loc) 535 B
import { SubnetInfo } from 'ip'; declare type TCloudflareIPs = { v4?: string[]; v6?: string[]; }; export declare class CloudflareIP { _timeout: any; _interval: number; v4: SubnetInfo[]; v6: SubnetInfo[]; constructor(options?: TCloudflareIPs); validate(ip: string): boolean; validateV4(ipV4: string): boolean; validateV6(ipV6: string): boolean; update(interval?: number, onError?: (_error: any) => void): Promise<void>; _update(): Promise<void>; destroyInterval(): void; } export {};