myip
返回本机的公网 IP 以及访问外网的公网 IP,使用 http://www.ip138.com 以及 http://ib.sb/geoip 提供的服务。 查看文档获取更多帮助
╰─ $ bin/myip
╰─ $ myip
ip138.com:您的iP地址是:[1.2.3.4 ] 来自:中国广东 联通
ip.sb/geoip:您访问外网地址信息:
{"organization" => "Khalid Group",
"longitude" => -3.684,
"timezone" => "Europe/Madrid",
"isp" => "Khalid Group",
"offset" => 3600,
"asn" => 147291,
"asn_organization" => "KHALID GROUP",
"country" => "Spain",
"ip" => "5.6.7.8",
"latitude" => 40.4172,
"continent_code" => "EU",
"country_code" => "ES"}
Contributing
- Fork it (https://github.com/crystal-china/myip/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Billy.Zheng - creator and maintainer