analog采用的是 ipip.net 提供的IP离线数据库。

若想更新IP库请自行到 https://www.ipip.net 进行下载 .ipdb 文件,并替换数据库文件 /analog/ipdb/ip.ipdb ,默认请使用相同的名字 ip.ipdb 命名此新数据库文件. Warning

在本人开发时使用并下载该IP库并未要求注册登录,而现在下载最新的数据库是需要注册下载的。 请各位在使用、下载 ip.ipdb 文件时,遵守 ipip.net 的使用规定,勿做正式商业用途。

命令行查看公网IP地理位置 使用curl

1,使用curl命令 查看本机公网IP地理位置

curl ipinfo.io

  1. curl ipinfo.io
  2. // 返回
  3. {
  4. "ip": "34.80.248.126",
  5. "hostname": "126.248.80.34.bc.googleusercontent.com",
  6. "city": "New York City",
  7. "region": "New York",
  8. "country": "US",
  9. "loc": "40.7143,-74.0060",
  10. "org": "AS15169 Google LLC",
  11. "postal": "10004",
  12. "timezone": "America/New_York",
  13. "readme": "https://ipinfo.io/missingauth"

curl cip.cc

  1. curl cip.cc
  2. IP : 34.80.248.126
  3. 地址 : 美国 美国
  4. 数据二 : 台湾省 | 彰化县Google云计算数据中心
  5. 数据三 : 美国德克萨斯休斯顿
  6. URL : http://www.cip.cc/34.80.248.126

curl ip.gs

  1. curl ip.gs
  2. Current IP / 当前 IP: 34.80.248.126
  3. ISP / 运营商: cloud.google.com
  4. City / 城市: Changhua County Taiwan
  5. Country / 国家: China

2,查询指定公网IP地理位置信息

curl cip.cc/ip

  1. ─➤ curl cip.cc/8.8.8.8
  2. IP : 8.8.8.8
  3. 地址 : GOOGLE.COM GOOGLE.COM
  4. 运营商 : level3.com
  5. 数据二 : 美国 | 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器
  6. 数据三 : 美国 | Level3
  7. URL : http://www.cip.cc/8.8.8.8

curl freeapi.ipip.net/ip 【用不了】

  1. ╰─➤ curl freeapi.ipip.net/35.194.24.24
  2. ["美国","爱荷华州","康瑟尔布拉夫斯","","cloud.google.com"]

3,返回公网IP

  1. curl ip.gs
  2. curl ip.sb
  3. curl whatismyip.akamai.com
  4. curl icanhazip.com
  5. curl ifconfig.cat

4,ipinfo.io

  1. curl ipinfo.io/<IP>

5,ip.tool.lu

  1. curl -L ip.tool.lu