TurnServer  0.7
TurnServer Documentation

Introduction

This is the API documentation of TurnServer, an open-source implementation of RFC5766 "Traversal Using Relay NAT (TURN)".

The TURN protocol allows a client to obtain IP addresses and ports from such a relay. It is most useful for elements behind symmetric NATs or firewalls that wish to be on the receiving end of a connection to a single peer.

TURN clients can connect to TurnServer with the following protocols: UDP, TCP and TLS over TCP. Experimental DTLS support is also provided. Relaying data can be done with UDP or TCP protocol.

TurnServer supports also RFC5389 (STUN Binding request), RFC6062 (relay data with TCP protocol) and RFC6156 (relay IPv6-IPv6, IPv4-IPv6 and IPv6-IPv4).

Modules

The API is decomposed in several modules:

There are basics unit tests in test directory of source tree. Note that you have to install check framework in order to use it.

We provide also a "test" client application (test_turn_client) that can generate a suite of TURN packets (Allocate request, wait for an answer, Refresh requests, ...) using the modules above. It can connect to TURN server with UDP, TCP, TLS over TCP or DTLS.

Note that TurnServer uses OpenSSL (for cryptographics and TLS stuff) and Confuse (for parsing configuration file), so you need to have these libraries on your system.

Standards

TurnServer is written in C language which respects the following standards:

It also uses some realtime capabilities of POSIX.1b. Thus systems have to support these standards and capabilities to compile and use TurnServer.

TurnServer is known to run on the following systems:

License

TurnServer is licensed under the GPL version 3 (with an exception for OpenSSL).