From c5f9e2b8c143b10980915fedc8dbf41fc68e6f84 Mon Sep 17 00:00:00 2001 From: Oleg Moskalenko Date: Sun, 19 Jul 2015 14:00:07 -0700 Subject: [PATCH] Imported Upstream version 4.4.5.4 --- ChangeLog | 4 ++ INSTALL | 4 +- NOTE | 2 +- README.md | 119 +++++++++++++++++++++++++++++++++++ README.turnadmin | 4 +- README.turnserver | 8 +-- README.turnutils | 4 +- examples/etc/turnserver.conf | 2 +- man/man1/turnadmin.1 | 6 +- man/man1/turnserver.1 | 10 +-- man/man1/turnutils.1 | 6 +- rpm/CentOS6.pre.build.sh | 13 +++- rpm/build.instructions.txt | 2 +- rpm/build.settings.sh | 5 +- rpm/build.sh | 2 +- rpm/common.pre.build.sh | 2 +- rpm/turnserver.spec | 6 +- src/apps/relay/mainrelay.c | 2 +- src/ns_turn_defs.h | 2 +- 19 files changed, 168 insertions(+), 35 deletions(-) create mode 100644 README.md diff --git a/ChangeLog b/ChangeLog index fd28c9a3..819173ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +7/18/2015 Oleg Moskalenko +Version 4.4.5.4 'Ardee West': + - moved to github. + 6/20/2015 Oleg Moskalenko Version 4.4.5.3 'Ardee West': - third-party authorization STUN attributes adjusted according diff --git a/INSTALL b/INSTALL index f97fc2af..0500d54e 100644 --- a/INSTALL +++ b/INSTALL @@ -1112,11 +1112,11 @@ XX. Performance tuning This topic is covered in the wiki page: -http://code.google.com/p/coturn/wiki/turn_performance_and_load_balance +https://github.com/coturn/coturn/wiki/TURN-Performance-and-Load-Balance XXI. TURN Server setup -Read the project wiki pages: http://code.google.com/p/coturn/w/list +Read the project wiki pages: https://github.com/coturn/coturn/wiki Also, check the project from page links to the TURN/WebRTC configuration examples. It may give you an idea how it can be done. diff --git a/NOTE b/NOTE index 3cb9955c..75b5886e 100644 --- a/NOTE +++ b/NOTE @@ -1,2 +1,2 @@ -This project is active in Google code: http://code.google.com/p/coturn/ +This project is active in Github: https://github.com/coturn/coturn/ diff --git a/README.md b/README.md new file mode 100644 index 00000000..d2d69c40 --- /dev/null +++ b/README.md @@ -0,0 +1,119 @@ +**_This project evolved from rfc5766-turn-server project (https://code.google.com/p/rfc5766-turn-server/). There are many new advanced TURN specs which are going far beyond the original RFC 5766 document. This project takes the code of rfc5766-turn-server as the starter, and adds new advanced features to it._** + +# Free open source implementation of TURN and STUN Server # + +The TURN Server is a VoIP media traffic NAT traversal server and gateway. It can be used as a general-purpose network traffic TURN server and gateway, too. + +On-line management interface (over telnet or over HTTPS) for the TURN server is available. + +The implementation also includes some extra experimental features. + +Supported RFCs: + +TURN specs: + + * RFC 5766 - base TURN specs + * RFC 6062 - TCP relaying TURN extension + * RFC 6156 - IPv6 extension for TURN + * RFC 7443 - ALPN support for STUN & TURN + * DTLS support (http://tools.ietf.org/html/draft-petithuguenin-tram-turn-dtls-00). + * Mobile ICE (MICE) support (http://tools.ietf.org/html/draft-wing-tram-turn-mobility-02). + * TURN REST API (http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) + * Origin field in TURN (Multi-tenant TURN Server) (https://tools.ietf.org/html/draft-ietf-tram-stun-origin-05) + * TURN Bandwidth draft specs (http://tools.ietf.org/html/draft-thomson-tram-turn-bandwidth-01) + * TURN-bis (with dual allocation) draft specs (http://tools.ietf.org/html/draft-ietf-tram-turnbis-04) + * Third-party authorization support (http://tools.ietf.org/html/draft-ietf-tram-turn-third-party-authz-16). + +STUN specs: + + * RFC 3489 - "classic" STUN + * RFC 5389 - base "new" STUN specs + * RFC 5769 - test vectors for STUN protocol testing + * RFC 5780 - NAT behavior discovery support + * RFC 7443 - ALPN support for STUN & TURN + +Supported ICE and related specs: + + * RFC 5245 - ICE + * RFC 5768 – ICE–SIP + * RFC 6336 – ICE–IANA Registry + * RFC 6544 – ICE–TCP + * RFC 5928 - TURN Resolution Mechanism + +The implementation fully supports the following client-to-TURN-server protocols: + + * UDP (per RFC 5766) + * TCP (per RFC 5766 and RFC 6062) + * TLS (per RFC 5766 and RFC 6062): SSL3/TLS1.0/TLS1.1/TLS1.2; ECDHE is supported. + * DTLS (http://tools.ietf.org/html/draft-petithuguenin-tram-turn-dtls-00): DTLS versions 1.0 and 1.2. + * SCTP (experimental implementation). + +Supported relay protocols: + + * UDP (per RFC 5766) + * TCP (per RFC 6062) + +Supported user databases (for user repository, with passwords or keys, if authentication is required): + + * SQLite + * MySQL + * PostgreSQL + * Redis + * MongoDB + +Redis can also be used for status and statistics storage and notification. + +Supported message integrity digest algorithms: + + * HMAC-SHA1, with MD5-hashed keys (as required by STUN and TURN standards) + +Supported TURN authentication mechanisms: + + * 'classic' long-term credentials mechanism; + * TURN REST API (a modification of the long-term mechanism, for time-limited secret-based authentication, for WebRTC applications: http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00); + * experimental third-party oAuth-based client authorization option; + +When used as a part of an ICE solution, for VoIP connectivity, this TURN server can handle thousands simultaneous calls per CPU (when TURN protocol is used) or tens of thousands calls when only STUN protocol is used. For virtually unlimited scalability a load balancing scheme can be used. The load balancing can be implemented with the following tools (either one or a combination of them): + + * DNS SRV based load balancing; + * built-in 300 ALTERNATE-SERVER mechanism (requires 300 response support by the TURN client); + * network load-balancer server. + +Traffic bandwidth limitation and congestion avoidance algorithms implemented. + +The supported project target platforms are: + + * Linux (Debian, Ubuntu, Mint, CentOS, Fedora, Redhat, Amazon Linux, Arch Linux, OpenSUSE) + * BSD (FreeBSD, NetBSD, OpenBSD, DragonFlyBSD) + * Solaris 11 + * Mac OS X + * Cygwin (for non-production R&D purposes) + +Other server platforms can be supported by request. + +Any client platform is supported, including Android, iOS, Linux, OS X, Windows, and Windows Phone. + +This project can be successfully used on other `*NIX` platforms, too, but that is not officially supported. + +The implementation is supposed to be simple, easy to install and configure. The project focuses on performance, scalability and simplicity. The aim is to provide an enterprise-grade TURN solution. + +To achieve high performance and scalability, the TURN server is implemented with the following features: + + * High-performance industrial-strength Network IO engine libevent2 is used + * Configurable multi-threading model implemented to allow full usage of available CPU resources (if OS allows multi-threading) + * Multiple listening and relay addresses can be configured + * Efficient memory model used + * The TURN project code can be used in a custom proprietary networking environment. In the TURN server code, an abstract networking API is used. Only couple files in the project have to be re-written to plug-in the TURN server into a proprietary environment. With this project, only implementation for standard UNIX Networking/IO API is provided, but the user can implement any other environment. The TURN server code was originally developed for a high-performance proprietary corporate environment, then adopted for UNIX Networking API + * The TURN server works as a user space process, without imposing any special requirements on the system + +To download the TURN Server software, the client messaging library and the test programs, click the tab "Downloads". + +Contact information: + +https://groups.google.com/forum/#!forum/turn-server-project-rfc5766-turn-server + +email:mom040267@gmail.com + +### Feedback is very welcome (bugs, issues, suggestions, stories, questions). ### + +### Volunteers are welcome, too. ### \ No newline at end of file diff --git a/README.turnadmin b/README.turnadmin index f76aaeef..fee7bf6a 100644 --- a/README.turnadmin +++ b/README.turnadmin @@ -213,11 +213,11 @@ to see the man page. project page: - http://code.google.com/p/coturn/ + https://github.com/coturn/coturn/ Wiki page: - http://code.google.com/p/coturn/wiki/Readme + https://github.com/coturn/coturn/wiki forum: diff --git a/README.turnserver b/README.turnserver index 01ac596a..3b2bf8ca 100644 --- a/README.turnserver +++ b/README.turnserver @@ -540,7 +540,7 @@ LOAD BALANCE AND PERFORMANCE TUNING This topic is covered in the wiki page: -http://code.google.com/p/coturn/wiki/turn_performance_and_load_balance +https://github.com/coturn/coturn/wiki/turn_performance_and_load_balance =================================== @@ -638,7 +638,7 @@ knowledge of the shared secret, a new temporary password cannot be generated. This is all formally described in Justin's Uberti TURN REST API document that can be obtained following the link "TURN REST API" in the TURN Server -project's page http://code.google.com/p/coturn/. +project's page https://github.com/coturn/coturn/. Once the temporary username and password are obtained by the client (browser) application, then the rest is just 'classic" long-term credentials mechanism. @@ -911,11 +911,11 @@ SEE ALSO project page: -http://code.google.com/p/coturn/ +https://github.com/coturn/coturn/ Wiki page: -http://code.google.com/p/coturn/wiki/Readme +https://github.com/coturn/coturn/wiki forum: diff --git a/README.turnutils b/README.turnutils index 2233b66e..c7e23ee5 100644 --- a/README.turnutils +++ b/README.turnutils @@ -293,11 +293,11 @@ SEE ALSO project page: - http://code.google.com/p/coturn/ + https://github.com/coturn/coturn/ Wiki page: - http://code.google.com/p/coturn/wiki/Readme + https://github.com/coturn/coturn/wiki forum: diff --git a/examples/etc/turnserver.conf b/examples/etc/turnserver.conf index 20b19add..afd32145 100644 --- a/examples/etc/turnserver.conf +++ b/examples/etc/turnserver.conf @@ -183,7 +183,7 @@ # This feature can be used with the long-term authentication mechanism, only. # This feature purpose is to support "TURN Server REST API", see # "TURN REST API" link in the project's page -# http://code.google.com/p/coturn/. +# https://github.com/coturn/coturn/ # # This option is used with timestamp: # diff --git a/man/man1/turnadmin.1 b/man/man1/turnadmin.1 index 2269b378..c178c735 100644 --- a/man/man1/turnadmin.1 +++ b/man/man1/turnadmin.1 @@ -1,5 +1,5 @@ .\" Text automatically generated by txt2man -.TH TURN 1 "15 June 2015" "" "" +.TH TURN 1 "19 July 2015" "" "" .SH GENERAL INFORMATION \fIturnadmin\fP is a TURN administration tool. This tool can be used to manage @@ -301,11 +301,11 @@ to see the man page. project page: .PP -http://code.google.com/p/coturn/ +https://github.com/coturn/coturn/ .PP Wiki page: .PP -http://code.google.com/p/coturn/wiki/Readme +https://github.com/coturn/coturn/wiki .PP forum: .PP diff --git a/man/man1/turnserver.1 b/man/man1/turnserver.1 index 51389c91..ed076044 100644 --- a/man/man1/turnserver.1 +++ b/man/man1/turnserver.1 @@ -1,5 +1,5 @@ .\" Text automatically generated by txt2man -.TH TURN 1 "15 June 2015" "" "" +.TH TURN 1 "19 July 2015" "" "" .SH GENERAL INFORMATION The \fBTURN Server\fP project contains the source code of a TURN server and TURN client @@ -771,7 +771,7 @@ Set network engine type for the process (for internal purposes). This topic is covered in the wiki page: .PP -http://code.google.com/p/coturn/wiki/turn_performance_and_load_balance +https://github.com/coturn/coturn/wiki/turn_performance_and_load_balance .PP =================================== .SH WEBRTC USAGE @@ -872,7 +872,7 @@ knowledge of the shared secret, a new temporary password cannot be generated. .PP This is all formally described in Justin's Uberti TURN REST API document that can be obtained following the link "TURN REST API" in the \fBTURN Server\fP -project's page http://code.google.com/p/coturn/. +project's page https://github.com/coturn/coturn/. .PP Once the temporary username and password are obtained by the client (browser) application, then the rest is just 'classic" long\-term credentials mechanism. @@ -1155,11 +1155,11 @@ STUN NAT behavior discovery RFC 5780 project page: .PP -http://code.google.com/p/coturn/ +https://github.com/coturn/coturn/ .PP Wiki page: .PP -http://code.google.com/p/coturn/wiki/Readme +https://github.com/coturn/coturn/wiki .PP forum: .PP diff --git a/man/man1/turnutils.1 b/man/man1/turnutils.1 index d0dcf260..80bc36eb 100644 --- a/man/man1/turnutils.1 +++ b/man/man1/turnutils.1 @@ -1,5 +1,5 @@ .\" Text automatically generated by txt2man -.TH TURN 1 "15 June 2015" "" "" +.TH TURN 1 "19 July 2015" "" "" .SH GENERAL INFORMATION A set of turnutils_* programs provides some utility functionality to be used @@ -411,11 +411,11 @@ STUN NAT behavior discovery RFC 5780 project page: .PP -http://code.google.com/p/coturn/ +https://github.com/coturn/coturn/ .PP Wiki page: .PP -http://code.google.com/p/coturn/wiki/Readme +https://github.com/coturn/coturn/wiki .PP forum: .PP diff --git a/rpm/CentOS6.pre.build.sh b/rpm/CentOS6.pre.build.sh index cd801137..9e1e61ca 100755 --- a/rpm/CentOS6.pre.build.sh +++ b/rpm/CentOS6.pre.build.sh @@ -12,7 +12,7 @@ LIBEVENT_MAJOR_VERSION=2 LIBEVENT_VERSION=${LIBEVENT_MAJOR_VERSION}.0.21 LIBEVENT_DISTRO=libevent-${LIBEVENT_VERSION}-stable.tar.gz LIBEVENT_SPEC_DIR=libevent.rpm -LIBEVENTSPEC_SVN_URL=${TURNSERVER_SVN_URL}/${LIBEVENT_SPEC_DIR} +LIBEVENT_SPEC_GIT_URL=https://github.com/coturn/coturn/raw/libevent.rpm LIBEVENT_SPEC_FILE=libevent.spec # Common packs @@ -31,12 +31,21 @@ fi if ! [ -f ${BUILDDIR}/SPECS/${LIBEVENT_SPEC_FILE} ] ; then cd ${BUILDDIR}/tmp rm -rf ${LIBEVENT_SPEC_DIR} - svn export ${LIBEVENTSPEC_SVN_URL} ${LIBEVENT_SPEC_DIR} + mkdir ${LIBEVENT_SPEC_DIR} + cd ${LIBEVENT_SPEC_DIR} + wget ${WGETOPTIONS} ${LIBEVENT_SPEC_GIT_URL}/${LIBEVENT_SPEC_FILE} ER=$? if ! [ ${ER} -eq 0 ] ; then cd ${CPWD} exit -1 fi + wget ${WGETOPTIONS} ${LIBEVENT_SPEC_GIT_URL}/${LIBEVENT_DISTRO} + ER=$? + if ! [ ${ER} -eq 0 ] ; then + cd ${CPWD} + exit -1 + fi + cd .. if ! [ -f ${LIBEVENT_SPEC_DIR}/${LIBEVENT_SPEC_FILE} ] ; then echo "ERROR: cannot download ${LIBEVENT_SPEC_FILE} file" diff --git a/rpm/build.instructions.txt b/rpm/build.instructions.txt index 8f5050bf..9196b34f 100644 --- a/rpm/build.instructions.txt +++ b/rpm/build.instructions.txt @@ -26,7 +26,7 @@ To build the TURN server: mysql-devel (or mariadb-devel), postgresql-devel, hiredis-devel 4) $ mkdir ~/rpmbuild 5) $ mkdir ~/rpmbuild/SOURCES - 6) Export the TURN server from SVN, "svn export http://coturn.googlecode.com/svn/trunk/ turnserver-2.6.7.0" + 6) Export the TURN server from Github, "git clone https://github.com/coturn/coturn.git" 7) Create a tarball, "tar zcf ~/rpmbuild/SOURCES/turnserver-2.6.7.0.tar.gz turnserver-2.6.7.0" 8) Build the RPMs, "rpmbuild -ta ~/rpmbuild/SOURCES/turnserver-2.6.7.0.tar.gz" diff --git a/rpm/build.settings.sh b/rpm/build.settings.sh index ec4de760..1e9afd3d 100755 --- a/rpm/build.settings.sh +++ b/rpm/build.settings.sh @@ -2,11 +2,10 @@ # Common settings script. -TURNVERSION=4.4.5.3 +TURNVERSION=4.4.5.4 BUILDDIR=~/rpmbuild ARCH=`uname -p` -TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn -TURNSERVER_SVN_URL_VER=trunk +TURNSERVER_GIT_URL=https://github.com/coturn/coturn.git WGETOPTIONS="--no-check-certificate" RPMOPTIONS="-ivh --force" diff --git a/rpm/build.sh b/rpm/build.sh index 1edefe6f..e1e918ab 100755 --- a/rpm/build.sh +++ b/rpm/build.sh @@ -20,7 +20,7 @@ fi cd ${BUILDDIR}/tmp rm -rf turnserver-${TURNVERSION} -svn export ${TURNSERVER_SVN_URL}/${TURNSERVER_SVN_URL_VER}/ turnserver-${TURNVERSION} +git clone ${TURNSERVER_GIT_URL} --branch ${TURNVERSION} turnserver-${TURNVERSION} ER=$? if ! [ ${ER} -eq 0 ] ; then cd ${CPWD} diff --git a/rpm/common.pre.build.sh b/rpm/common.pre.build.sh index 0bf831e6..499d036b 100755 --- a/rpm/common.pre.build.sh +++ b/rpm/common.pre.build.sh @@ -16,7 +16,7 @@ mkdir -p ${BUILDDIR}/tmp # Common packs -PACKS="make gcc redhat-rpm-config rpm-build doxygen openssl-devel svn" +PACKS="make gcc redhat-rpm-config rpm-build doxygen openssl-devel git wget" sudo yum -y install ${PACKS} ER=$? if ! [ ${ER} -eq 0 ] ; then diff --git a/rpm/turnserver.spec b/rpm/turnserver.spec index e4716dde..79d05108 100644 --- a/rpm/turnserver.spec +++ b/rpm/turnserver.spec @@ -1,11 +1,11 @@ Name: turnserver -Version: 4.4.5.3 +Version: 4.4.5.4 Release: 0%{dist} Summary: Coturn TURN Server Group: System Environment/Libraries License: BSD -URL: https://code.google.com/p/coturn/ +URL: https://github.com/coturn/coturn/ Source0: http://turnserver.open-sys.org/downloads/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc, make, redhat-rpm-config, sqlite-devel @@ -289,6 +289,8 @@ fi %{_includedir}/turn/client/TurnMsgLib.h %changelog +* Sat Jul 18 2015 Oleg Moskalenko + - Sync to 4.4.5.4 * Sat Jun 20 2015 Oleg Moskalenko - Sync to 4.4.5.3 * Wed May 29 2015 Oleg Moskalenko diff --git a/src/apps/relay/mainrelay.c b/src/apps/relay/mainrelay.c index 66326757..75c587b2 100644 --- a/src/apps/relay/mainrelay.c +++ b/src/apps/relay/mainrelay.c @@ -588,7 +588,7 @@ static char Usage[] = "Usage: turnserver [options]\n" "\n" " For more information, see the wiki pages:\n" "\n" -" http://code.google.com/p/coturn/w/list\n" +" https://github.com/coturn/coturn/wiki/\n" "\n"; static char AdminUsage[] = "Usage: turnadmin [command] [options]\n" diff --git a/src/ns_turn_defs.h b/src/ns_turn_defs.h index bc00fbe7..c3815de1 100644 --- a/src/ns_turn_defs.h +++ b/src/ns_turn_defs.h @@ -31,7 +31,7 @@ #ifndef __IOADEFS__ #define __IOADEFS__ -#define TURN_SERVER_VERSION "4.4.5.3" +#define TURN_SERVER_VERSION "4.4.5.4" #define TURN_SERVER_VERSION_NAME "Ardee West" #define TURN_SOFTWARE "Coturn-" TURN_SERVER_VERSION " '" TURN_SERVER_VERSION_NAME "'"