目录
抽空写了一个简单的获取客户端 ip 的 web url
http://ip.ked.pub
可以用在 shell 脚本或命令行中,方便查看自己的公网 ip 地址。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| 1. curl
$ curl http://ip.ked.pub
IP: 14.19.248.35
Country: KR
Region: Seoul-teukbyeolsi
City: Seoul
ZIP: 06030
2. 参数
- format : city、full、plain、ip,默认为 plain
https://ip.ked.pub/?format=full
https://ip.ked.pub/?format=plain
https://ip.ked.pub/?format=city
https://ip.ked.pub/?format=ip
- ip : 需要查询的 ip 地址,默认为调用方的 ip。
https://ip.ked.pub/?format=full&ip=52.231.24.23
|