stun

WebRTC - How many STUN/TURN servers do I need to specify?

不羁岁月 提交于 2019-11-30 06:23:22
问题 I'm having trouble with NAT traversal and WebRTC . Videostreaming works with some people, but not with someone who's behind a student dorm router. I think this should be solved by using a TURN server. I've done that, it still isn't working, and now I'm wondering if the TURN server is working at all. In consequence I wonder if I can or should set several TURN servers, and if yes, how. I found this list of STUN/TURN servers in another thread. Right now I'm setting them like this var STUN = {

why doesn't “onicecandidate” work?

回眸只為那壹抹淺笑 提交于 2019-11-30 00:24:00
I'm having trouble understanding webRTC with it's PeerConnection and 'onicecandidate' event. As far as I understand it you must initiate a peerconnection using a STUN (or TURN) server, because it will send you back your ICE candidate for communication with another peer. I've seen examples leaving the server parameter of the PeerConnection object out, which I don't understand as well, but let's just say it does need the server parameter. So, when I write down the following code: var pc, ice = { "iceServers": [{ "url": "stun:stun.l.google.com:19302" }] }; if(typeof mozRTCPeerConnection ===

How does WebRTC decide which TURN Servers to Use

六月ゝ 毕业季﹏ 提交于 2019-11-29 19:06:08
问题 Branching off this question WebRTC - How many STUN/TURN servers do I need to specify? How does WebRTC determine which TURN servers to use when more than one is provided? 回答1: Every Ice candidate is given a priority when it is gathered. It is a mixture of a couple of things and I believe that each platform(Chrome, FireFox, etc.) has their own preferences. Here is a link to the RFC explaining how priorities are to be generated. Each priority is guaranteed to be unique as the candidate ID should

stun/turn服务器部署

白昼怎懂夜的黑 提交于 2019-11-29 13:41:14
一、 简介 本文通过在服务器上安装 coturn 这个软件,实现搭建 STUN 服务器和 TURN 服务器。 coturn 简介: 是一个免费的开源的 TURN/STUN 服务器。 coturn 服务器完整的实现了 STUN/TURN/ICE 协议,支持 P2P 穿透防火墙。 STUN 服务器用于 检测NAT 类型 。 TURN 服务器是在点对点失败后用于通信中继。 coturn 的 Github 源码: https://github.com/coturn/coturn coturn的wiki使用说明: https://github.com/coturn/coturn/wiki Q: stun服务器和turn服务器在部署步骤上,有什么区别? A: 因为TURN 是 STUN 的扩展,所以 TURN 服务器可以当作 STUN 服务器来用。 在软件配置上没有区别。 在硬件配置上, stun服务器需要1台服务器上有2个公网IP,turn服务器只需要有1个公网IP。 所以,如果你想: 只配置 stun服务器:按照本文步骤来,还需要有1台用2个公网IP的服务器。 只配置 turn服务器:按照本文步骤来。 1台服务器同时配置stun和turn服务器:按照本文步骤来,还需要有1台用2个公网IP的服务器。 二、安装 安装过程分为2部分 镜像不带有 coturn的源,此处以 ubuntu14.04

why doesn't “onicecandidate” work?

試著忘記壹切 提交于 2019-11-28 22:08:36
问题 I'm having trouble understanding webRTC with it's PeerConnection and 'onicecandidate' event. As far as I understand it you must initiate a peerconnection using a STUN (or TURN) server, because it will send you back your ICE candidate for communication with another peer. I've seen examples leaving the server parameter of the PeerConnection object out, which I don't understand as well, but let's just say it does need the server parameter. So, when I write down the following code: var pc, ice =

How to create stun turn server instance using AWS EC2

让人想犯罪 __ 提交于 2019-11-28 19:41:24
Actually i wants to use my own stun/Turn server instance and i want to use Amazon EC2 .If anybody has any idea regarding this please share with me the steps to create or any reference link to follow. do an ssh login to your ec2 instance, then run the below commands for installing and starting the turn server. simple way: sudo apt-get install coturn If you say no, I want the latest cutting edge, you can download source code from their downloads page in install it yourself, example: sudo -i # ignore if you already in admin mode apt-get update && apt-get install libssl-dev libevent-dev libhiredis

Remote VideoStream not working with WebRTC

假如想象 提交于 2019-11-28 19:40:26
EDIT: I wrote a detailed tutorial explaining how to build an simple Videochat-application including a signaling server: Tutorial: Create your own Videochat-Application with HTML and JavaScript Please tell me if you find it helpful & understandable. Thanks! i am trying to get Streams to work via WebRTC and Websocket (nodejs-server). As far as i can see the handshake via SDP works and the Peerconnection is established. The problem is - the Remote-Video is not playing. The src-Attribute gets the Blob and autoplay is set, but it just won`t play. Maybe i am doing something wrong with the ICE

WebRTC - How many STUN/TURN servers do I need to specify?

≯℡__Kan透↙ 提交于 2019-11-28 17:56:21
I'm having trouble with NAT traversal and WebRTC . Videostreaming works with some people, but not with someone who's behind a student dorm router. I think this should be solved by using a TURN server. I've done that, it still isn't working, and now I'm wondering if the TURN server is working at all. In consequence I wonder if I can or should set several TURN servers, and if yes, how. I found this list of STUN/TURN servers in another thread . Right now I'm setting them like this var STUN = { 'url': 'stun:stun.l.google.com:19302', }; var TURN = { url: 'turn:homeo@turn.bistri.com:80', credential:

Java UDP hole punching example - connecting through firewall

倖福魔咒の 提交于 2019-11-28 14:10:23
问题 Lets say I have two computers. They know each others public and private IPs via ice4j . One client listening and the other one sending some string. I'd like to see this happen via UPD hole punching: Let A be the client requesting the connection Let B be the client that is responding to the request Let S be the ice4j STUN server that they contact to initiate the connection -- A sends a connection request to S S responds with B's IP and port info, and sends A's IP and port info to B A sends a

WebRTC 基础 TURN的工作过程和原理

跟風遠走 提交于 2019-11-28 05:07:30
参考文档: https://www.jianshu.com/p/4a15556c6318 https://www.cnblogs.com/pannengzhi/p/5048965.html 我们在STUN工作过程介绍的 文章 中提到过,STUN能够处理Cone NAT,但是没有处理对称NAT的能力,也就是说位于对称NAT后面的2台内网机器是无法进行p2p连接的。 TURN协议就是为了解决对称NAT的问题,它扩展了STUN(所以说TURN服务也会提供STUN的功能), 添加了一个中继(Relaying)的功能,使得位于对称NAT后面的2台内网机器能够进行通信。 需要注意的是,使用TURN进行的通信,本质上讲它不是p2p,同时由于需要中继数据,从而增加了TURN服务器的负担。 TURN的工作流程 下面将从数据的传输过程来了解TURN是如何让对称NAT后面的内网机器间进行通信的。 先解释一个名词,这样有利于后面的描述: 反射地址(Reflexive Transport Address): 它是NAT分配给内网机器与外网进行通信的公网IP和端口 环境: client A: 位于对称NAT后的内网机器, 192.168.10.2:1234 NAT A: client A 到达公网时的最后一个NAT,反射地址为 112.11.11.11:4000 TURN Server: TURN服务器