Deploying turn Server for WEBRTC applications

Source: Internet
Author: User

When deploying WEBRTC or SIP-to-peer scenarios, you will often encounter environments that are not penetrated by peer

This is where the tunserver comes in.

Here we use turnserver-0.7.3

Download confuse dependent libraries

wget http://savannah.nongnu.org/download/confuse/confuse-2.7.tar.gz

Tar zxvf confuse-2.7.tar.gz

CD confuse*

./configure

Make && make install

Download

wget http://downloads.sourceforge.net/project/turnserver/turnserver-0.7.3.tar.bz2

Tar jxvf turnserver-0.7.3.tar.bz2

CD turnserver*

./configure

Make && make install

Editing a configuration file

Copy the profile template from the extra to the/etc directory, assuming your IP is 1.2.3.4

1, configuration file

CP extra/turnserver.conf.template/etc/turnserver.conf

Vi/etc/tunserver.conf

Modify

Listen_address = {"1.2.3.4"}

Modify # # Daemon mode.
Daemon = true # Modify to background service mode

Modify Bandwidth Limits

# # Allocation Bandwidth limitation (in KBYTES/S).
# # 0 value means bandwidth quota disabled.
Bandwidth_per_allocation = 1024


# # Restricted User bandwidth (in kbytes/s).
# # 0 value means bandwidth limitation disabled.
Restricted_bandwidth = 0

2, Authenticated user files

CP Extra/turnusers.txt.template/etc/turnusers.txt

Vi/etc/turnusers.txt add one or more lines of authentication information in the format user name: password: domain:authorized For example, the following line: 700:700pass:domain.org:authorized after the add is complete, You can use stun and tun server in WEBRTC. var configuration = {
' Iceservers ': [{
{' URL ': ' stun:1.2.3.4 '},

{' URL ': ' Turn:[email protected] ', credential: ' 700pass '}
}]
};

Reprint Path: http://blog.163.com/sir_876/blog/static/11705223201422810528434/

Deploying turn Server for WEBRTC applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.