Installation

# Add this to your shard.yml
dependencies:
  myip:
    github: crystal-china/myip
    version: ~> 0.5.2

Then run:

shards install

shard.yml

Crystal
1.8.0
License
MIT
Author
Billy.Zheng
Target
  • myip from src/cli.cr

Dependencies

Runtime Dependencies

  • lexbor*github: kostya/lexbor
  • term-spinner*github: crystal-term/spinner, commit: 60350f9598335c559a8350d98fb2b9042e53290f

Development Dependencies

  • ameba*github: crystal-ameba/amebadev

README

myip

返回本机的公网 IP 以及访问外网的公网 IP,匿名使用以下服务:

http://www.ip111.cn/ 获取 IP 信息. https://www.ipshudi.com 针对 ip111.cn 获取的 IP 信息,查询更加详细的信息.

此外,也额外访问以下网址获取信息作为补充

http://www.ip138.com 获取国内 IP 信息 https://api.ip.sb/geoip 获取外网的详细 IP 信息

ip111.png

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