README.turnutils 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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 authentication secret. Is not compatible with -A flag.
  85. -C This is the timestamp/username separator symbol (character) in
  86. TURN REST API. The default value is :.
  87. -F Cipher suite for TLS/DTLS. Default value is DEFAULT.
  88. -o the ORIGIN STUN attribute value.
  89. -a Bandwidth for the bandwidth request in ALLOCATE. The default value is zero.
  90. See the examples in the "examples/scripts" directory.
  91. ======================================
  92. NAME
  93. turnutils_peer - a simple UDP-only echo backend server.
  94. SYNOPSYS
  95. $ turnutils_peer [-v] [options]
  96. DESCRIPTION
  97. This application is used for the test purposes only, as a peer for the turnutils_uclient application.
  98. Options with required values:
  99. -p Listening UDP port (Default: 3480).
  100. -d Listening interface device (optional)
  101. -L Listening address of turnutils_peer server. Multiple listening addresses can be used, IPv4 and IPv6.
  102. If no listener address(es) defined, then it listens on all IPv4 and IPv6 addresses.
  103. -v Verbose
  104. ========================================
  105. NAME
  106. turnutils_stunclient - a basic STUN client.
  107. SYNOPSIS
  108. $ turnutils_stunclient [options] <STUN-Server-IP-address>
  109. DESCRIPTION
  110. It sends a "new" STUN RFC 5389 request (over UDP) and shows the reply information.
  111. Options with required values:
  112. -p STUN server port (Default: 3478).
  113. -L Local address to use (optional).
  114. -f Force RFC 5780 processing.
  115. The turnutils_stunclient program checks the results of the first request,
  116. and if it finds that the STUN server supports RFC 5780
  117. (the binding response reveals that) then the turnutils_stunclient makes a couple more
  118. requests with different parameters, to demonstrate the NAT discovery capabilities.
  119. This utility does not support the "old" "classic" STUN protocol (RFC 3489).
  120. =====================================
  121. NAME
  122. turnutils_rfc5769check - a utility that tests the correctness of STUN protocol implementation.
  123. SYNOPSIS
  124. $ turnutils_rfc5769check
  125. DESCRIPTION
  126. turnutils_rfc5769check tests the correctness of STUN protocol implementation
  127. against the test vectors predefined in RFC 5769 and prints the results of the
  128. tests on the screen. This utility is used only for the compilation
  129. check procedure, it is not copied to the installation destination.
  130. Usage:
  131. $ turnutils_rfc5769check
  132. ===================================
  133. DOCS
  134. After installation, run the command:
  135. $ man turnutils
  136. or in the project root directory:
  137. $ man -M man turnutils
  138. to see the man page.
  139. =====================================
  140. FILES
  141. /etc/turnserver.conf
  142. /var/db/turndb
  143. /usr/local/var/db/turndb
  144. /var/lib/turn/turndb
  145. /usr/local/etc/turnserver.conf
  146. =================================
  147. DIRECTORIES
  148. /usr/local/share/turnserver
  149. /usr/local/share/doc/turnserver
  150. /usr/local/share/examples/turnserver
  151. ===================================
  152. STANDARDS
  153. new STUN RFC 5389
  154. TURN RFC 5766
  155. TURN-TCP extension RFC 6062
  156. TURN IPv6 extension RFC 6156
  157. STUN/TURN test vectors RFC 5769
  158. STUN NAT behavior discovery RFC 5780
  159. ====================================
  160. SEE ALSO
  161. turnserver, turnadmin
  162. ======================================
  163. WEB RESOURCES
  164. project page:
  165. https://github.com/coturn/coturn/
  166. Wiki page:
  167. https://github.com/coturn/coturn/wiki
  168. forum:
  169. https://groups.google.com/forum/?fromgroups=#!forum/turn-server-project-rfc5766-turn-server/
  170. ======================================
  171. AUTHORS
  172. Oleg Moskalenko <[email protected]>
  173. Gabor Kovesdan http://kovesdan.org/
  174. Daniel Pocock http://danielpocock.com/
  175. John Selbie ([email protected])
  176. Lee Sylvester <[email protected]>
  177. Erik Johnston <[email protected]>
  178. Roman Lisagor <[email protected]>
  179. Vladimir Tsanev <[email protected]>
  180. Po-sheng Lin <[email protected]>
  181. Peter Dunkley <[email protected]>
  182. Mutsutoshi Yoshimoto <[email protected]>
  183. Federico Pinna <[email protected]>
  184. Bradley T. Hughes <[email protected]>