turnutils.1 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "21 March 2015" "" ""
  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. .TP
  14. .B
  15. 2.
  16. \fIturnutils_peer\fP: a simple stateless UDP\-only "echo" server,
  17. to be used as the final server in relay pattern ("peer"). For every incoming
  18. UDP packet, it simply echoes it back.
  19. (this program is provided for the testing purposes only !)
  20. When the test clients are communicating in the client\-to\-client manner
  21. (when the "\fIturnutils_uclient\fP" program is used with "\fB\-y\fP" option) then the
  22. \fIturnutils_peer\fP is not needed.
  23. .PP
  24. The compiled binary image of this program is located in bin/ subdirectory.
  25. .TP
  26. .B
  27. 3.
  28. \fIturnutils_stunclient\fP: a simple STUN client example.
  29. The compiled binary image of this program is located in bin/ subdirectory.
  30. .TP
  31. .B
  32. 4.
  33. \fIturnutils_rfc5769check\fP: a utility that checks the correctness of the
  34. STUN/TURN protocol implementation. This utility is used only for the compilation
  35. check procedure, it is not copied to the installation destination.
  36. .RE
  37. .PP
  38. .RS
  39. In the "examples/scripts" subdirectory, you will find the examples of command lines to be used
  40. to run the programs. The scripts are meant to be run from examples/ subdirectory, for example:
  41. .PP
  42. $ cd examples
  43. .PP
  44. $ ./scripts/secure_relay.sh
  45. .PP
  46. =====================================
  47. .SS NAME
  48. \fB
  49. \fBturnutils_uclient \fP\- this client emulation application is supplied for the test purposes only.
  50. \fB
  51. .SS SYNOPSIS
  52. $ \fIturnutils_uclient\fP [\fB\-tTSvsyhcxg\fP] [options] <TURN\-Server\-IP\-address>
  53. .SS DESCRIPTION
  54. It was designed to simulate multiple clients. It uses asynch IO API in
  55. libevent to handle multiple clients. A client connects to the relay,
  56. negotiates the session, and sends multiple (configured number) messages to the server (relay),
  57. expecting the same number of replies. The length of the messages is configurable.
  58. The message is an arbitrary octet stream, but it can be configured as a string.
  59. The number of the messages to send is configurable.
  60. .TP
  61. .B
  62. Flags:
  63. .TP
  64. .B
  65. \fB\-t\fP
  66. Use TCP for communications between client and TURN server (default is UDP).
  67. .TP
  68. .B
  69. \fB\-b\fP
  70. Use SCTP for communications between client and TURN server (default is UDP).
  71. .TP
  72. .B
  73. \fB\-T\fP
  74. Use TCP for the relay transport (default \- UDP). Implies options \fB\-t\fP, \fB\-y\fP, \fB\-c\fP,
  75. and ignores flags and options \fB\-s\fP, \fB\-e\fP, \fB\-r\fP and \fB\-g\fP. Can be used together
  76. with \fB\-b\fP.
  77. .TP
  78. .B
  79. \fB\-P\fP
  80. Passive TCP (RFC6062 with active peer). Implies \fB\-T\fP.
  81. .TP
  82. .B
  83. \fB\-S\fP
  84. Secure SSL connection: SSL/TLS for TCP, DTLS for UDP, TLS/SCTP for SCTP.
  85. .TP
  86. .B
  87. \fB\-U\fP
  88. Secure unencrypted connection (suite eNULL): SSL/TLS for TCP, DTLS for UDP.
  89. .TP
  90. .B
  91. \fB\-v\fP
  92. Verbose.
  93. .TP
  94. .B
  95. \fB\-s\fP
  96. Use "Send" method in TURN; by default, it uses TURN Channels.
  97. .TP
  98. .B
  99. \fB\-y\fP
  100. Use client\-to\-client connections:
  101. RTP/RTCP pair of channels to another RTP/RTCP pair of channels.
  102. with this option the \fIturnutils_peer\fP application is not used,
  103. as the allocated relay endpoints are talking to each other.
  104. .TP
  105. .B
  106. \fB\-h\fP
  107. Hang on indefinitely after the last sent packet.
  108. .TP
  109. .B
  110. \fB\-c\fP
  111. Do not create rtcp connections.
  112. .TP
  113. .B
  114. \fB\-x\fP
  115. Request IPv6 relay address (RFC6156).
  116. .TP
  117. .B
  118. \fB\-X\fP
  119. IPv4 relay address explicitly requested.
  120. .TP
  121. .B
  122. \fB\-g\fP
  123. Set DONT_FRAGMENT parameter in TURN requests.
  124. .TP
  125. .B
  126. \fB\-D\fP
  127. Do mandatory channel padding even for UDP (like pjnath).
  128. .TP
  129. .B
  130. \fB\-N\fP
  131. do negative tests (some limited cases only).
  132. .TP
  133. .B
  134. \fB\-R\fP
  135. do negative protocol tests.
  136. .TP
  137. .B
  138. \fB\-O\fP
  139. DOS attack mode.
  140. .TP
  141. .B
  142. \fB\-H\fP
  143. SHA256 digest function for message integrity calculation.
  144. Without this option, by default, SHA1 is used.
  145. .TP
  146. .B
  147. \fB\-Y\fP
  148. SHA384 digest function for message integrity calculation.
  149. .TP
  150. .B
  151. \fB\-K\fP
  152. SHA512 digest function for message integrity calculation.
  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). Implies \fB\-c\fP option.
  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. /var/db/turndb
  371. .PP
  372. /usr/local/var/db/turndb
  373. .PP
  374. /var/lib/turn/turndb
  375. .PP
  376. /usr/local/etc/turnserver.conf
  377. .PP
  378. =================================
  379. .SH DIRECTORIES
  380. /usr/local/share/\fIturnserver\fP
  381. .PP
  382. /usr/local/share/doc/\fIturnserver\fP
  383. .PP
  384. /usr/local/share/examples/\fIturnserver\fP
  385. .PP
  386. ===================================
  387. .SH STANDARDS
  388. new STUN RFC 5389
  389. .PP
  390. TURN RFC 5766
  391. .PP
  392. TURN\-TCP extension RFC 6062
  393. .PP
  394. TURN IPv6 extension RFC 6156
  395. .PP
  396. STUN/TURN test vectors RFC 5769
  397. .PP
  398. STUN NAT behavior discovery RFC 5780
  399. .PP
  400. ====================================
  401. .SH SEE ALSO
  402. \fIturnserver\fP, \fIturnadmin\fP
  403. .RE
  404. .PP
  405. ======================================
  406. .SS WEB RESOURCES
  407. project page:
  408. .PP
  409. http://code.google.com/p/coturn/
  410. .PP
  411. Wiki page:
  412. .PP
  413. http://code.google.com/p/coturn/wiki/Readme
  414. .PP
  415. forum:
  416. .PP
  417. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server/
  418. .RE
  419. .PP
  420. ======================================
  421. .SS AUTHORS
  422. Oleg Moskalenko <[email protected]>
  423. .PP
  424. Gabor Kovesdan http://kovesdan.org/
  425. .PP
  426. Daniel Pocock http://danielpocock.com/
  427. .PP
  428. John Selbie ([email protected])
  429. .PP
  430. Lee Sylvester <[email protected]>
  431. .PP
  432. Erik Johnston <[email protected]>
  433. .PP
  434. Roman Lisagor <[email protected]>
  435. .PP
  436. Vladimir Tsanev <[email protected]>
  437. .PP
  438. Po\-sheng Lin <[email protected]>
  439. .PP
  440. Peter Dunkley <[email protected]>
  441. .PP
  442. Mutsutoshi Yoshimoto <[email protected]>
  443. .PP
  444. Federico Pinna <[email protected]>
  445. .PP
  446. Bradley T. Hughes <[email protected]>