webrtc-ips | Demo https | Learning library
kandi X-RAY | webrtc-ips Summary
kandi X-RAY | webrtc-ips Summary
Demo:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of webrtc-ips
webrtc-ips Key Features
webrtc-ips Examples and Code Snippets
Community Discussions
Trending Discussions on webrtc-ips
QUESTION
Below is a quote from this GitHub project STUN IP Address requests for WebRTC.
These request results are available to JavaScript, so you can now obtain a users local and public IP addresses in JavaScript.
I did as suggested in the following quote.
Here is the annotated demo function that makes the STUN request. You can copy and paste this into the Firefox or Chrome developer console to run the test.
The result was a script error with output results of undefined and 192.168.x.x. It did correctly detect the internal home IP address of one of my laptops.
The error was:
Uncaught TypeError: Cannot read property '1' of null at handleCandidate (:38:47) at RTCPeerConnection.pc.onicecandidate (:52:13)
The error occurred here:
...ANSWER
Answered 2018-Jan-03 at 15:54Yes, making STUN requests with WebRTC to determine the client's IP address is still a viable approach. To determine what's wrong with the particular code you have posted, try dumping candidate
in handleCandidate()
to see why the ip_regex
regexp is choking:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webrtc-ips
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page