/** * @license * Copyright Neekware Inc. All Rights Reserved. * * Use of this source code is governed by a proprietary notice * that can be found at http://neekware.com/license/PRI.html */ import { DeepReadonly } from 'ts-essentials'; import { IpwareCallOptions, IpwareConfigOptions, IpwareIpInfo } from './ipware.model'; export declare class Ipware { readonly options: DeepReadonly; private nonPublicIpPrefixes; constructor(options?: IpwareConfigOptions); /** * Returns the IP address of the request headers ip attribute * @param {ip} string containing an ip address * @returns an object of type IpwareIpInfo if ip address is valid, else undefined */ private getInfo; /** * Determines if IP is loopback * @param {string} ip Ip address * @returns {boolean} true if ip is loopback, else false */ isLoopback(ip: string): boolean; /** * Determines if IP is private (non-routable on the internet) * @param {string} ip Ip address * @returns {boolean} true if ip is private, else false */ isPrivate(ip: string): boolean; /** * Determines if IP is public (routable on the internet) * @param {string} ip Ip address * @returns {boolean} true if ip is public, else false */ isPublic(ip: string): boolean; /** * Return the client IP address as per best matched IP address * @param request HTTP request * @param options ipware call options * @returns IpwareIpInfo */ getClientIP(request: any, callOptions?: IpwareCallOptions): IpwareIpInfo | null; }