stun

What is STUN and does it need a port-forwarded server?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've done some research on p2p communication without a base server, and came over STUN. From what I've read, STUN is a way of NAT "Hole Punching" that would not require a peer to be port-forwarded to be connected to. Is this correct, and what exactly does hole punching mean? It all seems very vulnerable as it is going past the firewall if it does not require port-forwarding, and I do not entirely understand what STUN does. Could STUN be used in a p2p program in Java or another language such as a chat client that sends messages over

Whether STUN server is needed within LAN for WebRTC?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have developed a p2p video chat using Webrtc. I am aware that STUN or TURN server is required to identify the public IP behind NAT. Currently am using Google's STUN server. I have the application installed in the server connected to the LAN which will not have internet access, do I need to install the STUN server in my server to make Webrtc video chat work within the LAN? 回答1: Peers should be able to connect within a LAN (on the same side of a NAT) without STUN, i.e. using the host candidates. Try it out! 回答2: In general, you won't need a

WEBRTC STUN stun.l.google.com:19302

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have just downloaded a video chat project. It uses a STUN server and specifies the URL stun:23.21.150.121 . How can I use my own server instead of the STUN server? What do I have to enter instead of this URL? 回答1: 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'},

webrtc实现点对点视频通讯

匿名 (未验证) 提交于 2019-12-02 23:53:01
html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>webrtc</title> <style> #yours{ width:300px; position:absolute; top:200px; left:100px; } #theirs{ width:300px; position:absolute; top:200px; left:400px; } </style> </head> <body> <button onclick="createOffer()">建立连接</button> <video id="yours" autoplay></video> <video id="theirs" autoplay></video> </body> <script src="./lib/jquery.min.js"></script> <script src="./lib/webrtc.js"></script> </html>

webRTC脱坑笔记(三)― webRTC API之RTCPeerConnection

匿名 (未验证) 提交于 2019-12-02 23:49:02
版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 ( Creative Commons ) RTCPeerConnection API 是每个浏览器之间点对点连接的核心, RTCPeerConnection 是 WebRTC 组件,用于处理对等体之间流数据的稳定和有效通信。 RTCPeerConnection 可以保护Web开发人员免受潜伏在其中的无数复杂性的影响。 WebRTC 使用的编解码器和协议可以进行大量工作,即使在不可靠的网络上也可以进行实时通信: 丢包隐藏 回声消除 带宽适应性 动态抖动缓冲 自动增益控制 降噪和抑制 图像’清洁’。 // 创建实例 let pc = RTCPeerConnection ( serverConfig ) ; 根据你是发起者还是被发起对象,在连接的每一边会使用稍微不同的方式使用 RtcPeerConnection 对象。 serverConfigconfig 配置参数中包含 iceServers 参数。它是包含有关 STUN 和 TURN 服务器的信息的 URL 对象数组,在查找 ICE 候选时使用。可以在 code.google.com 找到可用的公共 STUN 服务器的列表。 现实中,无论你的应用如何见到那, webRTC 都需要服务器,因为: 通信用户发现彼此并交换自己的“真实世界”的详细信息;

初窥IM通信协议

匿名 (未验证) 提交于 2019-12-02 22:56:40
QQ就是使用UDP协议进行发送和接收消息的。当你的机器安装了OICQ以后,实际上,你既是服务端(Server),又是客户端(Client)。当你登录OICQ时,你的OICQ作为Client连接到腾讯公司的主服务器上,当你看谁在线时,你的OICQ又一次作为Client从QQ Server上读取在线网友名单。当你和你的OICQ伙伴进行聊天时,如果你和对方的连接比较稳定,你和他的聊天内容都是以UDP的形式,在计算机之间传 送。如果你和对方的连接不是很稳定,QQ服务器将为你们的聊天内容进行中转。其他的即时通信软件原理与此大同小异。 首先,用户A输入自己的用户名和密码登录即时通讯服务器,服务器通过读取用户数据库来验证用户身份,如果用户名、密码都正确,就登记用户A的IP地址、IM客户端软件的版本号及使用的TCP/UDP端口号, 然后返回用户A登录成功的标志,此时用户A在 IM系统中的状态为在线(Online Presence)。 其次,根据用户A存储在IM服务器上的好友列表 (Buddy List),服务器将用户A在线的相关信息发送到也同时在线的即时通讯好友的PC机,这些信息包括在线状态、IP地址、 IM客户端使用的TCP端口(Port)号等,即时通讯好友PC机上的即时通讯软件收到此信息后将在PC桌面上弹出一个小窗口予以提示。 第三步,即时通讯服务器把用户A存储在服务器上的好友列

Whether STUN server is needed within LAN for WebRTC?

大兔子大兔子 提交于 2019-12-02 20:43:10
I have developed a p2p video chat using Webrtc. I am aware that STUN or TURN server is required to identify the public IP behind NAT. Currently am using Google's STUN server. I have the application installed in the server connected to the LAN which will not have internet access, do I need to install the STUN server in my server to make Webrtc video chat work within the LAN? Peers should be able to connect within a LAN (on the same side of a NAT) without STUN, i.e. using the host candidates. Try it out! In general, you won't need a STUN server. However, depending on the firewall configuration,

Java and Which Stun libraries i should use?

半腔热情 提交于 2019-12-01 04:06:20
问题 Java, i was trying to write my own STUN client, but it seems like i was making mistake and therefore, most of the time it gets freezed. So i would like to know what STUN Client libraries are available for Java, to get started. Follow up: (in the mean time trying following, still involved no solution for behind NAT/firewall) Step 1: Stun class: http://babbly.googlecode.com/svn/trunk/src/org/babbly/core/net/InetAddresResolver.java /* modified */ import java.io.*; import java.net.DatagramSocket;

STUN/TURN服务器搭建

孤街浪徒 提交于 2019-11-30 17:00:00
目录 STUN/TURN服务器搭建 编译安装 配置使用 添加用户 启动server 测试 开机启动 参考 STUN/TURN服务器搭建 编译安装 编译安装 OpenSSL; sudo apt-get install libssl-dev 编译安装 libevent 最新版; wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz tar xvfz libevent-2.0.21-stable.tar.gz cd libevent-2.0.21-stable ./configure make sudo make install coturn 可以选择使用多种数据库,这里使用的是 SQLite ,使用命令 sudo apt-get install sqlite (or sqlite3) 和 sudo apt-get install libsqlite3-dev (or sqlite3-dev) 安装; 编译coturn; 下载 coturn tar xvfz turnserver-<...>.tar.gz ./configure make sudo make install 执行 ./configure 命令时没有使用 --prefix=/opt 参数,因为 OpenSSL

How does WebRTC decide which TURN Servers to Use

巧了我就是萌 提交于 2019-11-30 14:27:24
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? 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 be unique(if the RFC is followed). So, you should never have a tie in priorities. Those with higher