What is my IP address? Power By NutzBoot

44.204.24.82

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

CLI examples:

$ curl 127.0.0.1:8033
44.204.24.82

$ http -b 127.0.0.1:8033
44.204.24.82

$ wget -qO- 127.0.0.1:8033
44.204.24.82

$ fetch -qo- https://127.0.0.1:8033
44.204.24.82

$ bat -print=b 127.0.0.1:8033/ip
44.204.24.82

Country lookup:

$ http 127.0.0.1:8033/country
美国

City lookup:

$ http 127.0.0.1:8033/city
阿什本

JSON output:

$ http 127.0.0.1:8033/json
{
    "city": "阿什本",
    "country": "美国",
    "ip": "44.204.24.82",
    "ip_decimal": 751573074
}

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 127.0.0.1:8033/ip
44.204.24.82

Testing port connectivity:

$ http 127.0.0.1:8033/port/8080
{
    "ip": "44.204.24.82",
    "port": 8080,
    "reachable": false
}

FAQ

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

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

项目灵感来源是什么?

Golang版ipd IPD.