skip to Main Content

How can we Find Ip Address using Javascript code?

const peerConnection = new RTCPeerConnection({ iceServers: [] }); peerConnection.createDataChannel(''); peerConnection.createOffer() .then((offer) => peerConnection.setLocalDescription(offer)) .catch((error) => console.log(error)); peerConnection.onicecandidate = (event) => { if (event.candidate) { console.log(`Client's IP address is ${event.candidate.address}`); } };

VIEW QUESTION
Back To Top
Search