如何使用Javascript在Microsoft Edge浏览器中获取私有客户端IP地址? [英] How to get private client IP address in Microsoft Edge browser using Javascript?

查看:230
本文介绍了如何使用Javascript在Microsoft Edge浏览器中获取私有客户端IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过以下链接尝试使用WebRTC通过Javascript查找私有客户端IP地址,但我在Chrome和Firefox中成功使用,但在Microsoft Edge中却无法使用.

I have tried using WebRTC to find private client IP address using Javascript by following the below link and I am successful in Chrome and Firefox but it didn't work in Microsoft Edge.

https ://ourcodeworld.com/articles/read/257/how-to-get-the-client-ip-address-with-javascript-only

所有第三种解决方案都仅提供公共IP地址.也尝试了以下链接的答案.

如何使用JavaScript获取客户端的IP地址?

如何使用Javascript在Microsoft Edge浏览器中获取私有客户端IP 地址?

How to get private Client IP address in Microsoft Edge browser using Javascript?

对于WebRTC,我们还有其他替代方法可以在Edge浏览器中获取私有IP地址吗?

Do we have any other alternate for WebRTC to get private IP address in Edge browser?

推荐答案

根据 RTCPeerConnection ,Edge不支持CreateDataChannel,因此在Edge中将不起作用.

According to Browser Compatibility section of RTCPeerConnection, CreateDataChannel is not supported in Edge, therefore it won't work in Edge.

也不建议利用WebRTC公开私有IP地址,因为:

Also it is not recommended to leverage the WebRTC to expose the private IP address because:

通过ICE收集并在RTCIceCandidate实例中对应用程序可见的候选中公开的地址可以显示有关设备和用户的更多信息(例如,位置,本地网络拓扑),而不是在未启用WebRTC的情况下用户可能期望的信息.浏览器. ...

The addresses exposed in candidates gathered via ICE and made visibile to the application in RTCIceCandidate instances can reveal more information about the device and the user (e.g. location, local network topology) than the user might have expected in a non-WebRTC enabled browser. ...

引用 WebRTC标准的地址.

这篇关于如何使用Javascript在Microsoft Edge浏览器中获取私有客户端IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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