turnutils.1 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "20 April 2014" "" ""
  3. .SH GENERAL INFORMATION
  4. A set of turnutils_* programs provides some utility functionality to be used
  5. for testing and for setting up the TURN server.
  6. .TP
  7. .B
  8. 1.
  9. \fIturnutils_uclient\fP: emulates multiple UDP,TCP,TLS or DTLS clients.
  10. (this program is provided for the testing purposes only !)
  11. The compiled binary image of this program is located in bin/
  12. sub\-directory.
  13. .PP
  14. WARNING: the \fIturnutils_uclient\fP program is a primitive client application.
  15. It does not implement the re\-transmission pattern that is necessary for
  16. a correct TURN client implementation. In TURN, the retransmission burden
  17. is lying almost entirely on the client application. We provide the messaging
  18. functionality in the client library, but the client must implement
  19. the correct Networking IO processing in the client program code.
  20. .TP
  21. .B
  22. 2.
  23. \fIturnutils_peer\fP: a simple stateless UDP\-only "echo" server,
  24. to be used as the final server in relay pattern ("peer"). For every incoming
  25. UDP packet, it simply echoes it back.
  26. (this program is provided for the testing purposes only !)
  27. When the test clients are communicating in the client\-to\-client manner
  28. (when the "\fIturnutils_uclient\fP" program is used with "\fB\-y\fP" option) then the
  29. \fIturnutils_peer\fP is not needed.
  30. .PP
  31. The compiled binary image of this program is located in bin/ subdirectory.
  32. .TP
  33. .B
  34. 3.
  35. \fIturnutils_stunclient\fP: a simple STUN client example.
  36. The compiled binary image of this program is located in bin/ subdirectory.
  37. .TP
  38. .B
  39. 4.
  40. \fIturnutils_rfc5769check\fP: a utility that checks the correctness of the
  41. STUN/TURN protocol implementation. This utility is used only for the compilation
  42. check procedure, it is not copied to the installation destination.
  43. .RE
  44. .PP
  45. .RS
  46. In the "examples/scripts" subdirectory, you will find the examples of command lines to be used
  47. to run the programs. The scripts are meant to be run from examples/ subdirectory, for example:
  48. .PP
  49. $ cd examples
  50. .PP
  51. $ ./scripts/secure_relay.sh
  52. .PP
  53. =====================================
  54. .SS NAME
  55. \fB
  56. \fBturnutils_uclient \fP\- this client emulation application is supplied for the test purposes only.
  57. \fB
  58. .SS SYNOPSIS
  59. $ \fIturnutils_uclient\fP [\fB\-tTSvsyhcxg\fP] [options] <TURN\-Server\-IP\-address>
  60. .SS DESCRIPTION
  61. It was designed to simulate multiple clients. It uses asynch IO API in
  62. libevent to handle multiple clients. A client connects to the relay,
  63. negotiates the session, and sends multiple (configured number) messages to the server (relay),
  64. expecting the same number of replies. The length of the messages is configurable.
  65. The message is an arbitrary octet stream, but it can be configured as a string.
  66. The number of the messages to send is configurable.
  67. .TP
  68. .B
  69. Flags:
  70. .TP
  71. .B
  72. \fB\-t\fP
  73. Use TCP for communications between client and TURN server (default is UDP).
  74. .TP
  75. .B
  76. \fB\-T\fP
  77. Use TCP for the relay transport (default \- UDP). Implies options \fB\-t\fP, \fB\-y\fP, \fB\-c\fP,
  78. and ignores flags and options \fB\-s\fP, \fB\-e\fP, \fB\-r\fP and \fB\-g\fP.
  79. .TP
  80. .B
  81. \fB\-P\fP
  82. Passive TCP (RFC6062 with active peer). Implies \fB\-T\fP.
  83. .TP
  84. .B
  85. \fB\-S\fP
  86. Secure SSL connection: SSL/TLS for TCP, DTLS for UDP.
  87. .TP
  88. .B
  89. \fB\-U\fP
  90. Secure unencrypted connection (suite eNULL): SSL/TLS for TCP, DTLS for UDP.
  91. .TP
  92. .B
  93. \fB\-v\fP
  94. Verbose.
  95. .TP
  96. .B
  97. \fB\-s\fP
  98. Use "Send" method in TURN; by default, it uses TURN Channels.
  99. .TP
  100. .B
  101. \fB\-y\fP
  102. Use client\-to\-client connections:
  103. RTP/RTCP pair of channels to another RTP/RTCP pair of channels.
  104. with this option the \fIturnutils_peer\fP application is not used,
  105. as the allocated relay endpoints are talking to each other.
  106. .TP
  107. .B
  108. \fB\-h\fP
  109. Hang on indefinitely after the last sent packet.
  110. .TP
  111. .B
  112. \fB\-c\fP
  113. Do not create rtcp connections.
  114. .TP
  115. .B
  116. \fB\-x\fP
  117. Request IPv6 relay address (RFC6156).
  118. .TP
  119. .B
  120. \fB\-X\fP
  121. IPv4 relay address explicitly requested.
  122. .TP
  123. .B
  124. \fB\-g\fP
  125. Set DONT_FRAGMENT parameter in TURN requests.
  126. .TP
  127. .B
  128. \fB\-A\fP
  129. use short\-term credentials mechanism for authentication.
  130. By default, the program uses the long\-term credentials mechanism
  131. if authentication is required.
  132. .TP
  133. .B
  134. \fB\-D\fP
  135. Do mandatory channel padding even for UDP (like pjnath).
  136. .TP
  137. .B
  138. \fB\-N\fP
  139. do negative tests (some limited cases only).
  140. .TP
  141. .B
  142. \fB\-R\fP
  143. do negative protocol tests.
  144. .TP
  145. .B
  146. \fB\-O\fP
  147. DOS attack mode.
  148. .TP
  149. .B
  150. \fB\-H\fP
  151. SHA256 digest function for message integrity calculation.
  152. Without this option, by default, SHA1 is used.
  153. .TP
  154. .B
  155. \fB\-M\fP
  156. Use TURN ICE Mobility.
  157. .TP
  158. .B
  159. \fB\-I\fP
  160. Do not set permissions on TURN relay endpoints
  161. (for testing the non\-standard server relay functionality).
  162. .TP
  163. .B
  164. \fB\-G\fP
  165. Generate extra requests (create permissions, channel bind).
  166. .TP
  167. .B
  168. Options with required values:
  169. .TP
  170. .B
  171. \fB\-l\fP
  172. Message length (Default: 100 Bytes).
  173. .TP
  174. .B
  175. \fB\-i\fP
  176. Certificate file (for secure connections only, optional).
  177. .TP
  178. .B
  179. \fB\-k\fP
  180. Private key file (for secure connections only).
  181. .TP
  182. .B
  183. \fB\-E\fP
  184. CA file for server certificate verification,
  185. if the server certificate to be verified.
  186. .TP
  187. .B
  188. \fB\-p\fP
  189. \fBTURN Server\fP port (Defaults: 3478 unsecure, 5349 secure).
  190. .TP
  191. .B
  192. \fB\-n\fP
  193. Number of messages to send (Default: 5).
  194. .TP
  195. .B
  196. \fB\-d\fP
  197. Local interface device (optional, Linux only).
  198. .TP
  199. .B
  200. \fB\-L\fP
  201. Local IP address (optional).
  202. .TP
  203. .B
  204. \fB\-m\fP
  205. Number of clients (Default: 1, 2 or 4, depending on options).
  206. .TP
  207. .B
  208. \fB\-e\fP
  209. Peer address.
  210. .TP
  211. .B
  212. \fB\-r\fP
  213. Peer port (Default: 3480).
  214. .TP
  215. .B
  216. \fB\-z\fP
  217. Per\-session packet interval in milliseconds (Default: 20).
  218. .TP
  219. .B
  220. \fB\-u\fP
  221. STUN/TURN user name.
  222. .TP
  223. .B
  224. \fB\-w\fP
  225. STUN/TURN user password.
  226. .TP
  227. .B
  228. \fB\-W\fP
  229. TURN REST API authentication secret. Is not compatible with \fB\-A\fP flag.
  230. .TP
  231. .B
  232. \fB\-C\fP
  233. This is the timestamp/username separator symbol (character) in
  234. TURN REST API. The default value is :.
  235. .TP
  236. .B
  237. \fB\-F\fP
  238. Cipher suite for TLS/DTLS. Default value is DEFAULT.
  239. .PP
  240. See the examples in the "examples/scripts" directory.
  241. .PP
  242. ======================================
  243. .SS NAME
  244. \fB
  245. \fBturnutils_peer \fP\- a simple UDP\-only echo backend server.
  246. \fB
  247. .SS SYNOPSYS
  248. $ \fIturnutils_peer\fP [\fB\-v\fP] [options]
  249. .SS DESCRIPTION
  250. This application is used for the test purposes only, as a peer for the \fIturnutils_uclient\fP application.
  251. .TP
  252. .B
  253. Options with required values:
  254. .TP
  255. .B
  256. \fB\-p\fP
  257. Listening UDP port (Default: 3480).
  258. .TP
  259. .B
  260. \fB\-d\fP
  261. Listening interface device (optional)
  262. .TP
  263. .B
  264. \fB\-L\fP
  265. Listening address of \fIturnutils_peer\fP server. Multiple listening addresses can be used, IPv4 and IPv6.
  266. If no listener \fBaddress\fP(es) defined, then it listens on all IPv4 and IPv6 addresses.
  267. .TP
  268. .B
  269. \fB\-v\fP
  270. Verbose
  271. .PP
  272. ========================================
  273. .SS NAME
  274. \fB
  275. \fBturnutils_stunclient \fP\- a basic STUN client.
  276. \fB
  277. .SS SYNOPSIS
  278. .nf
  279. .fam C
  280. $ \fIturnutils_stunclient\fP [\fIoptions\fP] <STUN\-Server\-IP\-address>
  281. .fam T
  282. .fi
  283. .fam T
  284. .fi
  285. .SS DESCRIPTION
  286. It sends a "new" STUN RFC 5389 request (over UDP) and shows the reply information.
  287. .TP
  288. .B
  289. Options with required values:
  290. .TP
  291. .B
  292. \fB\-p\fP
  293. STUN server port (Default: 3478).
  294. .TP
  295. .B
  296. \fB\-L\fP
  297. Local address to use (optional).
  298. .TP
  299. .B
  300. \fB\-f\fP
  301. Force RFC 5780 processing.
  302. .PP
  303. The \fIturnutils_stunclient\fP program checks the results of the first request,
  304. and if it finds that the STUN server supports RFC 5780
  305. (the binding response reveals that) then the \fIturnutils_stunclient\fP makes a couple more
  306. requests with different parameters, to demonstrate the NAT discovery capabilities.
  307. .PP
  308. This utility does not support the "old" "classic" STUN protocol (RFC 3489).
  309. .PP
  310. =====================================
  311. .SS NAME
  312. \fB
  313. \fBturnutils_rfc5769check \fP\- a utility that tests the correctness of STUN protocol implementation.
  314. \fB
  315. .SS SYNOPSIS
  316. .nf
  317. .fam C
  318. $ \fIturnutils_rfc5769check\fP
  319. .fam T
  320. .fi
  321. .fam T
  322. .fi
  323. .SS DESCRIPTION
  324. \fIturnutils_rfc5769check\fP tests the correctness of STUN protocol implementation
  325. against the test vectors predefined in RFC 5769 and prints the results of the
  326. tests on the screen. This utility is used only for the compilation
  327. check procedure, it is not copied to the installation destination.
  328. .TP
  329. .B
  330. Usage:
  331. .PP
  332. $ \fIturnutils_rfc5769check\fP
  333. .PP
  334. ===================================
  335. .SH DOCS
  336. After installation, run the command:
  337. .PP
  338. $ man \fIturnutils\fP
  339. .PP
  340. or in the project root directory:
  341. .PP
  342. $ man \fB\-M\fP man \fIturnutils\fP
  343. .PP
  344. to see the man page.
  345. .PP
  346. =====================================
  347. .SH FILES
  348. /etc/turnserver.conf
  349. .PP
  350. /etc/turnuserdb.conf
  351. .PP
  352. /usr/local/etc/turnserver.conf
  353. .PP
  354. /usr/local/etc/turnuserdb.conf
  355. .PP
  356. =================================
  357. .SH DIRECTORIES
  358. /usr/local/share/\fIturnserver\fP
  359. .PP
  360. /usr/local/share/doc/\fIturnserver\fP
  361. .PP
  362. /usr/local/share/examples/\fIturnserver\fP
  363. .PP
  364. ===================================
  365. .SH STANDARDS
  366. new STUN RFC 5389
  367. .PP
  368. TURN RFC 5766
  369. .PP
  370. TURN\-TCP extension RFC 6062
  371. .PP
  372. TURN IPv6 extension RFC 6156
  373. .PP
  374. STUN/TURN test vectors RFC 5769
  375. .PP
  376. STUN NAT behavior discovery RFC 5780
  377. .PP
  378. ====================================
  379. .SH SEE ALSO
  380. \fIturnserver\fP, \fIturnadmin\fP
  381. .RE
  382. .PP
  383. ======================================
  384. .SS WEB RESOURCES
  385. project page:
  386. .PP
  387. http://code.google.com/p/coturn/
  388. .PP
  389. Wiki page:
  390. .PP
  391. http://code.google.com/p/coturn/wiki/Readme
  392. .PP
  393. forum:
  394. .PP
  395. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server/
  396. .RE
  397. .PP
  398. ======================================
  399. .SS AUTHORS
  400. Oleg Moskalenko <[email protected]>
  401. .PP
  402. Gabor Kovesdan http://kovesdan.org/
  403. .PP
  404. Daniel Pocock http://danielpocock.com/
  405. .PP
  406. John Selbie ([email protected])
  407. .PP
  408. Lee Sylvester <[email protected]>
  409. .PP
  410. Erik Johnston <[email protected]>
  411. .PP
  412. Roman Lisagor <[email protected]>
  413. .PP
  414. Vladimir Tsanev <[email protected]>
  415. .PP
  416. Po\-sheng Lin <[email protected]>
  417. .PP
  418. Peter Dunkley <[email protected]>
  419. .PP
  420. Mutsutoshi Yoshimoto <[email protected]>