Kategorie:Coturn: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
|||
Zeile 315: | Zeile 315: | ||
'''''This project evolved from rfc5766-turn-server project (<nowiki>https://code.google.com/p/rfc5766-turn-server/</nowiki>). There are many new advanced TURN specs which are going far beyond the original <nowiki>RFC 5766</nowiki> document. This project takes the code of rfc5766-turn-server as the starter, and adds new advanced features to it.''''' | |||
Downloads page | |||
Docker image | |||
Wiki pages | |||
= 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: | |||
* <nowiki>RFC 5766</nowiki> - base TURN specs | |||
* <nowiki>RFC 6062</nowiki> - TCP relaying TURN extension | |||
* <nowiki>RFC 6156</nowiki> - IPv6 extension for TURN | |||
* <nowiki>RFC 7443</nowiki> - ALPN support for STUN & TURN | |||
* <nowiki>RFC 7635</nowiki> - oAuth third-party TURN/STUN authorization | |||
* DTLS support (<nowiki>http://tools.ietf.org/html/draft-petithuguenin-tram-turn-dtls-00</nowiki>). | |||
* Mobile ICE (MICE) support (<nowiki>http://tools.ietf.org/html/draft-wing-tram-turn-mobility-02</nowiki>). | |||
* TURN REST API (<nowiki>http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00</nowiki>) | |||
* Origin field in TURN (Multi-tenant TURN Server) (<nowiki>https://tools.ietf.org/html/draft-ietf-tram-stun-origin-06</nowiki>) | |||
* TURN Bandwidth draft specs (<nowiki>http://tools.ietf.org/html/draft-thomson-tram-turn-bandwidth-01</nowiki>) | |||
* TURN-bis (with dual allocation) draft specs (<nowiki>http://tools.ietf.org/html/draft-ietf-tram-turnbis-04</nowiki>). | |||
STUN specs: | |||
* <nowiki>RFC 3489</nowiki> - "classic" STUN | |||
* <nowiki>RFC 5389</nowiki> - base "new" STUN specs | |||
* <nowiki>RFC 5769</nowiki> - test vectors for STUN protocol testing | |||
* <nowiki>RFC 5780</nowiki> - NAT behavior discovery support | |||
* <nowiki>RFC 7443</nowiki> - ALPN support for STUN & TURN | |||
* <nowiki>RFC 7635</nowiki> - oAuth third-party TURN/STUN authorization | |||
Supported ICE and related specs: | |||
* <nowiki>RFC 5245</nowiki> - ICE | |||
* <nowiki>RFC 5768</nowiki> – ICE–SIP | |||
* <nowiki>RFC 6336</nowiki> – ICE–IANA Registry | |||
* <nowiki>RFC 6544</nowiki> – ICE–TCP | |||
* <nowiki>RFC 5928</nowiki> - TURN Resolution Mechanism | |||
The implementation fully supports the following client-to-TURN-server protocols: | |||
* UDP (per <nowiki>RFC 5766</nowiki>) | |||
* TCP (per <nowiki>RFC 5766</nowiki> and <nowiki>RFC 6062</nowiki>) | |||
* TLS (per <nowiki>RFC 5766</nowiki> and <nowiki>RFC 6062</nowiki>): TLS1.0/TLS1.1/TLS1.2; ECDHE is supported. | |||
* DTLS (<nowiki>http://tools.ietf.org/html/draft-petithuguenin-tram-turn-dtls-00</nowiki>): DTLS versions 1.0 and 1.2. | |||
* SCTP (experimental implementation). | |||
Supported relay protocols: | |||
* UDP (per <nowiki>RFC 5766</nowiki>) | |||
* TCP (per <nowiki>RFC 6062</nowiki>) | |||
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. | |||
By default a prometheus exporter endpoint is disabled, if it is enabled it will listen on port 9641 under path /metrics | |||
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: <nowiki>http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00</nowiki>); | |||
* 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 <code>*NIX</code> 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: | |||
<nowiki>https://groups.google.com/forum/#!forum/turn-server-project-rfc5766-turn-server</nowiki> | |||
email:[[Mailto:misi@majd.eu|misi@majd.eu]] [[Mailto:mom040267@gmail.com|mom040267@gmail.com]] | |||
[[Kategorie:Server]] | [[Kategorie:Server]] | ||
[[Kategorie:BigBlueButton]] | [[Kategorie:BigBlueButton]] | ||
[[Kategorie:Nextcloud:Talk]] | [[Kategorie:Nextcloud:Talk]] |
Version vom 22. Juli 2022, 13:35 Uhr
topic kurze Beschreibung
Beschreibung
siehe TURN-Protokoll
Installation
# apt install coturn
Hinweis coturn startet nicht automatisch, bis eine Konfiguration angewendet wird (siehe unten).
Anwendungen
Syntax
Optionen
Parameter
Umgebungsvariablen
Exit-Status
Konfiguration
- Konfigurationsdatei
- /etc/turnserver.conf
- Es stehen viele Optionen zur Verfügung, die alle in Kommentaren in der Standardkonfigurationsdatei dokumentiert sind.
- Im Folgenden finden Sie eine Beispielkonfiguration mit den empfohlenen Einstellungen (weitere Informationen zu den Einstellungen finden Sie in der Standardkonfigurationsdatei).
Verwenden Sie die folgende Datei für /etc/turnserver.conf und nehmen Sie folgende Änderungen vor:
- Ersetzen <turn.example.com> mit dem Hostnamen Ihres TURN-Servers und
- Ersetzen <example.com> mit dem Bereich Ihres TURN-Servers und
- Ersetzen <secret_value> auf einen zufälligen Wert für ein gemeinsames Geheimnis (Sie können einen durch Ausführen generieren openssl rand -hex 16)
- Ersetzen <IP> mit der externen IP Ihres TURN-Servers
Diese Konfigurationsdatei setzt voraus, dass sich Ihr TURN-Server nicht hinter NAT befindet und eine öffentliche IP-Adresse hat.
listening-port=3478 tls-listening-port=443 listening-ip=$IP relay-ip=$IP # If the server is behind NAT, you need to specify the external IP address. # If there is only one external address, specify it like this: #external-ip=172.17.19.120 # If you have multiple external addresses, you have to specify which # internal address each corresponds to, like this. The first address is the # external ip, and the second address is the corresponding internal IP. #external-ip=172.17.19.131/10.0.0.11 #external-ip=172.17.18.132/10.0.0.12 min-port=32769 max-port=65535 verbose fingerprint lt-cred-mech use-auth-secret static-auth-secret=<secret_value> realm=<example.com> cert=/etc/turnserver/fullchain.pem pkey=/etc/turnserver/privkey.pem From https://ssl-config.mozilla.org/ Intermediate, openssl 1.1.0g, 2020-01 cipher-list="ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" dh-file=/etc/turnserver/dhp.pem keep-address-family no-cli no-tlsv1 no-tlsv1_1 # Block connections to IP ranges which shouldn't be reachable no-loopback-peers no-multicast-peers # CVE-2020-26262 # If running coturn version older than 4.5.2, uncomment these rules and ensure # that you have listening-ip set to ipv4 addresses only. #denied-peer-ip=0.0.0.0-0.255.255.255 #denied-peer-ip=127.0.0.0-127.255.255.255 #denied-peer-ip=::1 # Private (LAN) addresses # If you are running BigBlueButton within a LAN, you might need to add an "allow" rule for your address range. # IPv4 Private-Use denied-peer-ip=10.0.0.0-10.255.255.255 denied-peer-ip=172.16.0.0-172.31.255.255 denied-peer-ip=192.168.0.0-192.168.255.255 # Other IPv4 Special-Purpose addresses denied-peer-ip=100.64.0.0-100.127.255.255 denied-peer-ip=169.254.0.0-169.254.255.255 denied-peer-ip=192.0.0.0-192.0.0.255 denied-peer-ip=192.0.2.0-192.0.2.255 denied-peer-ip=198.18.0.0-198.19.255.255 denied-peer-ip=198.51.100.0-198.51.100.255 denied-peer-ip=203.0.113.0-203.0.113.255 # IPv6 Unique-Local denied-peer-ip=fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff # IPv6 Link-Local Unicast denied-peer-ip=fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff # Other IPv6 Special-Purpose assignments denied-peer-ip=::ffff:0:0-::ffff:ffff:ffff denied-peer-ip=64:ff9b::-64:ff9b::ffff:ffff denied-peer-ip=64:ff9b:1::-64:ff9b:1:ffff:ffff:ffff:ffff:ffff denied-peer-ip=2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff denied-peer-ip=2001:db8::-2001:db8:ffff:ffff:ffff:ffff:ffff:ffff denied-peer-ip=2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
DNS
DNS-Eintrag
- Es wird ein vollständig qualifizierten Domänennamen benötigt, der in die externe IP-Adresse Ihres Turn-Servers aufgelöst
- Mit diesem Domänennamen werden TLS-Zertifikat mit Let's Encrypt erstellt
Erforderliche Ports
Auf dem Coturn-Server müssen die folgenden Ports erreichbar sein, damit Clients eine Verbindung herstellen können (Port 3478 und 443) und Coturn eine Verbindung zu Ihrem zu den Clients herstellen kann (32768 - 65535).
Ports | Protokoll | Beschreibung |
---|---|---|
3478 | TCP / UDP | Coturn Listening Port |
443 | TCP / UDP | TLS-Abhörport |
32768-65535 | UDP | Relaisanschlussbereich |
Erstellen der Datei dph.pem
# mkdir -p /etc/turnserver # openssl dhparam -dsaparam -out /etc/turnserver/dhp.pem 2048
Fügen Sie die folgende systemd-Override-Datei hinzu, um das Dateihandle-Limit für den TURN-Server zu erhöhen und ihm die Möglichkeit zu geben, an Port 443 zu binden. Erstellen Sie zunächst das Verzeichnis.
# mkdir -p /etc/systemd/system/coturn.service.d
und dann dann erstellen /etc/systemd/system/coturn.service.d/override.conf mit folgenden Inhalten
[Service] LimitNOFILE=1048576 AmbientCapabilities=CAP_NET_BIND_SERVICE ExecStart= ExecStart=/usr/bin/turnserver --daemon -c /etc/turnserver.conf --pidfile /run/turnserver/turnserver.pid --no-stdout-log --simple-log --log-file /var/log/turnserver/turnserver.log Restart=always
Dateien
Sicherheit
Dokumentation
RFC
Man-Pages
Info-Pages
Siehe auch
Links
Projekt-Homepage
Weblinks
Weblinks
- https://community.hetzner.com/tutorials/install-turn-stun-server-on-debian-ubuntu-with-coturn
- https://community.letsencrypt.org/t/are-pre-hook-and-post-hook-and-etc-letsencrypt-renewal-hooks-scripts-mutually-exclusive/96471
- https://certbot.eff.org/docs/using.html?highlight=hooks#pre-and-post-validation-hooks
- https://github.com/certbot/certbot/issues/5935
- https://serverfault.com/questions/849683/how-to-setup-coturn-with-letsencrypt
- https://github.com/coturn/coturn/issues/268
- https://www.google.com/search?client=firefox-b-d&q=turnserver%3A+0%3A+WARNING%3A+cannot+find+certificate+file
- https://decatec.de/home-server/nextcloud-talk-mit-eigenem-turn-server-coturn/
Einzelnachweise
Testfragen
Testfrage 1
Testfrage 2
Testfrage 3
Testfrage 4
Testfrage 5
Zertifikate
- TLS-Zertifikate von Let's Encrypt
# certbot certonly --standalone --preferred-challenges http -d <turn.example.com>
Aktuelle Versionen des Befehls certbot richten standardmäßig eine automatische Verlängerung ein.
- Renewal-Hook
- Um sicherzustellen, dass die Zertifikate von lesbar sind coturn, die als läuft turnserverBenutzer, fügen Sie den folgenden Erneuerungs-Hook zu Let's Encrypt hinzu.
- Erstellen Sie zunächst das Verzeichnis /etc/letsencrypt/renewal-hooks/deploy.
# mkdir -p /etc/letsencrypt/renewal-hooks/deploy
- Renewal-Hook Skript
/etc/letsencrypt/renewal-hooks/deploy/coturn
#!/bin/bash -e for certfile in fullchain.pem privkey.pem ; do cp -L /etc/letsencrypt/live/<turn.example.com>/"${certfile}" /etc/turnserver/"${certfile}".new chown turnserver:turnserver /etc/turnserver/"${certfile}".new mv /etc/turnserver/"${certfile}".new /etc/turnserver/"${certfile}" done systemctl kill -sUSR2 coturn.service
Datei ausführbar machen
# chmod 0755 /etc/letsencrypt/renewal-hooks/deploy/coturn
Protokollrotation
So drehen Sie die Protokolle für coturnInstallieren Sie die folgende Konfigurationsdatei in /etc/logrotate.d/coturn
/var/log/turnserver/*.log { rotate 7 daily missingok notifempty compress postrotate /bin/systemctl kill -s HUP coturn.service endscript }
Und erstellen Sie das zugehörige Protokollverzeichnis
# mkdir -p /var/log/turnserver # chown turnserver:turnserver /var/log/turnserver
Coturn neu starten
Starten Sie den TURN-Server nach Abschluss der obigen Schritte neu
# /etc/letsencrypt/renewal-hooks/deploy/coturn # Initial copy of certificates # systemctl daemon-reload # Ensure the override file is loaded # systemctl restart coturn # Restart
- Stellen Sie sicher, dass die coturn hat an Port 443 mit gebunden netstat -antp | grep 443.
- Starten Sie auch Ihren TURN-Server neu und stellen Sie dies sicher coturn wird ausgeführt (und nach dem Neustart an Port 443 gebunden).
Testen
- Standardmäßig versucht Ihr Browser, über WebRTC eine direkte Verbindung zu Kurento oder FreeSWITCH herzustellen.
- Wenn keine direkte Verbindung hergestellt werden kann, wird der TURN-Server als einer der ICE-Kandidaten (Interconnectivity Connectivity Exchange) zum Weiterleiten der Medien verwendet.
- Verwenden Sie FireFox, um Ihren TURN-Server zu testen.
- Mit FireFox können Sie direkte Verbindungen deaktivieren und einen Fallback zu Ihrem TURN-Server benötigen.
- Starten Sie FireFox und öffnen Sie es about:config und suchen Sie nach 'Relais . You should see a parameter media.peerconnection.ice.relay_only . Set this value to wahr`.
- Wenn FireFox so konfiguriert ist, dass nur ein TURN-Server verwendet wird, öffnen Sie eine neue Registerkarte, nehmen Sie an einer BigBlueButton-Sitzung teil und geben Sie Ihre Webcam frei.
- Wenn Ihre Webcam angezeigt wird, können Sie überprüfen, ob FireFox Ihren TURN-Server verwendet, indem Sie eine neue Registerkarte öffnen und auswählen about:webrtc.
- Klicken show detailsund Sie sehen eine Tabelle für ICE-Statistiken.
- Die erfolgreiche Verbindung, die oben in der Tabelle angezeigt wird, sollte haben (relay-tcp)in der Spalte Lokaler Kandidat.
- Dies bedeutet, dass die Videoverbindung erfolgreich über Ihren TURN-Server weitergeleitet wurde.
- Wenn Sie jedoch beim Freigeben einer Webcam eine 1020 erhalten haben (Verbindung kann nicht hergestellt werden), kann der Browser möglicherweise keine Verbindung zum TURN-Server herstellen oder der TURN-Server wird nicht ordnungsgemäß ausgeführt oder konfiguriert.
- Überprüfen Sie die Browserkonsole in FireFox.
Wenn du siehst
WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details
- Dann konnte FireFox nicht mit Ihrem TURN-Server kommunizieren oder Ihr TURN-Server wurde nicht ordnungsgemäß ausgeführt oder konfiguriert.
- Um sicherzustellen, dass Ihre Firewall keine UDP-Verbindungen über Port 443 blockiert, öffnen Sie einen neuen Tad-Besuch unter https://test.bigbluebutton.org/ , starten Sie eine Testsitzung und versuchen Sie, Ihre Webcam freizugeben.
- Der Browser kann möglicherweise keine Verbindung zum TURN-Server herstellen, oder der TURN-Server wird nicht ordnungsgemäß ausgeführt oder konfiguriert.
- Der TURN-Server fungiert auch als STUN-Server, sodass Sie zunächst überprüfen können, ob der STUN-Teil mit dem funktioniert stunclient.
- Führen Sie die folgenden Befehle aus und ersetzen Sie sie <youor-turn-server-host> mit dem Hostnamen Ihres TURN-Servers.
# apt install -y stuntman-client stunclient --mode full --localport 30000 <your-turn-server-host> 3478
Bei Erfolg sollte die Ausgabe für angezeigt werden stunclient sollte ähnlich wie folgt sein.
Binding test: success Local address: xxx.xxx.xxx.xxx:30000 Mapped address: xxx.xxx.xxx.xxx:30000 Behavior test: success Nat behavior: Direct Mapping Filtering test: success Nat filtering: Endpoint Independent Filtering
- Wenn Sie eine Fehlermeldung erhalten, überprüfen Sie dies coturn wird auf dem TURN-Server mit ausgeführt systemctl status coturn.service.
- Überprüfen Sie die Protokolle, indem Sie dies tun tail -f /var/log/turnserver/coturn.log.
- Sie können ausführliche Protokolle erhalten, indem Sie hinzufügen verbose zu /etc/turnserver.conf und Neustart des TURN-Servers systemctl restart coturn.service
- Sie können Ihren TURN-Server mithilfe der testen Trickle-ICE- Seite.
- Auf diese Weise erhalten Sie ein Protokoll der Relaiskandidaten, wenn diese von der ICE-Sammlung zurückgegeben werden.
- Um auf dieser Seite zu testen, müssen Sie einige Testanmeldeinformationen generieren.
- Führen Sie das folgende BASH-Skript aus und ersetzen Sie es <turn.example.com> mit dem Hostnamen Ihres TURN-Servers und <secret_value> mit dem Passwort für Ihren TURN-Server.
#!/bin/bash HOST=<turn.example.com> SECRET=<secret_value> time=$(date +%s) expiry=8400 username=$(( $time + $expiry )) echo echo " https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" echo echo URI : turn:$HOST:443 echo username : $username echo password : $(echo -n $username | openssl dgst -binary -sha1 -hmac $SECRET | openssl base64) echo
- Geben Sie die Werte in URI, Benutzername und Passwort auf der Trickle ICE-Seite ein und klicken Sie auf "Kandidaten sammeln".
- Sie sollten eine Liste der Staffelkandidaten sehen.
- Wenn Sie dies nicht tun, überprüfen Sie erneut, ob Ihr TURN-Server ausgeführt wird, und beenden Sie die Protokolle, über die der TURN-Server protokolliert tail -f /var/log/turnserver/coturn.log oder journalctl -f -u coturn.service.
Sie können ausführliche Protokolle erhalten, indem Sie hinzufügen verbose zu /etc/turnserver.conf und dann den TURN-Server neu starten systemctl restart coturn.serviceund versuchen Sie es erneut mit FireFox oder der obigen Tricke ICE-Seite.
TMP
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.
Downloads page
Docker image
Wiki pages
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
- RFC 7635 - oAuth third-party TURN/STUN authorization
- 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-06)
- 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).
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
- RFC 7635 - oAuth third-party TURN/STUN authorization
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): 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.
By default a prometheus exporter endpoint is disabled, if it is enabled it will listen on port 9641 under path /metrics
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