Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

133
Vistas
Why does RTCPeerConnection not show my public ip?

I am trying to understand how to use WebRTC to establish P2P connections following the example here: https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample. In my mind, it seems like when I create a new RTCPeerConnection, that connection should contain information about my public ip and subnet, so that when I create an offer and pass it to the remote computer, the remote would then have the details about where to send the response offer. However, whenever I try creating an RTCPeerConnection, it has 0.0.0.0 in it and no mention of my ip (which is not 0.0.0.0). Do you know why this could be? What am I doing wrong? How do I get it to display my public ip?

var localConnection = new RTCPeerConnection({
    'iceServers': [
        {
            'urls': ['stun:stun.l.google.com:19302'],
        },
    ],
});

var offer = localConnection.createOffer();
await localConnection.setLocalDescription(offer);

console.log(localConnection.localDescription);

// RTCSessionDescription { type: "offer", sdp: "v=0\r\no=mozilla...THIS_IS_SDPARTA-97.0 5252435491124817570 1 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=fingerprint:sha-256 94:95:5B:C2:D2:DC:56:71:EF:D6:A6:3E:CB:07:09:B0:A3:DB:FD:0B:8D:80:96:8C:56:B6:72:84:F3:36:1A:04\r\na=group:BUNDLE 1\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=sendrecv\r\na=ice-pwd:e4ae4077195d25ff0973d2c70c50111f\r\na=ice-ufrag:efc13e32\r\na=mid:1\r\na=setup:actpass\r\na=sctp-port:5000\r\na=max-message-size:1073741823\r\n" }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The ICE Candidates haven't been gathered yet. It starts after SetLocalDescription is called, and candidates will be added to your localDescription as they arrive.

Set onicecandidate and it will called with your 'public ip'.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda