INSTALL 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247
  1. I. TURN Server as a standard OS package
  2. At the present time, several operation systems have this project pre-packaged:
  3. 1) New Linuxes in Debian family have package "coturn":
  4. http://packages.qa.debian.org/r/coturn.html
  5. which can be installed the usual way: apt install coturn
  6. If instead you are using the Debian package from the project download site,
  7. then follow these instructions:
  8. Unpack the archive:
  9. $ tar xvfz turnserver-<...>.tar.gz
  10. Read the INSTALL file:
  11. $ cat INSTALL
  12. Install the *.deb file:
  13. $ sudo apt-get update
  14. $ sudo apt-get install gdebi-core
  15. $ sudo gdebi coturn*.deb
  16. (to install the bare package without any dependencies, type:
  17. $ sudo dpkg -i coturn_*_*.deb)
  18. After the install, read the documentation in /usr/share/doc/coturn directory.
  19. All binaries will be installed in /usr/bin/ directory.
  20. The turn*.conf config files are in /etc directory.
  21. The service start-up control scripts will be in /etc/init.d/coturn and
  22. in /etc/defaults/coturn files.
  23. 2) ArchLinux has this TURN server package:
  24. https://aur.archlinux.org/packages/coturn/
  25. 3) FreeBSD and OpenSUSE have the predecessor of this project packaged
  26. (rfc5766-turn-server).
  27. II. DOWNLOAD
  28. You have to download the archive file turnserver-*.tar.gz and unpack it:
  29. $ tar xfz turnserver-*.tgz
  30. it will create the directory 'turnserver-*' with all sources, build files,
  31. examples and documentation.
  32. III. BUILD
  33. 1) Use autoconfigure build
  34. If you are sure that you system is ready for the build (see the section
  35. "Extra libraries and Utilities" below) then you can build the system.
  36. First, you have to run the configure script:
  37. $ cd turnserver-*
  38. $ ./configure
  39. It will create a Makefile customized for your system.
  40. By default, the generated Makefile will install everything to:
  41. - /usr on Solaris.
  42. - /usr/pkg on NetBSD.
  43. - /usr/local everywhere else.
  44. The binaries will be copied to the bin subdirectory of the installation
  45. destination, config files copied to etc subdirectory. The default SQLite database
  46. will be created in var/db/turndb. There will be
  47. also documents, examples and some other files, in separate directories.
  48. You can change the root configured destination directory by
  49. setting PREFIX variable in the
  50. configure command line. For example:
  51. $ PREFIX=/opt ./configure
  52. Or:
  53. $ ./configure --prefix=/opt
  54. You can change the auxiliary configured destination sub-directories by
  55. setting BINDIR, CONFDIR, MANPREFIX, EXAMPLESDIR, DOCSDIR, LIBDIR, SCHEMADIR,
  56. LOCALSTATEDIR, TURNDBDIR and TURNINCLUDEDIR variables in the
  57. configure command line. For example:
  58. $ PREFIX=/opt BINDIR=/opt/bin64 CONFDIR=/opt/conf ./configure
  59. Or:
  60. $ ./configure --prefix=/opt --bindir=/opt/bin64 --confdir=/opt/conf
  61. You also can change the compilation and link options by
  62. setting common build variables in the
  63. configure command line. For example:
  64. $ CC=clang CFLAGS=-D_CAURIB LDFLAGS=-lshanka ./configure --prefix=/opt/shy
  65. See below a separate INSTALL section for more details.
  66. The script "configure" is a proprietary script. It will create a Makefile
  67. that you can use to build the project:
  68. $ make
  69. The make command without options will do the following:
  70. - compile the code.
  71. - create bin/ sub-directory and put the TURN server, TURN admin and
  72. "utility" programs there.
  73. - create lib/ sub-directory and put the client library there.
  74. - create include/turn/ sub-directory and put include files there.
  75. - create sqlite/turndb default empty database that will be copied to
  76. var/db/ during the installation.
  77. The TURN programs can be either called directly, or a shell scripts can be used.
  78. The script examples are located in examples/scripts directory. These scripts
  79. are just examples: you can run them successfully for the tests, but
  80. you will have to change the script parameters for your real environment.
  81. The command:
  82. $ sudo make install
  83. will install everything into the system file structure (see below).
  84. (NOTE: On NetBSD, use "su root -c").
  85. The command:
  86. $ sudo make deinstall
  87. will remove all installed TURN Server files from your system.
  88. The command:
  89. $ make clean
  90. will clean all results of the build and configuration actions.
  91. Do not run "make clean" before "make deinstall". The "clean" command will
  92. remove the Makefile and you will not be able to "deinstall" then. If that
  93. has happened, then run ./configure and make again, then deinstall and then
  94. clean.
  95. NOTE: On most modern systems, the build will produce dynamically linked
  96. executables. If you want statically linked executables, you have to modify,
  97. accordingly, the Makefile.in template file.
  98. 2) Use cmake build
  99. If you are sure that you system is ready for the build (see the section
  100. "Extra libraries and Utilities" below) and cmake tools then you can build
  101. the system.
  102. First, create build directory. you have to run the follow script:
  103. $ cd coturn
  104. $ mkdir build
  105. Then you have to run the configure script:
  106. $ cmake ..
  107. It will create a Makefile customized for your system.
  108. By default, the generated Makefile will install everything to:
  109. - /usr on Solaris.
  110. - /usr/pkg on NetBSD.
  111. - /usr/local everywhere else.
  112. The binaries will be copied to the bin subdirectory of the installation
  113. destination, config files copied to etc subdirectory. The default SQLite database
  114. will be created in var/db/turndb. There will be
  115. also documents, examples and some other files, in separate directories.
  116. You can change the root configured destination directory by
  117. setting CMAKE_INSTALL_PREFIX variable in the
  118. configure command line. For example:
  119. $ cmake .. -DCMAKE_INSTALL_PREFIX=/opt
  120. Build the project:
  121. $ cmake --build .
  122. Install all files(runtime programmes and develop library):
  123. $ cmake --build . --target install
  124. Remove all installed:
  125. $ cmake --build . --target uninstall
  126. If you want to only install runtime programmes(programmes, configure files,
  127. script files and database):
  128. $ cmake --build . --target install-runtime
  129. Remove all installed:
  130. $ cmake --build . --target uninstall-runtime
  131. IV. OPENSSL
  132. If you are using the OpenSSL that is coming with your system, and you are
  133. OK with it, then you do not have to read this chapter. If your system has
  134. an outdated OpenSSL version, or if you need some very fresh OpenSSL features
  135. that are not present in the current usual stable version, then you may have
  136. to compile (and run) your TURN server with a different OpenSSL version.
  137. For example, if you need ALPN feature, or DTLS1.2, and your system comes with
  138. OpenSSL 1.0.1, you will not be able to use those features unless you install
  139. OpenSSL 1.0.2 and compile and run the TURN server with the newer version.
  140. The problem is, it is usually not safe to replace the system's OpenSSL with
  141. a different version. Some systems are "bound" to its "native" OpenSSL
  142. installations, and their behavior may become unpredictable with the newer
  143. versions.
  144. So you want to preserve your system's OpenSSL but you want to compile and to
  145. run the TURN server with newer OpenSSL version. There are different ways to
  146. do that. We are suggesting the following:
  147. 1) Download the OpenSSL version from openssl.org.
  148. 2) Let's assume that we want to install the "custom" OpenSSL into /opt.
  149. Configure and build OpenSSL as:
  150. $ ./config --prefix=/opt
  151. $ make
  152. $ make install
  153. Those commands will install OpenSSL into /opt, with static libraries (no
  154. dynamic libraries).
  155. 3) Build the TURN server:
  156. $ ./configure --prefix=/opt
  157. $ make
  158. Those commands will build the TURN server binaries, statically linked
  159. against the newer OpenSSL.
  160. 4) Then you can run the TURN server without setting the dynamic
  161. libraries paths - because it has been linked statically against the newer
  162. OpenSSL libraries.
  163. One potential problem is that libevent2 is using the OpenSSL, too. So, ideally,
  164. to be 100% safe of all potential discrepancies in the runtime, we'd suggesting
  165. rebuilding libevent2 with the newer OpenSSL, too.
  166. V. INSTALL
  167. This step is optional. You can run the turnserver from the original build
  168. directory, successfully, without installing the TURN server into your system.
  169. You have to install the turnserver only if you want to integrate the
  170. turnserver in your system.
  171. Run the command:
  172. $ make install
  173. It will install turnserver in /usr/local/ directory (or to whatever directory
  174. was set in the PREFIX variable). You will have to copy
  175. /usr/local/etc/turnserver.conf.default to /usr/local/etc/turnserver.conf file
  176. and adjust your runtime configuration.
  177. This command will also:
  178. - copy the content of examples subdirectory into
  179. PREFIX/share/examples/turnserver/ directory;
  180. - copy the generated default empty SQLite database from sqlite/turndb
  181. to /usr/local/var/db or to /var/db/turndb;
  182. - copy the content of include/turn subdirectory into
  183. PREFIX/include/turn/ directory;
  184. - copy the database schema file turndb/schema.sql into
  185. PREFIX/share/turnserver/
  186. directory;
  187. - copy all docs into PREFIX/share/doc/turnserver/ directory.
  188. The installation destination of "make install" can be changed by
  189. using DESTDIR variable, for example:
  190. $ ./configure --prefix=/usr
  191. $ make
  192. $ make DESTDIR=/opt install
  193. In this example, the root installation directory will be /opt/usr.
  194. The "configure" script by default generates a Makefile with "rpath" option
  195. set for the dynamic libraries linking (if your system and your compiler
  196. allow that option). If that is not desirable (like in some OS packaging
  197. procedures), then run the "configure" script with --disable-rpath option.
  198. If you are not using the rpath linking option, then after the installation,
  199. you may have to adjust the system-wide shared library search path with
  200. "ldconfig -n <libdirname>" (Linux), "ldconfig -m <libdirname>" (BSD) or
  201. "crle -u -l <libdirname>" (Solaris). Your system must be able to find the
  202. libevent2, openssl and (optionally) SQLite and/or PostgreSQL and/or MySQL
  203. (MariaDB) and/or MongoDB and/or Redis shared libraries, either with the
  204. help of the system-wide library search configuration or by using
  205. LD_LIBRARY_PATH. "make install" will make a non-guaranteed effort to add
  206. automatically PREFIX/lib and /usr/local/lib to the libraries search path,
  207. but if you have some libraries in different non-default directories then
  208. you will have to add them manually to the search path, or you will have
  209. to adjust LD_LIBRARY_PATH.
  210. VI. PLATFORMS
  211. The TURN Server is using generic *NIX system APIs and is supposed to be
  212. usable on wide range of *NIX systems.
  213. The following platforms are supported
  214. (both i386 and x86_64 variants when applicable):
  215. - Linux,
  216. - BSD family (Mac OS X, FreeBSD, NetBSD, OpenBSD),
  217. - Solaris 11,
  218. - Cygwin
  219. It must work on other *NIXes, as well. The configure script and/or
  220. Makefile may need adjustments for other *NIXes not mentioned above.
  221. The code of the client messaging library can be compiled and used on
  222. Windows, too, but it is not supported for now.
  223. VI. COMPILERS
  224. The TURN Server is written in C programming language, for portability
  225. and for the performance reasons.
  226. The tested C compilers are:
  227. - gcc 3.4.4 thru 4.8.x
  228. - clang 3.0 or better
  229. - Solaris Studio 12 C compiler
  230. It may be compiled with other compilers, too.
  231. The code is compatible with C++ compiler, and a C++ compiler
  232. (like g++) can be used for the compilation, too:
  233. $ CC=g++ ./configure
  234. $ make
  235. VIII. WHICH EXTRA LIBRARIES AND UTILITIES YOU NEED
  236. In addition to common *NIX OS services and libraries, to compile this code,
  237. OpenSSL (version 1.0.0a or better recommended) and libevent2 (version 2.0.5
  238. or better) are required, SQLite C development library and header is optional,
  239. the PostgreSQL C client development setup is optional,
  240. the MySQL (MariaDB) C client development setup is optional,
  241. the MongoDB C Driver and the Hiredis development files for Redis database
  242. access are all optional. For development build, the development headers and
  243. the libraries to link with, are to be installed. For the runtime, only the
  244. runtime setup is required. If the build is modified for
  245. static linking, then even runtime installation is not needed.
  246. OpenSSL, SQLite, libevent2, PostgreSQL, MySQL (or MariaDB) and Hiredis
  247. libraries can be downloaded from their web sites:
  248. - http://www.openssl.org (required);
  249. - http://www.libevent.org (required);
  250. - http://www.sqlite.org (optional);
  251. - http://www.postgresql.org (optional);
  252. - http://www.mysql.org (or http://mariadb.org) (optional);
  253. - https://github.com/mongodb/mongo-c-driver (optional);
  254. - http://redis.io (optional).
  255. The installations are pretty straightforward - the usual
  256. "./configure" and "make install" commands. Install them into their default
  257. locations - the configure script and the Makefile are assuming that they are
  258. installed in their default locations. If not, then you will have to modify
  259. those.
  260. Most modern popular systems (FreeBSD, Linux Ubuntu/Debian/Mint, Amazon Linux, Fedora)
  261. have a simpler way of the third party tools installation:
  262. *) FreeBSD (the FRESH ports database is assumed to be installed, with
  263. the turnserver port included):
  264. $ cd /usr/ports/net/turnserver
  265. $ sudo make install clear
  266. That's it - that command will install the TURN server with all necesary
  267. thrid-party tools.
  268. If you system have no fresh ports repository:
  269. $ cd /usr/ports/security/openssl/
  270. $ sudo make install clean
  271. $ cd /usr/ports/databases/sqlite3/
  272. $ sudo make install clean
  273. $ cd /usr/ports/devel/libevent2/
  274. $ sudo make install clean
  275. $ cd /usr/ports/databases/postgresql84-client/ (or any other version)
  276. $ sudo make install clean
  277. $ cd /usr/ports/databases/mysql51-client/ (or any other version)
  278. $ sudo make install clean
  279. $ cd /usr/ports/databases/hiredis/
  280. $ sudo make install clean
  281. **) Linux Ubuntu, Debian, Mint:
  282. $ sudo apt-get install libssl-dev
  283. $ sudo apt-get install libsqlite3 (or sqlite3)
  284. $ sudo apt-get install libsqlite3-dev (or sqlite3-dev)
  285. $ sudo apt-get install libevent-dev
  286. $ sudo apt-get install libpq-dev
  287. $ sudo apt-get install mysql-client
  288. $ sudo apt-get install libmysqlclient-dev
  289. $ sudo apt-get install libhiredis-dev
  290. or you can use Synaptic or other software center.
  291. ***) Fedora:
  292. $ sudo yum install openssl-devel
  293. $ sudo yum install sqlite
  294. $ sudo yum install sqlite-devel
  295. $ sudo yum install libevent
  296. $ sudo yum install libevent-devel
  297. $ sudo yum install postgresql-devel
  298. $ sudo yum install postgresql-server
  299. $ sudo yum install mysql-devel
  300. $ sudo yum install mysql-server
  301. $ sudo yum install hiredis
  302. $ sudo yum install hiredis-devel
  303. ****) Amazon Linux is similar to Fedora, but:
  304. - you have to install gcc first:
  305. $ sudo yum install gcc
  306. - mongo-c-driver packages are not available "automatically".
  307. MongoDB support will not be compiled, unless you install it "manually"
  308. before the TURN server compilation. Refer to
  309. https://github.com/mongodb/mongo-c-driver for installation instructions
  310. of the driver.
  311. - hiredis packages are not available, so do not issue the
  312. hiredis installation commands. Redis support will not be
  313. compiled, unless you install it "manually" before the TURN
  314. server compilation. For Amazon EC2 AMIs, we install the
  315. redis manually in the system. But the TURN server can be
  316. perfectly installed without redis support - if you do not
  317. need it.
  318. *****) Older Debian family Linuxes are using some packages
  319. with different names.
  320. ******) On some CentOS / RedHat 6.x systems you have to install
  321. libevent2 "manually", and optionally you have to download and
  322. install Hiredis, but everything else can be found in the software
  323. repository. Also, if you would like to make an RPM for CentOS,
  324. check the directory rpm/ with the instructions.
  325. NOTE: If your tools are installed in non-standard locations, you will
  326. have to adjust CFLAGS and LDFLAGS environment variables for TURN
  327. server ./configure script. For example, to configure the TURN server
  328. with Solaris 11 PostgreSQL 32-bits setup, you may use a command
  329. like this:
  330. $ CFLAGS="${CFLAGS} -I/usr/postgres/9.2-pgdg/include/" LDFLAGS="${LDFLAGS} -L/usr/postgres/9.2-pgdg/lib/" ./configure
  331. Dynamic library paths:
  332. You may also have to adjust the turn server start script, add all the dynamic runtime
  333. library paths to LD_LIBRARY_PATH. Or you may find that it would be more convenient to adjust the
  334. system-wide shared library search path by using commands:
  335. on Linux:
  336. $ ldconfig -n <libdirname>
  337. or on BSD:
  338. $ ldconfig -m <libdirname>
  339. or on Solaris:
  340. $ crle -u -l <libdirname>
  341. On Mac OS X, you have three different choices for dynamic libraries handling:
  342. 1) Use DYLD_LIBRARY_PATH environment variable in runtime; OR
  343. 2) Before the compilation, check the dynamic libraries and adjust their identification names,
  344. if necessary, to the absolute library path or to @rpath/<library-file-name>.
  345. For example, the MySQL dynamic library may need that adjustment. You will have to use
  346. "adjust_name_tool" with -id option for that; OR
  347. 3) After the compilation, you can use the same tool, "adjust_name_tool",
  348. with option -change, to adjust the library paths values in the binary,
  349. where necessary. All library paths must be absolute paths or @rpath/... .
  350. See also the next section.
  351. NOTE: See "SQLite setup" and "PostgreSQL setup" and "MySQL setup" and
  352. "MongoDB setup" and "Redis setup" sections below for more database setup
  353. information.
  354. NOTE: If you do not install SQLite or PostgreSQL or MySQL or MongoDB or Redis,
  355. then you will be limited to the command-line options for user database.
  356. It will work great for development setup, but for real runtime systems you
  357. will need SQLite or PostgreSQL or MySQL or MongoDB or Redis.
  358. NOTE: To run PostgreSQL or MySQL or MongoDB or Redis server on the same system,
  359. you will also have to install a corresponding PostgreSQL or MySQL or
  360. MongoDB or Redis server package. The DB C development packages only provide
  361. development libraries, and client libraries only provide client
  362. access utilities and runtime libraries. The server packages may
  363. include everything - client, C development and server runtime.
  364. NOTE: OpenSSL to be installed before libevent2. When libevent2 is building,
  365. it is checking whether OpenSSL has been already installed, and which version
  366. of OpenSSL. If the OpenSSL is missed, or too old, then libevent_openssl
  367. library is not being created during the build, and you will not be able to
  368. compile the TURN Server with TLS support.
  369. NOTE: An older libevent version, version 1.x.x, is often included in some *NIX
  370. distributions. That version has its deficiencies and is inferior to the newer
  371. libevent2, especially in the performance department. This is why we are
  372. not providing backward compatibility with the older libevent 1.x version.
  373. If you have a system with older libevent, then you have to install the new
  374. libevent2 from their web site. It was tested with older *NIXes
  375. (like FreeBSD 6.x) and it works just fine.
  376. NOTE: SQLite must be of version 3.x.
  377. NOTE: For extra security features (like DTLS)
  378. support, OpenSSL version 1.0.0a or newer is recommended. Older versions do
  379. not support DTLS, reliably, in some cases. For example, the Debian 'Squeeze'
  380. Linux supplies 0.9.8 version of OpenSSL, that does not work correctly with
  381. DTLS over IPv6. If your system already has an older version of OpenSSL
  382. installed (usually in directory /usr) then you may want to install your
  383. newer OpenSSL "over" the old one (because it will most probably will not allow
  384. removal of the old one). When installing the newer OpenSSL, run the OpenSSL's
  385. configure command like this:
  386. $ ./config --prefix=/usr
  387. that will set the installation prefix to /usr (without "--prefix=/usr"
  388. by default it would be installed to /usr/local). This is necessary if you
  389. want to overwrite your existing older OpenSSL installation.
  390. IX. BUILDING WITH NON-DEFAULT PREFIX DIRECTORY
  391. Say, you have an older system with old openssl and old libevent
  392. library and you do not want to change that, but you still want
  393. to build the turnserver.
  394. Do the following steps:
  395. 1) Download new openssl from openssl.org.
  396. 2) Configure and build new openssl and install it into /opt:
  397. $ ./config --prefix=/opt
  398. $ make
  399. $ make install
  400. 3) Download the latest libevent2 from libevent.org, configure and install
  401. it into /opt:
  402. $ ./configure --prefix=/opt
  403. $ make
  404. $ make install
  405. 4) Change directory to coturn and build it:
  406. $ ./configure --prefix=/opt
  407. $ make
  408. After that, you can either use it locally, or install it into /opt.
  409. But remember that to run it, you have to adjust your LD_LIBRARY_PATH,
  410. like that:
  411. $ LD_LIBRARY_PATH=/opt/lib ./bin/turnserver
  412. An alternative would be adjusting the system-wide shared library search path
  413. by using
  414. $ ldconfig -n <libdirname> (Linux)
  415. $ ldconfig -m <libdirname> (BSD)
  416. $ crle -u -l <libdirname> (Solaris)
  417. X. TEST SCRIPTS
  418. First of all, you can use the test vectors from RFC 5769 to double-check that the
  419. STUN/TURN message encoding algorithms work properly. Run the utility:
  420. $ cd examples
  421. $ ./scripts/rfc5769.sh
  422. It will perform several protocol checks and print the results on the output.
  423. If anything has compiled wrongly (TURN Server, or OpenSSL libraries)
  424. then you will see some errors.
  425. Now, you can perform the TURN functionality test (bare minimum TURN example).
  426. If everything compiled properly, then the following programs must run
  427. together successfully, simulating TURN network routing in local loopback
  428. networking environment:
  429. Open two shell screens or consoles:
  430. In shell number 1, run TURN server application:
  431. $ cd examples
  432. $ ./scripts/basic/relay.sh
  433. In shell number 2, run test client application:
  434. $ cd examples
  435. $ ./scripts/basic/udp_c2c_client.sh
  436. If the client application produces output and in approximately 22 seconds
  437. prints the jitter, loss and round-trip-delay statistics, then everything is
  438. fine.
  439. There is another more complex test:
  440. In shell number 1, run TURN server application:
  441. $ cd examples
  442. $ ./scripts/basic/relay.sh
  443. In shell number 2, run "peer" application:
  444. $ cd examples
  445. $ ./scripts/peer.sh
  446. In shell number 3, run test client application:
  447. $ cd examples
  448. $ ./scripts/basic/udp_client.sh (or ./scripts/basic/tcp_client.sh)
  449. There is a similar set of examples/scripts/longtermsecure/* scripts for
  450. TURN environment with long-term authentication mechanism. This set of
  451. scripts is more complex, and checking the scripts options is useful for
  452. understanding how the TURN Server works:
  453. In shell number 1, run secure TURN server application:
  454. $ cd examples
  455. $ ./scripts/longtermsecure/secure_relay.sh
  456. In shell number 2, run "peer" application:
  457. $ cd examples
  458. $ ./scripts/peer.sh
  459. In shell number 3, run secure test client application:
  460. $ cd examples
  461. $ ./scripts/longtermsecure/secure_udp_client.sh
  462. (or ./scripts/longtermsecure/secure_tcp_client.sh)
  463. (or ./scripts/longtermsecure/secure_tls_client.sh)
  464. (or ./scripts/longtermsecure/secure_dtls_client.sh)
  465. (or ./scripts/longtermsecure/secure_sctp_client.sh)
  466. (or ./scripts/longtermsecure/secure_udp_c2c.sh for "peerless"
  467. client-to-client communications)
  468. The provided scripts are set for the local loopback communications,
  469. as an example and as a test environment. Real networking IPs must be
  470. used in real work environments.
  471. Try wireshark to check the communications between client, turnserver
  472. and the peer.
  473. Check the README.* files and the comments in the scripts relay.sh and
  474. secure_relay.sh as a guidance how to run the TURN server.
  475. XI. OS X compilation notes
  476. OS X usually has an older version of openssl supplied, with some Apple
  477. additions. The the "native" openssl will work, within its limitations,
  478. but the best option is to install a good fresh openssl development
  479. library, from http://www.openssl.org. You will have
  480. to handle the dynamic linking of the generated binaries, or use the
  481. static linking (see the section OPENSSL).
  482. XII. MS Windows and Cygwin support
  483. Currently, this project cannot be compiled under MS Windows.
  484. As the project is using fairly straightforward *NIX API, it is supported
  485. under Cygwin environment in MS Windows.
  486. One note for Cygwin users: we recommended libevent2 installation from the cygwin
  487. "ports" site: http://sourceware.org/cygwinports/ . You will have to install
  488. libevent2 runtime and libevent-devel packages. "Manual" libevent2 compilation
  489. and installation in Cygwin is not recommended and does not garantee a good
  490. outcome.
  491. XIII. CLIENT API LIBRARY.
  492. The compilation process will create lib/ sub-directory with libturnclient.a
  493. library. The header files for this library are located in include/turn/client/
  494. sub-directory. The C++ wrapper for the messaging functionality is located in
  495. TurnMsgLib.h header. An example of C++ code can be found in stunclient.c file.
  496. This file is compiled as a C++ program if C++ compiler is used, and as a C
  497. program if C compiler is used.
  498. XIV. DOCS
  499. After installation, the man page turnserver(1) must be available. The man page
  500. is located in man/man1 subdirectory. If you want to see the man page without
  501. installation, run the command:
  502. $ man -M man turnserver
  503. HTML-formatted client library functions reference is located in docs/html
  504. subdirectory of the original archive tree. After the installation, it will
  505. be placed in PREFIX/share/doc/turnserver/html.
  506. XV. SQLite setup
  507. The site http://www.sqlite.org site has excellent extensive documentation.
  508. The default SQLite database location for the TURN Server is
  509. /usr/local/var/db/turndb or /var/db/turndb (depending on the platform).
  510. The database schema for the TURN server is very minimalistic and is located
  511. in project's turndb/schema.sql file, or in the system's
  512. PREFIX/share/turnserver/schema.sql file after the turnserver installation:
  513. If you would like to created a new fresh SQLite TURN database:
  514. $ sqlite3 <your-db-file-name> < turndb/schema.sql
  515. The schema description:
  516. # Table for long-term credentials mechanism authorization:
  517. #
  518. CREATE TABLE turnusers_lt (
  519. realm varchar(127) default '',
  520. name varchar(512),
  521. hmackey char(128),
  522. PRIMARY KEY (realm,name)
  523. );
  524. The field hmackey contains HEX string representation of the key.
  525. We do not store the user open passwords for long-term credentials, for
  526. security reasons. Storing only the HMAC key has its own implications -
  527. if you change the realm, you will have to update the HMAC keys of all
  528. users, because the realm is used for the HMAC key generation.
  529. The key must be up to 32 characters (HEX representation of 16 bytes) for SHA1:
  530. # Table holding shared secrets for secret-based authorization
  531. # (REST API). Shared secret can be stored either in unsecure open
  532. # plain form, or in encrypted form (see turnadmin docs).
  533. # It can only be used together with the long-term
  534. # mechanism:
  535. #
  536. CREATE TABLE turn_secret (
  537. realm varchar(127) default '',
  538. value varchar(127),
  539. primary key (realm,value)
  540. );
  541. # Table holding "white" allowed peer IP ranges.
  542. #
  543. CREATE TABLE allowed_peer_ip (
  544. realm varchar(127) default '',
  545. ip_range varchar(256),
  546. primary key (realm,ip_range)
  547. );
  548. # Table holding "black" denied peer IP ranges.
  549. #
  550. CREATE TABLE denied_peer_ip (
  551. realm varchar(127) default '',
  552. ip_range varchar(256),
  553. primary key (realm,ip_range)
  554. );
  555. # Table to match origin to realm.
  556. # Multiple origins may have the same realm.
  557. # If no realm is found or the origin is absent
  558. # then the default realm is used.
  559. #
  560. CREATE TABLE turn_origin_to_realm (
  561. origin varchar(127),
  562. realm varchar(127),
  563. primary key (origin,realm)
  564. );
  565. # Realm options.
  566. # Valid options are 'max-bps',
  567. # 'total-quota' and 'user-quota'.
  568. # Values for them are integers (in text form).
  569. #
  570. CREATE TABLE turn_realm_option (
  571. realm varchar(127) default '',
  572. opt varchar(32),
  573. value varchar(128),
  574. primary key (realm,opt)
  575. );
  576. # oAuth key storage table.
  577. #
  578. CREATE TABLE oauth_key (
  579. kid varchar(128),
  580. ikm_key varchar(256),
  581. timestamp bigint default 0,
  582. lifetime integer default 0,
  583. as_rs_alg varchar(64) default '',
  584. realm varchar(127) default '',
  585. primary key (kid)
  586. );
  587. The oauth_key table fields meanings are:
  588. kid: the kid of the key;
  589. ikm_key - base64-encoded key ("input keying material");
  590. timestamp - (optional) the timestamp (in seconds) when the key
  591. lifetime starts;
  592. lifetime - (optional) the key lifetime in seconds; the default value
  593. is 0 - unlimited lifetime.
  594. as_rs_alg - oAuth token encryption algorithm; the valid values are
  595. "A256GCM", "A128GCM" (see
  596. http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-5.1).
  597. The default value is "A256GCM";
  598. realm - (optional) can be used to set the user realm (if the field is not empty).
  599. # Https access admin users.
  600. # Leave this table empty if you do not want
  601. # remote https access to the admin functions.
  602. # Web user password can be stored either in unsecure open
  603. # plain form, or in encrypted form (see turnadmin docs).
  604. #
  605. CREATE TABLE admin_user (
  606. name varchar(32),
  607. realm varchar(127),
  608. password varchar(127),
  609. primary key (name)
  610. );
  611. You can use turnadmin program to manage the database - you can either use
  612. turnadmin to add/modify/delete users, or you can use turnadmin to produce
  613. the hmac keys and modify the database with your favorite tools.
  614. When starting the turnserver, the --db parameter will be, for example:
  615. turnserver ... --db="/var/db/turndb"
  616. You will have to use the program turnadmin to fill the
  617. database, or you can do that manually with psql.
  618. Fill in users, for example:
  619. Shared secret for the TURN REST API (realm north.gov):
  620. $ bin/turnadmin -s logen -r north.gov -b "/var/db/turndb"
  621. Long-term credentials mechanism:
  622. $ bin/turnadmin -a -b "/var/db/turndb" -u gorst -r north.gov -p hero
  623. $ bin/turnadmin -a -b "/var/db/turndb" -u ninefingers -r north.gov -p youhavetoberealistic
  624. Admin users:
  625. $ bin/turnadmin -A -b "/var/db/turndb" -u gorst -p hero
  626. $ bin/turnadmin -A -b "/var/db/turndb" -u ninefingers -p youhavetoberealistic -r north.gov
  627. XVI. PostgreSQL setup
  628. The site http://www.postgresql.org site has excellent extensive documentation.
  629. For a quick-start guide, you can take a look into this page:
  630. http://www.freebsddiary.org/postgresql.php. That page is written for
  631. FreeBSD users, but it has lots of generic information applicable to other
  632. *NIXes, too.
  633. For the psql-userdb TURN server parameter, you can either set a PostgreSQL
  634. connection string, or a PostgreSQL URI, see the link:
  635. For 8.4 PostgreSQL version:
  636. http://www.postgresql.org/docs/8.4/static/libpq-connect.html
  637. For newer 9.x versions:
  638. http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING.
  639. In the PostgreSQL connection string or URI, you can set the host, the
  640. access port, the database name, the user, and the user password
  641. (if the access is secured). Numerous other parameters can be set,
  642. see the links above. The TURN server will blindly use that connection
  643. string without any modifications. You are responsible for the right
  644. connection string format.
  645. Below are the steps to setup the PostgreSQL database server from scratch:
  646. 1) Install PostgreSQL server. After the installation, do not forget to
  647. initialize the postgres root database directory:
  648. $ sudo bash
  649. $ su -l pgsql
  650. $ initdb -D /usr/local/pgsql/data
  651. 2) Find and edit Postgres' pg_hba.conf file to set the access options
  652. (see docs). On different systems, it may be located in different places.
  653. Set the lines for local access as "trust" for now (you can change it later),
  654. for TCP/IP access set the value as "md5".
  655. To set TCP/IP access from any host, use "0.0.0.0/0" for IPv4, and "::/0"
  656. for IPv6.
  657. 3) Edit postgresql.conf file to allow TCP/IP access - uncomment and edit
  658. the "listen_addresses" option (see docs). On different systems, this file
  659. may be located in different places.
  660. 4) Restart your system or restart the postgresql server, for example:
  661. $ sudo /etc/init.d/postgresql stop
  662. $ sudo /etc/init.d/postgresql start
  663. The scripts may also be in /usr/local/etc/init.d, or in /etc/rc.d/, or
  664. in /usr/local/etc/rc.d/ .
  665. 5) Check /etc/passwd file to find out which user account is used for the
  666. PostgreSQL admin access on your system (it may be "pgsql", or "postgres",
  667. or "postgresql"). Let's assume that this is "postgres" account.
  668. 6) Create a database for the TURN purposes, with name, say, "turn":
  669. $ createdb -U postgres coturn
  670. 7) Create a user for the TURN with name, say, "turn":
  671. $ psql -U postgres coturn
  672. turn=# create user turn with password 'turn';
  673. turn=#
  674. Ctrl-D
  675. 8) Create the TURN users database schema.
  676. The database schema for the TURN server is very minimalistic and is located
  677. in project's turndb/schema.sql file, or in the system's
  678. PREFIX/share/turnserver/schema.sql file after the turnserver installation:
  679. $ cat turndb/schema.sql | psql -U turn -d coturn
  680. NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "turnusers_lt_pkey" for table "turnusers_lt"
  681. CREATE TABLE
  682. CREATE TABLE
  683. See the SQLite section for the detailed database schema explanation.
  684. To fill the database with test data:
  685. cat turndb/testsqldbsetup.sql | psql -U turn -d coturn
  686. You can use turnadmin program to manage the database - you can either use
  687. turnadmin to add/modify/delete users, or you can use turnadmin to produce
  688. the hmac keys and modify the database with your favorite tools.
  689. More examples of database schema creation:
  690. psql -h <host> -U <db-user> -d <database-name> < turndb/schema.sql
  691. (old style for 8.4)
  692. psql postgresql://username:password@/databasename < turndb/schema.sql
  693. (newer style for 9.x, UNIX domain local sockets)
  694. Or:
  695. psql postgresql://username:password@hostname:port/databasename < turndb/schema.sql
  696. (newer style for 9.x, TCP/IP access)
  697. Below, the string "postgresql://turn:turn@/turn" is the connection URI.
  698. Of course, the administrators can play with the connection string as they want.
  699. When starting the turnserver, the psql-userdb parameter will be, for example:
  700. turnserver ... --psql-userdb="host=localhost dbname=coturn user=turn password=turn connect_timeout=30"
  701. Or, for 9.x PostgreSQL versions:
  702. turnserver ... --psql-userdb=postgresql://username:password@/databasename ...
  703. 9) You are ready to use the TURN database. The database name is "turn",
  704. the user name is "turn", the user password is "turn". Of course, you can
  705. choose your own names. Now, you will have to use the program turnadmin to fill the
  706. database, or you can do that manually with psql.
  707. Fill in users, for example:
  708. Shared secret for the TURN REST API (realm north.gov):
  709. $ bin/turnadmin -s logen -r north.gov -e "host=localhost dbname=coturn user=turn password=turn"
  710. Long-term credentials mechanism:
  711. $ bin/turnadmin -a -e "host=localhost dbname=coturn user=turn password=turn" -u gorst -r north.gov -p hero
  712. $ bin/turnadmin -a -e "host=localhost dbname=coturn user=turn password=turn" -u ninefingers -r north.gov -p youhavetoberealistic
  713. Admin users:
  714. $ bin/turnadmin -A -e "host=localhost dbname=coturn user=turn password=turn" -u gorst -p hero
  715. $ bin/turnadmin -A -e "host=localhost dbname=coturn user=turn password=turn" -u ninefingers -p youhavetoberealistic -r north.gov
  716. XVII. MySQL (MariaDB) setup
  717. The MySQL setup is similar to PostgreSQL (the same idea), and is well documented
  718. on their site http://www.mysql.org. The TURN Server database schema is the
  719. same as for PostgreSQL and you can find it in turndb/schema.sql file, or
  720. in the system's PREFIX/share/turnserver/schema.sql file after the turnserver
  721. installation.
  722. The general setup is similar to PostgreSQL setup procedure:
  723. 1) Check that the mysql server access is OK. Immediately after the MySQL server
  724. installation, it must be accessible, at the very minimum, at the localhost with
  725. the root account.
  726. 2) Login into mysql console from root account:
  727. $ sudo bash
  728. # mysql mysql
  729. (or mysql -p mysql if mysql account password set)
  730. 3) Add 'turn' user with 'turn' password (for example):
  731. > create user 'turn'@'localhost' identified by 'turn';
  732. 4) Create database 'coturn' (for example) and grant privileges to user 'turn':
  733. > create database coturn character set latin1;
  734. > grant all on coturn.* to 'turn'@'localhost';
  735. > flush privileges;
  736. Ctrl-D
  737. 5) Create database schema:
  738. $ mysql -p -u turn coturn < turndb/schema.sql
  739. Enter password: turn
  740. $
  741. Fill in test database data, if this is a test database
  742. (not a production database):
  743. $ mysql -p -u turn coturn < turndb/testsqldbsetup.sql
  744. 6) Fill in users, for example:
  745. Shared secret for the TURN REST API (realm north.gov):
  746. $ bin/turnadmin -s logen -r north.gov -M "host=localhost dbname=coturn user=turn password=turn"
  747. Long-term credentials mechanism:
  748. $ bin/turnadmin -a -M "host=localhost dbname=coturn user=turn password=turn" -u gorst -r north.gov -p hero
  749. $ bin/turnadmin -a -M "host=localhost dbname=coturn user=turn password=turn" -u ninefingers -r north.gov -p youhavetoberealistic
  750. Admin users:
  751. $ bin/turnadmin -A -M "host=localhost dbname=coturn user=turn password=turn" -u gorst -p hero
  752. $ bin/turnadmin -A -M "host=localhost dbname=coturn user=turn password=turn" -u ninefingers -p youhavetoberealistic -r north.gov
  753. 7) Now we can use mysql in the turnserver.
  754. If the TURN server was compiled with MySQL support, then we can use the
  755. TURN server database parameter --mysql-userdb. The value of this parameter
  756. is a connection string for the MySQL database. As "native" MySQL does not
  757. have such a feature as "connection string", the TURN server parses the
  758. connection string and converts it into MySQL database connection parameter.
  759. The format of the MySQL connection string is:
  760. "host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> port=<port> connect_timeout=<seconds> read_timeout=<seconds>"
  761. (all parameters are optional)
  762. So, an example of the MySQL database parameter in the TURN server command
  763. line would be:
  764. --mysql-userdb="host=localhost dbname=coturn user=turn password=turn connect_timeout=30 read_timeout=30"
  765. Or in the turnserver.conf file:
  766. mysql-userdb="host=localhost dbname=coturn user=turn password=turn connect_timeout=30 read_timeout=30"
  767. If you have to use a secure MySQL connection (SSL) then you have to use also
  768. the optional connection string parameters for the secure communications:
  769. ca, capath, cert, key, cipher (see
  770. http://dev.mysql.com/doc/refman/5.1/en/ssl-options.html for the
  771. command options description).
  772. XVIII. MongoDB setup
  773. The MongoDB setup is well documented on their site http://docs.mongodb.org/manual/.
  774. Note: if your system has a "standard" plain vanilla UNIX "make" utility
  775. (that is not a GNU make) then you will have to use the GNU make to compile
  776. the Mongo driver, because the Mongo compilation process was written with
  777. the "proprietary" GNU extensions. For example, in FreeBSD in will have to use
  778. "gmake" command.
  779. If the TURN server was compiled with MongoDB support (mongo-c-driver is the C client
  780. library for MongoDB), then we can use the TURN server database parameter
  781. --mongo-userdb. The value of this parameter is a connection string
  782. for the MongoDB database. The format of the connection string is described at
  783. http://hergert.me/docs/mongo-c-driver/mongoc_uri.html:
  784. "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]"
  785. So, an example of the MongoDB database parameter in the TURN server command
  786. line would be:
  787. --mongo-userdb="mongodb://localhost:27017/coturn"
  788. Or in the turnserver.conf file:
  789. mongo-userdb="mongodb://localhost:27017/coturn"
  790. The meanings of the MongoDB keys are the same as for the other databases, see the
  791. explanations for the Postgres, for example.
  792. See the file testmongosetup.sh for the database structure examples.
  793. XIX. Redis setup
  794. The Redis setup is well documented on their site http://redis.io.
  795. The TURN Server Redis database schema description can be found
  796. in schema.userdb.redis and schema.stats.redis files. Those files are located
  797. either in the turndb subdirectory of the main source code directory,
  798. or in /usr/local/share/turnserver/ after the installation, or somewhere in /usr/share/
  799. directory, depending on the OS and on the instalation package.
  800. If the TURN server was compiled with Hiredis support (Hiredis is the C client
  801. library for Redis), then we can use the TURN server database parameter
  802. --redis-userdb. The value of this parameter is a connection string
  803. for the Redis database. As "native" Redis does not have such a feature as
  804. "connection string", the TURN server parses the connection string and
  805. converts it into Redis database access parameter. The format of the Redis
  806. connection string is:
  807. "ip=<ip-addr> dbname=<database-number> password=<database-password> port=<port> connect_timeout=<seconds>"
  808. (all parameters are optional)
  809. So, an example of the Redis database parameter in the TURN server command
  810. line would be:
  811. --redis-userdb="ip=127.0.0.1 dbname=2 password=turn connect_timeout=30"
  812. Or in the turnserver.conf file:
  813. redis-userdb="ip=127.0.0.1 dbname=2 password=turn connect_timeout=30"
  814. Redis can be also used for the TURN allocation status check and for status and
  815. traffic notifications.
  816. See the explanation in the turndb/schema.stats.redis file, and an example in
  817. turndb/testredisdbsetup.sh file. One special thing about TURN Redis security
  818. setup is that you can store open passwords for long-term credentials in Redis.
  819. You cannot set open passwords for long-term credentials in SQLite or MySQL or
  820. PostgreSQL - with those DBs, you have to use the keys only. With Redis, you
  821. have a choice - keys or open passwords.
  822. You also have to take care about Redis connection parameters, the timeout and the
  823. keepalive. The following settings must be in your Redis config file
  824. (/etc/redis.conf or /usr/local/etc/redis.conf):
  825. ..........
  826. timeout 0
  827. ..........
  828. tcp-keepalive 60
  829. ..........
  830. Redis TURN admin commands:
  831. Shared secret for the TURN REST API (realm north.gov):
  832. $ bin/turnadmin -s logen -r north.gov -N "host=localhost dbname=2 user=turn password=turn"
  833. Long-term credentials mechanism:
  834. $ bin/turnadmin -a -N "host=localhost dbname=2 user=turn password=turn" -u gorst -r north.gov -p hero
  835. $ bin/turnadmin -a -N "host=localhost dbname=2 user=turn password=turn" -u ninefingers -r north.gov -p youhavetoberealistic
  836. Admin users:
  837. $ bin/turnadmin -A -N "host=localhost dbname=2 user=turn password=turn" -u gorst -p hero
  838. $ bin/turnadmin -A -N "host=localhost dbname=2 user=turn password=turn" -u ninefingers -p youhavetoberealistic -r north.gov
  839. See the file testredisdbsetup.sh for the data structure examples.
  840. XX. Performance tuning
  841. This topic is covered in the wiki page:
  842. https://github.com/coturn/coturn/wiki/TURN-Performance-and-Load-Balance
  843. XXI. TURN Server setup
  844. Read the project wiki pages: https://github.com/coturn/coturn/wiki
  845. Also, check the project from page links to the TURN/WebRTC configuration examples.
  846. It may give you an idea how it can be done.
  847. XXII. HTTPS Management Interface
  848. The turnserver process provides an HTTPS Web access as statistics and basic management
  849. interface. The turnserver listens to incoming HTTPS admin connections on the same ports
  850. as the main TURN/STUN listener. The Web admin pages are basic and self-explanatory.
  851. To make the HTTPS interface active, the database table admin_user must be
  852. populated with the admin user account(s). An admin user can be a superuser
  853. (if not assigned to a particular realm) or a restricted user (if assigned to
  854. a realm). The restricted admin users can perform only limited actions, within
  855. their corresponding realms.
  856. XXIII. Telnet CLI management interface
  857. You have a telnet interface (enabled by default) to access the turnserver process,
  858. to view its state, to gather some statistical information, and to make some changes
  859. on-the-fly.
  860. You can access that CLI interface with telnet or putty program (in telnet mode).
  861. The process by default listens to port 5766 on IP address 127.0.0.1 for the telnet
  862. connections.
  863. WARNING: all telnet communications are going unencrypted over the network. For
  864. security reasons, we advise using the loopback IP addresses for CLI (127.0.0.1
  865. or ::1). The CLI may have a password configured, but that password is
  866. transferred over the network unencrypted, too. So sticking to the local system
  867. CLI access, and accessing the turnserver system terminal with ssh only, would
  868. be a wise decision.
  869. XXIV. ALPN support.
  870. Starting with version 4.3.2.1, the TURN server supports the ALPN STUN
  871. specifications (http://tools.ietf.org/html/draft-ietf-tram-alpn-08).
  872. If the ALPN functionality is needed, then OpenSSL version 1.0.2 or
  873. newer has to be used. See OPENSSL section for the OpenSSL upgrade hints.
  874. XXV. SCTP support
  875. Starting with version 4.4.3.1, the TURN server supports 'native' SCTP.
  876. On the client side, the TURN server, additionally, supports SCTP and
  877. TLS-over-SCTP.
  878. The relay side is not changing - the relay communications will still be UDP
  879. or TCP.
  880. XXV. Prometheus support.
  881. See for source and releases for debian packages:
  882. https://github.com/digitalocean/prometheus-client-c