Home > Web Front-end > JS Tutorial > body text

Can JavaScript Really Access a User\'s Local LAN IP Address?

DDD
Release: 2024-10-28 08:16:29
Original
996 people have browsed it

Can JavaScript Really Access a User's Local LAN IP Address?

Accessing a User's Local LAN IP Address with JavaScript

Despite the common misconception, it is now possible to obtain a user's local LAN IP address using JavaScript alone. This capability is a result of the WebRTC extension introduced in HTML5.

To demonstrate the functionality, consider the proof of concept available at http://net.ipcalf.com. This website harnesses the WebRTC extension to retrieve a user's local IP address.

The inclusion of this feature in HTML5 was an intentional design decision, not a bug. However, given its potential for misuse, it is advisable to approach it with caution. Nonetheless, for the purpose of displaying the user's exposed information, it serves its purpose effectively.

The above is the detailed content of Can JavaScript Really Access a User\'s Local LAN IP Address?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!