This article mainly introduces WEBRTC inside of the Stun,turn service installation and configuration (reprint please indicate source: Http://www.cnblogs.com/lingyunhu, RTC. Blacker)
Speaking of the role of Stun,turn services, I believe many people know that the main processing and forwarding, with the completion of the ice protocol. But a lot of people don't know how to build it.
In fact, not the key is not familiar with Linux or not contact Linux, if familiar with Linux and then carefully read the relevant documents, it should not be difficult to complete the process.
There are many versions of Linux, this article mainly introduces the building process on UBUNTU14:
1. $ wget http://turnserver.open-sys.org/downloads/v<......>/turnserver-< >.tar.gz
2.$ tar xvfz turnserver-<...>.tar.gz
3.$ CD turnserver-<...>
4.$ sudo apt-get update
5.$ sudo apt-get install Gdebi-core
6.$ sudo gdebi coturn*.deb
------above 6 steps to complete the download and installation of the Stun,turn service
7.$ Turnadmin-a-B turnserver.config-u username-r example.org-p password
------Add Users
8.$ Turnserver-c-B turnserver.config-u username-r example.org-p password-a-f-v
-------Start the Stun,turn service
The above 8 steps complete the installation and configuration of the Stun,turn service, followed by the configuration in the client script (*.*.*.* represents its own IP):
1 iceservers: [2 {"url": "Stun:*.*.*.*},
3 {"url": "Turn:*.*.*.*", "Credential": "username", "username": "Password"} ]5
At last:
1,stun and turn services can not only be used in the WEBRTC can also be used in other places, of course, the WEBRTC to achieve the hole and forwarding you can also achieve.
2, some people will be asked in the client JS inside can directly see username and password, will not be unsafe? The answer is yes, how to solve it? Please continue to pay attention if you are interested.
Above, if errors and omissions, please correct and supplement, greatly appreciated! Rtc. Blacker.
Android IOS WebRTC Audio Video Development Summary (11)