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
curl ipinfo.io// 返回{"ip": "34.80.248.126","hostname": "126.248.80.34.bc.googleusercontent.com","city": "New York City","region": "New York","country": "US","loc": "40.7143,-74.0060","org": "AS15169 Google LLC","postal": "10004","timezone": "America/New_York","readme": "https://ipinfo.io/missingauth"
curl cip.cc
curl cip.ccIP : 34.80.248.126地址 : 美国 美国数据二 : 台湾省 | 彰化县Google云计算数据中心数据三 : 美国德克萨斯休斯顿URL : http://www.cip.cc/34.80.248.126
curl ip.gs
curl ip.gsCurrent IP / 当前 IP: 34.80.248.126ISP / 运营商: cloud.google.comCity / 城市: Changhua County TaiwanCountry / 国家: China
2,查询指定公网IP地理位置信息
curl cip.cc/ip
─➤ curl cip.cc/8.8.8.8IP : 8.8.8.8地址 : GOOGLE.COM GOOGLE.COM运营商 : level3.com数据二 : 美国 | 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器数据三 : 美国 | Level3URL : http://www.cip.cc/8.8.8.8
curl freeapi.ipip.net/ip 【用不了】
╰─➤ curl freeapi.ipip.net/35.194.24.24["美国","爱荷华州","康瑟尔布拉夫斯","","cloud.google.com"]
3,返回公网IP
curl ip.gscurl ip.sbcurl whatismyip.akamai.comcurl icanhazip.comcurl ifconfig.cat
4,ipinfo.io
curl ipinfo.io/<IP>
5,ip.tool.lu
curl -L ip.tool.lu
