turnutils.1 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "28 September 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. \fB\-B\fP
  169. Random disconnect after a few initial packets.
  170. .TP
  171. .B
  172. \fB\-Z\fP
  173. Dual allocation (SSODA draft support).
  174. .TP
  175. .B
  176. \fB\-J\fP
  177. Use oAuth with default test key kid='north'.
  178. .TP
  179. .B
  180. Options with required values:
  181. .TP
  182. .B
  183. \fB\-l\fP
  184. Message length (Default: 100 Bytes).
  185. .TP
  186. .B
  187. \fB\-i\fP
  188. Certificate file (for secure connections only, optional).
  189. .TP
  190. .B
  191. \fB\-k\fP
  192. Private key file (for secure connections only).
  193. .TP
  194. .B
  195. \fB\-E\fP
  196. CA file for server certificate verification,
  197. if the server certificate to be verified.
  198. .TP
  199. .B
  200. \fB\-p\fP
  201. \fBTURN Server\fP port (Defaults: 3478 unsecure, 5349 secure).
  202. .TP
  203. .B
  204. \fB\-n\fP
  205. Number of messages to send (Default: 5).
  206. .TP
  207. .B
  208. \fB\-d\fP
  209. Local interface device (optional, Linux only).
  210. .TP
  211. .B
  212. \fB\-L\fP
  213. Local IP address (optional).
  214. .TP
  215. .B
  216. \fB\-m\fP
  217. Number of clients (Default: 1, 2 or 4, depending on options).
  218. .TP
  219. .B
  220. \fB\-e\fP
  221. Peer address.
  222. .TP
  223. .B
  224. \fB\-r\fP
  225. Peer port (Default: 3480).
  226. .TP
  227. .B
  228. \fB\-z\fP
  229. Per\-session packet interval in milliseconds (Default: 20).
  230. .TP
  231. .B
  232. \fB\-u\fP
  233. STUN/TURN user name.
  234. .TP
  235. .B
  236. \fB\-w\fP
  237. STUN/TURN user password.
  238. .TP
  239. .B
  240. \fB\-W\fP
  241. TURN REST API authentication secret. Is not compatible with \fB\-A\fP flag.
  242. .TP
  243. .B
  244. \fB\-C\fP
  245. This is the timestamp/username separator symbol (character) in
  246. TURN REST API. The default value is :.
  247. .TP
  248. .B
  249. \fB\-F\fP
  250. Cipher suite for TLS/DTLS. Default value is DEFAULT.
  251. .TP
  252. .B
  253. \fB\-o\fP
  254. the ORIGIN STUN attribute value.
  255. .TP
  256. .B
  257. \fB\-a\fP
  258. Bandwidth for the bandwidth request in ALLOCATE. The default value is zero.
  259. .PP
  260. See the examples in the "examples/scripts" directory.
  261. .PP
  262. ======================================
  263. .SS NAME
  264. \fB
  265. \fBturnutils_peer \fP\- a simple UDP\-only echo backend server.
  266. \fB
  267. .SS SYNOPSYS
  268. $ \fIturnutils_peer\fP [\fB\-v\fP] [options]
  269. .SS DESCRIPTION
  270. This application is used for the test purposes only, as a peer for the \fIturnutils_uclient\fP application.
  271. .TP
  272. .B
  273. Options with required values:
  274. .TP
  275. .B
  276. \fB\-p\fP
  277. Listening UDP port (Default: 3480).
  278. .TP
  279. .B
  280. \fB\-d\fP
  281. Listening interface device (optional)
  282. .TP
  283. .B
  284. \fB\-L\fP
  285. Listening address of \fIturnutils_peer\fP server. Multiple listening addresses can be used, IPv4 and IPv6.
  286. If no listener \fBaddress\fP(es) defined, then it listens on all IPv4 and IPv6 addresses.
  287. .TP
  288. .B
  289. \fB\-v\fP
  290. Verbose
  291. .PP
  292. ========================================
  293. .SS NAME
  294. \fB
  295. \fBturnutils_stunclient \fP\- a basic STUN client.
  296. \fB
  297. .SS SYNOPSIS
  298. .nf
  299. .fam C
  300. $ \fIturnutils_stunclient\fP [\fIoptions\fP] <STUN\-Server\-IP\-address>
  301. .fam T
  302. .fi
  303. .fam T
  304. .fi
  305. .SS DESCRIPTION
  306. It sends a "new" STUN RFC 5389 request (over UDP) and shows the reply information.
  307. .TP
  308. .B
  309. Options with required values:
  310. .TP
  311. .B
  312. \fB\-p\fP
  313. STUN server port (Default: 3478).
  314. .TP
  315. .B
  316. \fB\-L\fP
  317. Local address to use (optional).
  318. .TP
  319. .B
  320. \fB\-f\fP
  321. Force RFC 5780 processing.
  322. .PP
  323. The \fIturnutils_stunclient\fP program checks the results of the first request,
  324. and if it finds that the STUN server supports RFC 5780
  325. (the binding response reveals that) then the \fIturnutils_stunclient\fP makes a couple more
  326. requests with different parameters, to demonstrate the NAT discovery capabilities.
  327. .PP
  328. This utility does not support the "old" "classic" STUN protocol (RFC 3489).
  329. .PP
  330. =====================================
  331. .SS NAME
  332. \fB
  333. \fBturnutils_rfc5769check \fP\- a utility that tests the correctness of STUN protocol implementation.
  334. \fB
  335. .SS SYNOPSIS
  336. .nf
  337. .fam C
  338. $ \fIturnutils_rfc5769check\fP
  339. .fam T
  340. .fi
  341. .fam T
  342. .fi
  343. .SS DESCRIPTION
  344. \fIturnutils_rfc5769check\fP tests the correctness of STUN protocol implementation
  345. against the test vectors predefined in RFC 5769 and prints the results of the
  346. tests on the screen. This utility is used only for the compilation
  347. check procedure, it is not copied to the installation destination.
  348. .TP
  349. .B
  350. Usage:
  351. .PP
  352. $ \fIturnutils_rfc5769check\fP
  353. .PP
  354. ===================================
  355. .SH DOCS
  356. After installation, run the command:
  357. .PP
  358. $ man \fIturnutils\fP
  359. .PP
  360. or in the project root directory:
  361. .PP
  362. $ man \fB\-M\fP man \fIturnutils\fP
  363. .PP
  364. to see the man page.
  365. .PP
  366. =====================================
  367. .SH FILES
  368. /etc/turnserver.conf
  369. .PP
  370. /etc/turnuserdb.conf
  371. .PP
  372. /usr/local/etc/turnserver.conf
  373. .PP
  374. /usr/local/etc/turnuserdb.conf
  375. .PP
  376. =================================
  377. .SH DIRECTORIES
  378. /usr/local/share/\fIturnserver\fP
  379. .PP
  380. /usr/local/share/doc/\fIturnserver\fP
  381. .PP
  382. /usr/local/share/examples/\fIturnserver\fP
  383. .PP
  384. ===================================
  385. .SH STANDARDS
  386. new STUN RFC 5389
  387. .PP
  388. TURN RFC 5766
  389. .PP
  390. TURN\-TCP extension RFC 6062
  391. .PP
  392. TURN IPv6 extension RFC 6156
  393. .PP
  394. STUN/TURN test vectors RFC 5769
  395. .PP
  396. STUN NAT behavior discovery RFC 5780
  397. .PP
  398. ====================================
  399. .SH SEE ALSO
  400. \fIturnserver\fP, \fIturnadmin\fP
  401. .RE
  402. .PP
  403. ======================================
  404. .SS WEB RESOURCES
  405. project page:
  406. .PP
  407. http://code.google.com/p/coturn/
  408. .PP
  409. Wiki page:
  410. .PP
  411. http://code.google.com/p/coturn/wiki/Readme
  412. .PP
  413. forum:
  414. .PP
  415. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server/
  416. .RE
  417. .PP
  418. ======================================
  419. .SS AUTHORS
  420. Oleg Moskalenko <[email protected]>
  421. .PP
  422. Gabor Kovesdan http://kovesdan.org/
  423. .PP
  424. Daniel Pocock http://danielpocock.com/
  425. .PP
  426. John Selbie ([email protected])
  427. .PP
  428. Lee Sylvester <[email protected]>
  429. .PP
  430. Erik Johnston <[email protected]>
  431. .PP
  432. Roman Lisagor <[email protected]>
  433. .PP
  434. Vladimir Tsanev <[email protected]>
  435. .PP
  436. Po\-sheng Lin <[email protected]>
  437. .PP
  438. Peter Dunkley <[email protected]>
  439. .PP
  440. Mutsutoshi Yoshimoto <[email protected]>
  441. .PP
  442. Federico Pinna <[email protected]>
  443. .PP
  444. Bradley T. Hughes <[email protected]>