UNPKG

@dmhsq_monitor/processor

Version:
21 lines (20 loc) 571 B
import { UserIpInfo, GeoInfo } from '../types'; import { GeoProvider } from '../constants'; /** * 获取用户IP地址信息 * @returns Promise<UserIpInfo> */ export declare function getUserIp(): Promise<UserIpInfo>; /** * 判断是否为私有IP * @param ip IP地址 * @returns 是否为私有IP */ export declare function isPrivateIp(ip: string): boolean; /** * 获取地理位置信息 * @param ip IP地址 * @param provider 提供商 * @returns Promise<GeoInfo> */ export declare function getGeoInfo(ip: string, provider?: GeoProvider): Promise<GeoInfo>;