WEBRTC STUN stun.l.google.com:19302

好久不见. 提交于 2019-11-28 03:12:56

Actually there is no need to setup your own STUN or TURN servers, because there are a lot of public/semipublic servers. STUN from Google not always works very well.

This is my latest verified list (don't forget stun:/turn: scheme in URL):

{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
{url:'stun:stun3.l.google.com:19302'},
{url:'stun:stun4.l.google.com:19302'},
{url:'stun:stunserver.org'},
{url:'stun:stun.softjoys.com'},
{url:'stun:stun.voiparound.com'},
{url:'stun:stun.voipbuster.com'},
{url:'stun:stun.voipstunt.com'},
{url:'stun:stun.voxgratia.org'},
{url:'stun:stun.xten.com'},
{
    url: 'turn:numb.viagenie.ca',
    credential: 'muazkh',
    username: 'webrtc@live.com'
},
{
    url: 'turn:192.158.29.39:3478?transport=udp',
    credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
    username: '28224511:1379330808'
},
{
    url: 'turn:192.158.29.39:3478?transport=tcp',
    credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
    username: '28224511:1379330808'
}

https://gist.github.com/yetithefoot/7592580

In case if you need your own STUN server, you can use this one written for Node.js, or find some here.

Also you can check this and this pages for better understanding.

This is the new way to config STUN and TURN in RTCPeerConnection initialization. Below is the working mode from apprtc.appspot.com

var peerConnectionConfig = {
  iceServers:[
    {urls: ["turn:173.194.72.127:19305?transport=udp",
       "turn:[2404:6800:4008:C01::7F]:19305?transport=udp",
       "turn:173.194.72.127:443?transport=tcp",
       "turn:[2404:6800:4008:C01::7F]:443?transport=tcp"
       ],
     username:"CKjCuLwFEgahxNRjuTAYzc/s6OMT",
     credential:"u1SQDR/SQsPQIxXNWQT7czc/G4c="
    },
    {urls:["stun:stun.l.google.com:19302"]}
  ]};

More info here

EmerCoin has large list of public STUN servers: http://olegh.ftp.sh/public-stun.txt You can use any of them.

There are a few options to set up your own stun server. There is the rfc5766-turn-server. Once you set it up on your server, you can use that server's IP address and port you have set it to listen to. You will need some basic linux sysadmin knowledge for this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!