0
votes

I am trying to bring up a in home peer to peer webrtc based chat system using webrtc data channel, When I try to get the Ice candidates using Create offer i observe that only once ice candidate which is local is created and the SDP string generated has ip address 127.0.0.1 and 0.0.0.0 mentioned. I have added a data channel and created respective ice handlers before createOffer(). I tried to add media by getUsermedia() but i see only one ice candidate. When I tried to check with Trickle Ice (https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/) I see the same, i dont see any entry with my IP Address in it..

Because of this the other peer is not able to make the connection.

I am not using any websockets,but directly sharing sdp strings between peers using email, as i am trying to understand how it works. As Ice servers are needed only nat traversal and my purpose is for in home chat, i dont want to add any STUN Or TURN Servers.

I see the below entry in Trickle Ice without any Ice Servers. Time Component Type Foundation ProtocolAddress Port Priority 0.003 rtp host 1178812653 udp 31703155-6932-43d7-9d9b-44dda8daea28.local 58170 126 | 30 | 255

Any Help is appreciated

1
If I remember, since 2019, local IP addresses are not displayed anymore (due to security/confidentiality issues). Instead WebRTC retrieves mDNS entries for local interconnection.Antonin M.

1 Answers

1
votes

What Antonin said is exactly right. Here's a discuss-webrtc with more details.

A solution could be to either use the mDNS hostname candidates as-is, or to do a gUM call which will then make Chrome use the private IP address (the latter seems like a workaround, might break eventually). Somebody else might have a more definitive solution. Good luck!