获取外部IP地址 [英] Get External IP Address

查看:81
本文介绍了获取外部IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

预先感谢

无论如何,无需使用
就可以在vb.net中获取客户端的外部IP地址. http://automation.whatismyip.com 吗? ,我正在开发FTP程序,并且在
客户端我想获取客户端的IP地址.

已经进行了研究,但大多数都建议使用whatismyip.

Thanks in advance

Is there anyway to get External IP Address of client in vb.net without using
http://automation.whatismyip.com ? , I am developing a FTP program and on
client side i want to get the IP address of the client.

Has done research but most of them suggest whatismyip.

推荐答案

获取机器互联网IP地址的唯一方法是与路由器另一端的人交谈. (或其他任何方式)将您连接到互联网.原因是在它的您"一侧,您的IP地址是本地地址:例如192.168.0.2.仅另一端的设备获得IP地址,该IP地址不特定于您的PC-特定于您的Internet连接而不是您的PC,例如,如果有两个PC连接到同一路由器,则可以共享该IP地址.路由器将重定向消息,并根据需要使用正确的内部/外部地址.

因此,您需要与whatsmyIP或类似的外部服务进行对话,以了解值是什么!
The only way to get the internet IP address of a machine is to talk to something on the otherside of the router (or whatever) that connects you to the internet. The reason being that on "your" side of it, your IP address is a local one: 192.168.0.2 for example. Only the equipment one the other side gets the IP address, which is not specific to your PC - it is specific to your internet connection not your PC, and may be shared if there are two PC connected to the same router, for example. The router redirects messages, and uses the correct internal / external address as appropriate.

So you need to talk to whatsmyIP or a similar external service to find out what the value is!


这篇关于获取外部IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆