0

WebRTC comes essentially in 3 flavors depending on the network situation:

  • No NAT - session is peer to peer
  • NAT - session uses STUN but is eventually peer to peer for the media

  • NAT+Firewall: in which case session is not peer to peer and media goes through a TURN server.

Is there a way/tool to figure out for an existing live session if it is using a TURN server or if it's peer to peer?

I am using chrome. If a tool exists for other browsers I am happy to know about it as well.

Thx

isaac.hazan
  • 3,772
  • 6
  • 46
  • 76
  • Possible duplicate of [WebRTC: Determine which TURN server is used in PeerConnection](https://stackoverflow.com/questions/32137156/webrtc-determine-which-turn-server-is-used-in-peerconnection) – jib Jun 18 '17 at 18:04
  • ICE is actually able to traverse many firewalls, just not the case where both peers are behind symmetric NATs. – jib Jun 18 '17 at 18:08

1 Answers1

1

this pull request for the webrtc samples makes the constraints/getStats sample show the ip address. Instead of the local and remote ip around here you want the candidateType property. If either of them is "relay" you are using a turn server. If both are "host" this is a direct connection without NAT. For all other cases NAT is used.

Note that this sample is currently a bit of a mess since the getStats API changed a bit.

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31