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

  1. Fork it (https://github.com/crystal-china/myip/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors