Getting the 'external' IP address in Java

前端 未结 12 1869
自闭症患者
自闭症患者 2020-11-22 15:08

I\'m not too sure how to go about getting the external IP address of the machine as a computer outside of a network would see it.

My following IPAddress class only g

12条回答
  •  广开言路
    2020-11-22 15:50

    All this are still up and working smoothly! (as of 23 Sep 2019)

    • http://checkip.amazonaws.com/
    • https://ipv4.icanhazip.com/ (works with ipv6 as subdomain too!)
    • http://myexternalip.com/raw
    • http://ipecho.net/plain
    • http://bot.whatismyipaddress.com
    • http://www.trackip.net/ip (only gives ipv6)
    • http://curlmyip.com/ (17 Dec 2016)

    Piece of advice: Do not direcly depend only on one of them; try to use one but have a contigency plan considering others! The more you use, the better!

    Good luck!

提交回复
热议问题