问题描述
我与要求机器的外部IP的API工作。 I都来了解,我无法不依赖外部服务器上做到这一点。
我用whatismyip.com在过去的:
的wget -q -O - http://whatismyip.com/automation/n09230945.asp
哪些用于检查机的外部IP一些其他服务吗?因为我担心单一故障点,我想有我可以进行故障切换几个选项。
解决方案 卷曲-s http://checkip.dyndns.org | SED的/ [A-ZA-Z /<> :]//G'
现在,我没有写我自己,只是在做一些研究你。
http://www.geekology.co.za/blog/2009/04/checking-your-internal-and-external-ip-addresses-on-a-unix-machine/
或者
的wget -O -q icanhazip.com
I'm working with an API that requires the machine's external IP. I have come understand that I can't do this without relying on an external server.
I've used whatismyip.com in the past:
wget -q -O - http://whatismyip.com/automation/n09230945.asp
What are some other services for checking the external IP of a machine? Since I'm concerned about a single point of failure, I'd like to have a few options to which I can fail over.
解决方案 curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g'
Now, I didn't write that myself, just doing some research for you.
Or
wget -O -q icanhazip.com
这篇关于什么是检查机器的外部IP良好的服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!