nginx-cf-realip
Version:
Command line utility for updating NGINX real-ip rules for CloudFlare's IPs
31 lines (30 loc) • 744 B
TypeScript
declare type ipVersion = 6 | 4;
export default class CloudFlareIps {
/**
* Axios instance for CloudFlare
*/
private readonly cloudflare;
/**
* Fetch a list of IPs for the given IP version.
*
* @param version
*/
getList(version: ipVersion): Promise<string>;
/**
* Convert a list separated by linebreaks to an array.
*
* @param list
*/
protected listToArray(list: string): string[];
/**
* Fetch an array of IPs for the given IP version.
*
* @param version
*/
getArray(version: ipVersion): Promise<Array<string>>;
/**
* All available CloudFlare IPs.
*/
all(): Promise<Array<string>>;
}
export {};