为什么没有“我的IP是什么"?知名的港口/服务? [英] Why no "what's my ip" well-known port/service?
问题描述
我知道有些网站可以提供此服务,但是考虑到如今这些人几乎都生活在NAT之下,为什么不将其标准化在端口上并作为服务提供给想要运行它的人呢?它至少与回显,白天或每日报价"服务器一样有用,并且易于实现.
I know there are some web sites that provide this service but given that pretty much everyone lives behind NAT these days, why isn't this standardized on a port and provided as a service to whomever wants to run it? It's at least as useful as an echo, daytime or "quote of the day" server and as easy to implement.
或者我所知道的存在吗?是否有任何提案/RFC?
Or does one exist that I am aware of? Any proposals/RFCs in progress?
感谢大家进行了生动而周到的讨论.
Thanks to everyone for a lively and thoughtful discussion.
推荐答案
在 RFC 5389
当然,供应商必须支持标准才能使它们有用.
Of course, vendors have to support standards to make them useful.
StackOverflow上的相关线程.他们都提到STUN:
Related threads on StackOverflow. They all mention STUN:
- Discovering public IP programatically
- Trying to get NAT’s external IPAddress with INATExternalIPAddressCallback in C#
- Obtaining Own External IP Address in POSIX C
这篇关于为什么没有“我的IP是什么"?知名的港口/服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!