turnutils.1 9.5 KB

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