What is my IP address? Power By NutzBoot

54.161.77.30

Multiple command line HTTP clients are supported, including curl, httpie, GNU Wget and fetch.

CLI examples:

$ curl ip.nutz.cn
54.161.77.30

$ http -b ip.nutz.cn
54.161.77.30

$ wget -qO- ip.nutz.cn
54.161.77.30

$ fetch -qo- https://ip.nutz.cn
54.161.77.30

$ bat -print=b ip.nutz.cn/ip
54.161.77.30

Country lookup:

$ http ip.nutz.cn/country
美国

City lookup:

$ http ip.nutz.cn/city
未知

JSON output:

$ http ip.nutz.cn/json
{
    "city": "未知",
    "country": "美国",
    "ip": "54.161.77.30",
    "ip_decimal": 916540702
}

Setting the Accept header to application/json also works.

Plain output:

Always returns the IP address including a trailing newline, regardless of user agent.

$ http ip.nutz.cn/ip
54.161.77.30

Testing port connectivity:

$ http ip.nutz.cn/port/8080
{
    "ip": "54.161.77.30",
    "port": 8080,
    "reachable": false
}

FAQ

我想自己跑这个服务,可以?

当然可以,源码在这里 ipd4nutzboot@码云.

项目灵感来源是什么?

Golang版ipd IPD.