README.turnutils 9.0 KB

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