[英]Is it possible to get a user's IP address by decoding the mDNS string received with the help of webRTC?
I've spent some time looking at different answers, and the best I've found was this response from a different SO question.我花了一些时间查看不同的答案,而我发现的最好的答案是来自不同 SO 问题的回复。
The issue is that this returns an mDNS string, like so:问题是这会返回一个 mDNS 字符串,如下所示:
abcd1234-1e1e-1e1e-1e1e-abcd1a2bc3de.local
I have a legitimate use case for this feature, and I've tried finding answers or libraries that are capable of decoding this string, such as webrtc-ips , but this package returns an empty array for me.我有此功能的合法用例,并且我尝试找到能够解码此字符串的答案或库,例如webrtc-ips ,但是此 package 为我返回一个空数组。
Has anyone been able to figure out a way to do this without a third-party, like api.ipify or similar services?有没有人能够在没有第三方的情况下找到一种方法来做到这一点,比如api.ipify或类似的服务?
The design purpose of these mdns strings is that you can not decode them outside the local network.这些 mdns 字符串的设计目的是您无法在本地网络之外对其进行解码。
If you have a legitimate use-case you can explain it in https://github.com/w3c/webrtc-extensions/issues/87 which discusses asking for permission to expose IP addresses without the current workaround to ask for camera permissions.如果您有一个合法的用例,您可以在https://github.com/w3c/webrtc-extensions/issues/87中进行解释,其中讨论了在没有当前解决方法要求相机权限的情况下请求公开 IP 地址的权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.