java中远程客户端的本地网络IP地址
有谁知道如何用java从远程客户端获取本地网络IP地址?
谢谢
Does anyone know how to get the Local Net Ip Address from a Remote Client in java?
thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是您要找的吗?
它获取运行代码的机器的 IP。
Is this what you are looking for?
That gets the IP of the machine the code is running on.
假设您的意思是获取在 NAT 之后运行的客户端的本地 IP 地址,则您只能在客户端的配合下才能做到这一点,这意味着您必须自己发送它。
无论如何,你需要它做什么?
Assuming you mean getting the local IP address of a client running behind NAT, you can only do that with the client's cooperation, meaning you have to send it yourself.
What do you need it for anyway?