Get the IP location and info. Ten million QPS.
just run:
~: go build
~: ipdb git:(main) ✗ ./ipdb
go http :10000
~: ./ipdb -a
Usage of ./ipdb:
-addr string
http listen addr. (default ":10000")
-ipfile string
ip databases file. (default "./ipip.txtx")
-logdir string
log dir. (default "./logs/")
-loglevel string
log level. (default "debug")
- You can take no arguments, and get the IP information of your current machine
~:curl http://ip.fuzu.pro
The response is JSON, like this:
{
"code": 0,
"data": {
"ip": "223.73.123.17",
"country": "**",
"province": "广东",
"isp": "移动",
"latitude": 23.12911,
"longitude": 113.264385
}
}
- You can also query the specified IP address:
curl 'http://ip.fuzu.pro?ip=1.1.1.1'
- Or, Here is a very simple Web page: http://ip.utool.pro