README.turnutils 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. GENERAL INFORMATION
  2. A set of turnutils_* programs provides some utility functionality to be used
  3. for testing and for setting up the TURN server.
  4. 1. turnutils_uclient: emulates multiple UDP,TCP,TLS or DTLS clients.
  5. (this program is provided for the testing purposes only !)
  6. The compiled binary image of this program is located in bin/
  7. sub-directory.
  8. 2. turnutils_peer: a simple stateless UDP-only "echo" server,
  9. to be used as the final server in relay pattern ("peer"). For every incoming
  10. UDP packet, it simply echoes it back.
  11. (this program is provided for the testing purposes only !)
  12. When the test clients are communicating in the client-to-client manner
  13. (when the "turnutils_uclient" program is used with "-y" option) then the
  14. turnutils_peer is not needed.
  15. The compiled binary image of this program is located in bin/ subdirectory.
  16. 3. turnutils_stunclient: a simple STUN client example.
  17. The compiled binary image of this program is located in bin/ subdirectory.
  18. 4. turnutils_rfc5769check: a utility that checks the correctness of the
  19. STUN/TURN protocol implementation. This utility is used only for the compilation
  20. check procedure, it is not copied to the installation destination.
  21. In the "examples/scripts" subdirectory, you will find the examples of command lines to be used
  22. to run the programs. The scripts are meant to be run from examples/ subdirectory, for example:
  23. $ cd examples
  24. $ ./scripts/secure_relay.sh
  25. =====================================
  26. NAME
  27. turnutils_uclient - this client emulation application is supplied for the test purposes only.
  28. SYNOPSIS
  29. $ turnutils_uclient [-tTSvsyhcxg] [options] <TURN-Server-IP-address>
  30. DESCRIPTION
  31. It was designed to simulate multiple clients. It uses asynch IO API in
  32. libevent to handle multiple clients. A client connects to the relay,
  33. negotiates the session, and sends multiple (configured number) messages to the server (relay),
  34. expecting the same number of replies. The length of the messages is configurable.
  35. The message is an arbitrary octet stream.
  36. The number of the messages to send is configurable.
  37. Flags:
  38. -t Use TCP for communications between client and TURN server (default is UDP).
  39. -b Use SCTP for communications between client and TURN server (default is UDP).
  40. -T Use TCP for the relay transport (default - UDP). Implies options -t, -y, -c,
  41. and ignores flags and options -s, -e, -r and -g. Can be used together
  42. with -b.
  43. -P Passive TCP (RFC6062 with active peer). Implies -T.
  44. -S Secure SSL connection: SSL/TLS for TCP, DTLS for UDP, TLS/SCTP for SCTP.
  45. -U Secure unencrypted connection (suite eNULL): SSL/TLS for TCP, DTLS for UDP.
  46. -v Verbose.
  47. -s Use "Send" method in TURN; by default, it uses TURN Channels.
  48. -y Use client-to-client connections:
  49. RTP/RTCP pair of channels to another RTP/RTCP pair of channels.
  50. with this option the turnutils_peer application is not used,
  51. as the allocated relay endpoints are talking to each other.
  52. -h Hang on indefinitely after the last sent packet.
  53. -c Do not create rtcp connections.
  54. -x Request IPv6 relay address (RFC6156).
  55. -X IPv4 relay address explicitly requested.
  56. -g Set DONT_FRAGMENT parameter in TURN requests.
  57. -D Do mandatory channel padding even for UDP (like pjnath).
  58. -N do negative tests (some limited cases only).
  59. -R do negative protocol tests.
  60. -O DOS attack mode.
  61. -M Use TURN ICE Mobility.
  62. -I Do not set permissions on TURN relay endpoints
  63. (for testing the non-standard server relay functionality).
  64. -G Generate extra requests (create permissions, channel bind).
  65. -B Random disconnect after a few initial packets.
  66. -Z Dual allocation (SSODA). Implies -c option.
  67. -J Use oAuth with default test key kid='north'.
  68. Options with required values:
  69. -l Message length (Default: 100 Bytes).
  70. -i Certificate file (for secure connections only, optional).
  71. -k Private key file (for secure connections only).
  72. -E CA file for server certificate verification,
  73. if the server certificate to be verified.
  74. -p TURN Server port (Defaults: 3478 unsecure, 5349 secure).
  75. -n Number of messages to send (Default: 5).
  76. -d Local interface device (optional, Linux only).
  77. -L Local IP address (optional).
  78. -m Number of clients (Default: 1, 2 or 4, depending on options).
  79. -e Peer address.
  80. -r Peer port (Default: 3480).
  81. -z Per-session packet interval in milliseconds (Default: 20).
  82. -u STUN/TURN user name.
  83. -w STUN/TURN user password.
  84. -W TURN REST API secret. The "plain text" secret e.g. "north"
  85. that is stored in the value column of the turn_secret
  86. table in the database if dynamic, or the static-auth-secret
  87. value set in the configuration file if using static.
  88. -C This is the timestamp/username separator symbol (character) in
  89. TURN REST API. The default value is :.
  90. -F Cipher suite for TLS/DTLS. Default value is DEFAULT.
  91. -o the ORIGIN STUN attribute value.
  92. -a Bandwidth for the bandwidth request in ALLOCATE. The default value is zero.
  93. See the examples in the "examples/scripts" directory.
  94. ======================================
  95. NAME
  96. turnutils_peer - a simple UDP-only echo backend server.
  97. SYNOPSIS
  98. $ turnutils_peer [-v] [options]
  99. DESCRIPTION
  100. This application is used for the test purposes only, as a peer for the turnutils_uclient application.
  101. Options with required values:
  102. -p Listening UDP port (Default: 3480).
  103. -d Listening interface device (optional)
  104. -L Listening address of turnutils_peer server. Multiple listening addresses can be used, IPv4 and IPv6.
  105. If no listener address(es) defined, then it listens on all IPv4 and IPv6 addresses.
  106. -v Verbose
  107. ========================================
  108. NAME
  109. turnutils_stunclient - a basic STUN client.
  110. SYNOPSIS
  111. $ turnutils_stunclient [options] <STUN-Server-IP-address>
  112. DESCRIPTION
  113. It sends a "new" STUN RFC 5389 request (over UDP) and shows the reply information.
  114. Options with required values:
  115. -p STUN server port (Default: 3478).
  116. -L Local address to use (optional).
  117. -f Force RFC 5780 processing.
  118. The turnutils_stunclient program checks the results of the first request,
  119. and if it finds that the STUN server supports RFC 5780
  120. (the binding response reveals that) then the turnutils_stunclient makes a couple more
  121. requests with different parameters, to demonstrate the NAT discovery capabilities.
  122. This utility does not support the "old" "classic" STUN protocol (RFC 3489).
  123. =====================================
  124. NAME
  125. turnutils_rfc5769check - a utility that tests the correctness of STUN protocol implementation.
  126. SYNOPSIS
  127. $ turnutils_rfc5769check
  128. DESCRIPTION
  129. turnutils_rfc5769check tests the correctness of STUN protocol implementation
  130. against the test vectors predefined in RFC 5769 and prints the results of the
  131. tests on the screen. This utility is used only for the compilation
  132. check procedure, it is not copied to the installation destination.
  133. Usage:
  134. $ turnutils_rfc5769check
  135. ===================================
  136. DOCS
  137. After installation, run the command:
  138. $ man turnutils
  139. or in the project root directory:
  140. $ man -M man turnutils
  141. to see the man page.
  142. =====================================
  143. FILES
  144. /etc/turnserver.conf
  145. /var/db/turndb
  146. /usr/local/var/db/turndb
  147. /var/lib/turn/turndb
  148. /usr/local/etc/turnserver.conf
  149. =================================
  150. DIRECTORIES
  151. /usr/local/share/turnserver
  152. /usr/local/share/doc/turnserver
  153. /usr/local/share/examples/turnserver
  154. ===================================
  155. STANDARDS
  156. new STUN RFC 5389
  157. TURN RFC 5766
  158. TURN-TCP extension RFC 6062
  159. TURN IPv6 extension RFC 6156
  160. STUN/TURN test vectors RFC 5769
  161. STUN NAT behavior discovery RFC 5780
  162. ====================================
  163. SEE ALSO
  164. turnserver, turnadmin
  165. ======================================
  166. WEB RESOURCES
  167. project page:
  168. https://github.com/coturn/coturn/
  169. Wiki page:
  170. https://github.com/coturn/coturn/wiki
  171. forum:
  172. https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/
  173. ======================================
  174. AUTHORS
  175. Oleg Moskalenko <[email protected]>
  176. Gabor Kovesdan http://kovesdan.org/
  177. Daniel Pocock http://danielpocock.com/
  178. John Selbie ([email protected])
  179. Lee Sylvester <[email protected]>
  180. Erik Johnston <[email protected]>
  181. Roman Lisagor <[email protected]>
  182. Vladimir Tsanev <[email protected]>
  183. Po-sheng Lin <[email protected]>
  184. Peter Dunkley <[email protected]>
  185. Mutsutoshi Yoshimoto <[email protected]>
  186. Federico Pinna <[email protected]>
  187. Bradley T. Hughes <[email protected]>