How can we Find Ip Address using Javascript code?

Discussão em 'Angular' iniciado por Gopal k .Dwivedi, Outubro 6, 2024.

  1. 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}`);
    }
    };

    Continue reading...

Compartilhe esta Página