README.turnutils 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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, but it can be configured as a string.
  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. -T Use TCP for the relay transport (default - UDP). Implies options -t, -y, -c,
  40. and ignores flags and options -s, -e, -r and -g.
  41. -P Passive TCP (RFC6062 with active peer). Implies -T.
  42. -S Secure SSL connection: SSL/TLS for TCP, DTLS for UDP.
  43. -U Secure unencrypted connection (suite eNULL): SSL/TLS for TCP, DTLS for UDP.
  44. -v Verbose.
  45. -s Use "Send" method in TURN; by default, it uses TURN Channels.
  46. -y Use client-to-client connections:
  47. RTP/RTCP pair of channels to another RTP/RTCP pair of channels.
  48. with this option the turnutils_peer application is not used,
  49. as the allocated relay endpoints are talking to each other.
  50. -h Hang on indefinitely after the last sent packet.
  51. -c Do not create rtcp connections.
  52. -x Request IPv6 relay address (RFC6156).
  53. -X IPv4 relay address explicitly requested.
  54. -g Set DONT_FRAGMENT parameter in TURN requests.
  55. -D Do mandatory channel padding even for UDP (like pjnath).
  56. -N do negative tests (some limited cases only).
  57. -R do negative protocol tests.
  58. -O DOS attack mode.
  59. -H SHA256 digest function for message integrity calculation.
  60. Without this option, by default, SHA1 is used.
  61. -K SHA512 digest function for message integrity calculation.
  62. -M Use TURN ICE Mobility.
  63. -I Do not set permissions on TURN relay endpoints
  64. (for testing the non-standard server relay functionality).
  65. -G Generate extra requests (create permissions, channel bind).
  66. -B Random disconnect after a few initial packets.
  67. -Z Dual allocation (SSODA). Implies -c option.
  68. -J Use oAuth with default test key kid='north'.
  69. Options with required values:
  70. -l Message length (Default: 100 Bytes).
  71. -i Certificate file (for secure connections only, optional).
  72. -k Private key file (for secure connections only).
  73. -E CA file for server certificate verification,
  74. if the server certificate to be verified.
  75. -p TURN Server port (Defaults: 3478 unsecure, 5349 secure).
  76. -n Number of messages to send (Default: 5).
  77. -d Local interface device (optional, Linux only).
  78. -L Local IP address (optional).
  79. -m Number of clients (Default: 1, 2 or 4, depending on options).
  80. -e Peer address.
  81. -r Peer port (Default: 3480).
  82. -z Per-session packet interval in milliseconds (Default: 20).
  83. -u STUN/TURN user name.
  84. -w STUN/TURN user password.
  85. -W TURN REST API authentication secret. Is not compatible with -A flag.
  86. -C This is the timestamp/username separator symbol (character) in
  87. TURN REST API. The default value is :.
  88. -F Cipher suite for TLS/DTLS. Default value is DEFAULT.
  89. -o the ORIGIN STUN attribute value.
  90. -a Bandwidth for the bandwidth request in ALLOCATE. The default value is zero.
  91. See the examples in the "examples/scripts" directory.
  92. ======================================
  93. NAME
  94. turnutils_peer - a simple UDP-only echo backend server.
  95. SYNOPSYS
  96. $ turnutils_peer [-v] [options]
  97. DESCRIPTION
  98. This application is used for the test purposes only, as a peer for the turnutils_uclient application.
  99. Options with required values:
  100. -p Listening UDP port (Default: 3480).
  101. -d Listening interface device (optional)
  102. -L Listening address of turnutils_peer server. Multiple listening addresses can be used, IPv4 and IPv6.
  103. If no listener address(es) defined, then it listens on all IPv4 and IPv6 addresses.
  104. -v Verbose
  105. ========================================
  106. NAME
  107. turnutils_stunclient - a basic STUN client.
  108. SYNOPSIS
  109. $ turnutils_stunclient [options] <STUN-Server-IP-address>
  110. DESCRIPTION
  111. It sends a "new" STUN RFC 5389 request (over UDP) and shows the reply information.
  112. Options with required values:
  113. -p STUN server port (Default: 3478).
  114. -L Local address to use (optional).
  115. -f Force RFC 5780 processing.
  116. The turnutils_stunclient program checks the results of the first request,
  117. and if it finds that the STUN server supports RFC 5780
  118. (the binding response reveals that) then the turnutils_stunclient makes a couple more
  119. requests with different parameters, to demonstrate the NAT discovery capabilities.
  120. This utility does not support the "old" "classic" STUN protocol (RFC 3489).
  121. =====================================
  122. NAME
  123. turnutils_rfc5769check - a utility that tests the correctness of STUN protocol implementation.
  124. SYNOPSIS
  125. $ turnutils_rfc5769check
  126. DESCRIPTION
  127. turnutils_rfc5769check tests the correctness of STUN protocol implementation
  128. against the test vectors predefined in RFC 5769 and prints the results of the
  129. tests on the screen. This utility is used only for the compilation
  130. check procedure, it is not copied to the installation destination.
  131. Usage:
  132. $ turnutils_rfc5769check
  133. ===================================
  134. DOCS
  135. After installation, run the command:
  136. $ man turnutils
  137. or in the project root directory:
  138. $ man -M man turnutils
  139. to see the man page.
  140. =====================================
  141. FILES
  142. /etc/turnserver.conf
  143. /var/db/turndb
  144. /usr/local/var/db/turndb
  145. /var/lib/turn/turndb
  146. /usr/local/etc/turnserver.conf
  147. =================================
  148. DIRECTORIES
  149. /usr/local/share/turnserver
  150. /usr/local/share/doc/turnserver
  151. /usr/local/share/examples/turnserver
  152. ===================================
  153. STANDARDS
  154. new STUN RFC 5389
  155. TURN RFC 5766
  156. TURN-TCP extension RFC 6062
  157. TURN IPv6 extension RFC 6156
  158. STUN/TURN test vectors RFC 5769
  159. STUN NAT behavior discovery RFC 5780
  160. ====================================
  161. SEE ALSO
  162. turnserver, turnadmin
  163. ======================================
  164. WEB RESOURCES
  165. project page:
  166. http://code.google.com/p/coturn/
  167. Wiki page:
  168. http://code.google.com/p/coturn/wiki/Readme
  169. forum:
  170. https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/
  171. ======================================
  172. AUTHORS
  173. Oleg Moskalenko <[email protected]>
  174. Gabor Kovesdan http://kovesdan.org/
  175. Daniel Pocock http://danielpocock.com/
  176. John Selbie ([email protected])
  177. Lee Sylvester <[email protected]>
  178. Erik Johnston <[email protected]>
  179. Roman Lisagor <[email protected]>
  180. Vladimir Tsanev <[email protected]>
  181. Po-sheng Lin <[email protected]>
  182. Peter Dunkley <[email protected]>
  183. Mutsutoshi Yoshimoto <[email protected]>
  184. Federico Pinna <[email protected]>
  185. Bradley T. Hughes <[email protected]>