Skip to content

介绍

工具库IP模块。

使用方法

javascript
const UtilsIP = require('ee-core/utils/ip');

API列表

publicIpv4(options)

  • options [Object]
    • type [String] - 查询类型:'http' | 'dns' | 'all'
    • timeout [Int] - 超时时间,默认 3000 毫秒

获取公网ipv4

publicIpv6(options)

  • options [Object]
    • type [String] - 查询类型:'http' | 'dns' | 'all'
    • timeout [Int] - 超时时间,默认 3000 毫秒

获取公网ipv6