turnserver.conf 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. # RFC5766-TURN-SERVER configuration file
  2. # RFC5766-TURN-SERVER配置文件
  3. #
  4. # Boolean values note: where boolean value is supposed to be used,
  5. # you can use '0', 'off', 'no', 'false', 'f' as 'false,
  6. # and you can use '1', 'on', 'yes', 'true', 't' as 'true'
  7. # If the value is missed, then it means 'true'.
  8. #
  9. # 布尔值注意: 布尔值应该被使用,
  10. # 您可以使用'0', 'off', 'no', 'false', 'f' 相当于 'false,
  11. # 还有你可以用'1', 'on', 'yes', 'true', 't' 相当于 'true'
  12. # 如果没有值,相当于'true'.
  13. #
  14. # Listener interface device (optional, Linux only).
  15. # NOT RECOMMENDED.
  16. #
  17. # 侦听器接口设备(仅可选,Linux)。
  18. # 不推荐。
  19. #
  20. #listening-device=eth0
  21. # TURN listener port for UDP and TCP (Default: 3478).
  22. # Note: actually, TLS & DTLS sessions can connect to the
  23. # "plain" TCP & UDP port(s), too - if allowed by configuration.
  24. #
  25. # TURN为UDP和TCP的侦听器端口(默认: 3478)。
  26. # 注:实际上,TLS和DTLS会话可以连接到"清晰的"TCP和UDP端口,——如果允许配置。
  27. #
  28. #listening-port=3478
  29. listening-port=3478
  30. # TURN listener port for TLS (Default: 5349).
  31. # Note: actually, "plain" TCP & UDP sessions can connect to the TLS & DTLS
  32. # port(s), too - if allowed by configuration. The TURN server
  33. # "automatically" recognizes the type of traffic. Actually, two listening
  34. # endpoints (the "plain" one and the "tls" one) are equivalent in terms of
  35. # functionality; but we keep both endpoints to satisfy the RFC 5766 specs.
  36. # For secure TCP connections, we currently support SSL version 3 and
  37. # TLS version 1.0, 1.1 and 1.2. SSL2 "encapculation mode" is also supported.
  38. # For secure UDP connections, we support DTLS version 1.
  39. #
  40. # TURN为TLS的侦听器端口(默认: 5349)。
  41. # 注意:事实上,"清晰的"TCP和UDP会话可以连接到TLS和DTLS端口,如果允许配置。
  42. # TURN服务器"自动"识别传输类型。实际上,两个监听终端点("清晰的"端和"TLS"端)是
  43. # 对等的功能;但我们保持两个端点来满足RFC 5766规范。
  44. # 对于安全的TCP连接,我们目前支持SSL的3个版本,是TLS 1.0版本,1.1版本和1.2版本。
  45. # SSL2还支持"encapculation模式"。对于安全的UDP连接,我们支持DTLS版本1。
  46. #
  47. #tls-listening-port=5349
  48. tls-listening-port=5349
  49. # Alternative listening port for UDP and TCP listeners;
  50. # default (or zero) value means "listening port plus one".
  51. # This is needed for RFC 5780 support
  52. # (STUN extension specs, NAT behavior discovery). The TURN Server
  53. # supports RFC 5780 only if it is started with more than one
  54. # listening IP address of the same family (IPv4 or IPv6).
  55. # RFC 5780 is supported only by UDP protocol, other protocols
  56. # are listening to that endpoint only for "symmetry".
  57. #
  58. # 选择UDP和TCP监听器监听端口;
  59. # 默认(或者0)是表示监听的端口加1.
  60. # 这是必须的,为了RFC 5780的支持(STUN的扩展规范, NAT后端的发现)。
  61. # TURN服务器支持RFC 5780只有启动与多个监听同一族的IP地址(IPv4或IPv6).
  62. # RFC 5780只有UDP协议,支持其他协议是监听"对称"型端口的。
  63. #
  64. #alt-listening-port=0
  65. # Alternative listening port for TLS and DTLS protocols.
  66. # Default (or zero) value means "TLS listening port plus one".
  67. #
  68. # 选择监听端口TLS和DTLS协议。
  69. # 默认(或者0)是表示TLS监听的端口加1.
  70. #
  71. #alt-tls-listening-port=0
  72. # Listener IP address of relay server. Multiple listeners can be specified.
  73. # If no IP(s) specified in the config file or in the command line options,
  74. # then all IPv4 and IPv6 system IPs will be used for listening.
  75. #
  76. # 侦听器中继服务器的IP地址。可以指定多个侦听器。
  77. # 如果没有在配置文件或者命令选项中指定监听的IP,
  78. # 那么所有的IPv4和IPv6所有的IP将被监听
  79. #
  80. #listening-ip=172.17.19.101
  81. #listening-ip=10.207.21.238
  82. #listening-ip=2607:f0d0:1002:51::4
  83. listening-ip=<IP>
  84. # Auxiliary STUN/TURN server listening endpoint.
  85. # Aux servers have almost full TURN and STUN functionality.
  86. # The (minor) limitations are:
  87. # 1) Auxiliary servers do not have alternative ports and
  88. # they do not support STUN RFC 5780 functionality (CHANGE REQUEST).
  89. # 2) Auxiliary servers also are never returning ALTERNATIVE-SERVER reply.
  90. # Valid formats are 1.2.3.4:5555 for IPv4 and [1:2::3:4]:5555 for IPv6.
  91. # There may be multiple aux-server options, each will be used for listening
  92. # to client requests.
  93. #
  94. # 辅助STUN/TURN服务器监听端口。
  95. # 辅助服务器几乎有齐TURN和STUN功能
  96. # (一些)局限性:
  97. # 1) 辅助服务器没有替代的端口并且他们不支持STUN RFC 5780功能(变更请求)。
  98. # 2) 辅助服务器也不会返回ALTERNATIVE-SERVER回复。
  99. # 有效格式,IPv4的1.2.3.4:5555 和IPv6的[1:2::3:4]:5555。
  100. # 可能会有多个aux-server选项,每个将用于监听客户端请求。
  101. #
  102. #aux-server=172.17.19.110:33478
  103. #aux-server=[2607:f0d0:1002:51::4]:33478
  104. # (recommended for older Linuxes only)
  105. # Automatically balance UDP traffic over auxiliary servers (if configured).
  106. # The load balancing is using the ALTERNATE-SERVER mechanism.
  107. # The TURN client must support 300 ALTERNATE-SERVER response for this
  108. # functionality.
  109. #
  110. # (仅推荐老的Linuxes)
  111. # 在辅助服务器自动均衡UDP流量(如果配置)。
  112. # 使用ALTERNATE-SERVER的负载均衡机制。
  113. # TURN客户端必须支持300个ALTERNATE-SERVER响应。
  114. #
  115. #udp-self-balance
  116. # Relay interface device for relay sockets (optional, Linux only).
  117. # NOT RECOMMENDED.
  118. #
  119. # 终极接口设备为中继套接字(可选, 仅Linux).
  120. # 不推荐。
  121. #
  122. #relay-device=eth1
  123. # Relay address (the local IP address that will be used to relay the
  124. # packets to the peer).
  125. # Multiple relay addresses may be used.
  126. # The same IP(s) can be used as both listening IP(s) and relay IP(s).
  127. # If no relay IP(s) specified, then the turnserver will apply the default
  128. # policy: it will decide itself which relay addresses to be used, and it
  129. # will always be using the client socket IP address as the relay IP address
  130. # of the TURN session (if the requested relay address family is the same
  131. # as the family of the client socket).
  132. #
  133. # 中继地址(本地IP地址将用于传递数据包的给每个端)
  134. # 可以使用多个中继地址。
  135. # 相同的IP可以用作监听IP和继电器IP。
  136. # 如果没有指定中继IP,那么turnserver将应用默认策略:它将自行决定使用那个中继
  137. # 地址,并且它总是会使用客户端套接字的IP地址作为中继的IP地址在TURN会话中(如果
  138. # 请求的中继地址族解决同族的客户端套接字)。
  139. #
  140. #relay-ip=172.17.19.105
  141. #relay-ip=2607:f0d0:1002:51::5
  142. relay-ip=<IP>
  143. # For Amazon EC2 users:#
  144. # TURN Server public/private address mapping, if the server is behind NAT.
  145. # In that situation, if a -X is used in form "-X <ip>" then that ip will be reported
  146. # as relay IP address of all allocations. This scenario works only in a simple case
  147. # when one single relay address is be used, and no RFC5780 functionality is required.
  148. # That single relay address must be mapped by NAT to the 'external' IP.
  149. # The "external-ip" value, if not empty, is returned in XOR-RELAYED-ADDRESS field.
  150. # For that 'external' IP, NAT must forward ports directly (relayed port 12345
  151. # must be always mapped to the same 'external' port 12345).
  152. # In more complex case when more than one IP address is involved,
  153. # that option must be used several times, each entry must
  154. # have form "-X <public-ip/private-ip>", to map all involved addresses.
  155. # RFC5780 NAT discovery STUN functionality will work correctly,
  156. # if the addresses are mapped properly, even when the TURN server itself
  157. # is behind A NAT.
  158. # By default, this value is empty, and no address mapping is used.
  159. #
  160. # Amazon EC2用户:
  161. # TURN服务器公开/私有的地址映射,假如服务器是在NAT后端。
  162. # 在这种情况下,如果一个表单中"-X <ip>"使用一个-X,然后该ip将被作为中继ip地址来使用。
  163. # 这种情况只适用于一个简单的例子,当一个中继的地址是被使用,和没有RFC5780功能是必需的。
  164. # 单个中继地址必须通过NAT映射到外部的IP。
  165. # 外部的IP值,假如不为空,通过XOR-RELAYED-ADDRESS字段返回。
  166. # 外部的IP,NAT必须直接转发端口(转发端口12345,必须总是映射到相同的外部端口12345)。
  167. # 在更复杂的情况下,当涉及到多个IP地址,这个选项必须使用几次,每个条目必须形
  168. # 成"-X <public-ip/private-ip>",将所有涉及到的地址。
  169. # RFC5780 NAT发现STUN功能正常工作,如果正确的地址映射,即使TURN服务器本身是
  170. # 在一个NAT后。
  171. # 默认,该值为空,并且没有使用地址映射。
  172. #
  173. #external-ip=60.70.80.91
  174. #
  175. #OR:
  176. #
  177. #external-ip=60.70.80.91/172.17.19.101
  178. #external-ip=60.70.80.92/172.17.19.102
  179. external-ip=<IP>
  180. # Number of relay threads to handle the established connections
  181. # (in addition to authentication thread and the listener thread).
  182. # If set to 0 then application runs relay process in a single thread,
  183. # in the same thread with the listener process (the authentication thread will
  184. # still be a separate thread).
  185. # In the older systems (Linux kernel before 3.9),
  186. # the number of UDP threads is always one thread per network listening endpoint -
  187. # including the auxiliary endpoints - unless 0 (zero) or 1 (one) value is set.
  188. #
  189. # 数量的中继线程处理建立连接(除了验证线程和侦听器线程)。
  190. # 如果设置为0,那么应用程序中继进程在一个线程中运行,在同一
  191. # 个线程中监听处理(身份验证线程仍然是一个单独的线程)。
  192. # 在旧系统(3.9 Linux内核之前),数量的UDP线程总是一个线程监听一个网络端点,包括辅助端点——除非设置0或1值。
  193. #
  194. #relay-threads=0
  195. relay-threads=10
  196. # Lower and upper bounds of the UDP relay endpoints:
  197. # (default values are 49152 and 65535)
  198. #
  199. # UDP中继端点的上下边界:
  200. # (默认是49152至65535)
  201. #
  202. #min-port=49152
  203. #max-port=65535
  204. # Uncomment to run TURN server in 'normal' 'moderate' verbose mode.
  205. # By default the verbose mode is off.
  206. #
  207. # 取消TURN服务器运行'normal' 'moderate'详细模式。
  208. # 默认情况下,详细模式是关闭的。
  209. #
  210. #verbose
  211. # Uncomment to run TURN server in 'extra' verbose mode.
  212. # This mode is very annoying and produces lots of output.
  213. # Not recommended under any normal circumstances.
  214. #
  215. # 取消TURN服务器运行'extra'详细模式。
  216. # 这种模式是非常恼人的,产生大量的输出。
  217. # 在任何正常情况下不建议。
  218. #
  219. #Verbose
  220. # Uncomment to use fingerprints in the TURN messages.
  221. # By default the fingerprints are off.
  222. #
  223. # 取消在TURN消息中使用指纹。
  224. # 默认情况下,指纹是关闭的。
  225. #
  226. #fingerprint
  227. # Uncomment to use long-term credential mechanism.
  228. # By default no credentials mechanism is used (any user allowed).
  229. # This option can be used with either flat file user database or
  230. # PostgreSQL DB or MySQL DB or Redis DB for user keys storage.
  231. #
  232. # 取消使用长期证书机制。
  233. # 默认情况下不使用凭证机制(允许任何用户)。
  234. # 这个选项可能使用用户数据文件或PostgreSQL或MySQL或Redis来存储用户密钥。
  235. #
  236. #lt-cred-mech
  237. lt-cred-mech
  238. # Uncomment to use short-term credential mechanism.
  239. # By default no credentials mechanism is used (any user allowed).
  240. # For short-term credential mechanism you have to use PostgreSQL or
  241. # MySQL or Redis database for user password storage.
  242. #
  243. # 取消使用短期证书机制。
  244. # 默认情况下不使用凭证机制(允许任何用户)。
  245. # 短期证书机制必须使用PostgreSQL或MySQL或Redis数据库来存储用户密码。
  246. #
  247. #st-cred-mech
  248. # This option is opposite to lt-cred-mech or st-cred-mech.
  249. # (TURN Server with no-auth option allows anonymous access).
  250. # If neither option is defined, and no users are defined,
  251. # then no-auth is default. If at least one user is defined,
  252. # in this file or in command line or in usersdb file, then
  253. # lt-cred-mech is default.
  254. #
  255. # 这个选项是lt-cred-mech或st-cred-mech相反。
  256. # (TURN服务器no-auth选项允许匿名访问)。
  257. # 如果没有选项定义,没有用户定义,那么no-auth默认。
  258. # 如果至少定义有一个用户,在这个文件中或在命令行或usersdb文件,
  259. # 那么lt-cred-mech默认。
  260. #
  261. #no-auth
  262. # TURN REST API flag.
  263. # Flag that sets a special authorization option that is based upon authentication secret.
  264. # This feature can be used with the long-term authentication mechanism, only.
  265. # This feature purpose is to support "TURN Server REST API", see
  266. # "TURN REST API" link in the project's page
  267. # http://code.google.com/p/rfc5766-turn-server/.
  268. # This option is used with timestamp:
  269. # usercombo -> "timestamp:userid"
  270. # turn user -> usercombo
  271. # turn password -> base64(hmac(secret key, usercombo))
  272. # This allows TURN credentials to be accounted for a specific user id.
  273. # If you don't have a suitable id, the timestamp alone can be used.
  274. # This option is just turning on secret-based authentication.
  275. # The actual value of the secret is defined either by option static-auth-secret,
  276. # or can be found in the turn_secret table in the database (see below).
  277. #
  278. # TURN REST API标志。
  279. # 标志是设置一个特殊的授权选项,是基于身份验证的私密。
  280. # 这个功能可以用于长期验证机制。
  281. # 这个功能的目的是支持"TURN Server REST API",看到"TURN Server REST API"项目的页面的链接
  282. # http://code.google.com/p/rfc5766-turn-server/。
  283. # 这个选项是使用时间戳:
  284. # usercombo -> "timestamp:userid"
  285. # turn user -> usercombo
  286. # turn password -> base64(hmac(secret key, usercombo))
  287. # 这允许TURN凭证占用一个特定的用户id。
  288. # 如果你没有一个合适的id,可以使用单独的时间戳。
  289. # 这个选项只是打开基于私密的身份验证。
  290. # 实际值定义的私密就是通过选择static-auth-secret,或可以在数据库中找到turn_secret表(见下文)。
  291. #
  292. #use-auth-secret
  293. # 'Static' authentication secret value (a string) for TURN REST API only.
  294. # If not set, then the turn server
  295. # will try to use the 'dynamic' value in turn_secret table
  296. # in user database (if present). The database-stored value can be changed on-the-fly
  297. # by a separate program, so this is why that other mode is 'dynamic'.
  298. #
  299. # TURN REST API的'Static'身份验证的私密值(字符串)
  300. # 如果没有设置,那么turn服务器将尝试使用'dynamic'值在用户数据库的turn_secret表(如果存在)。
  301. # 数据库存储的值可以随时改变,通过单独的程序,所以这就是'dynamic'模式。
  302. #
  303. #static-auth-secret
  304. # 'Static' user accounts for long term credentials mechanism, only.
  305. # This option cannot be used with TURN REST API or with short-term credentials
  306. # mechanism.
  307. # 'Static' user accounts are NOT dynamically checked by the turnserver process,
  308. # so that they can NOT be changed while the turnserver is running.
  309. #
  310. # 'Static'用户长期占凭证机制。
  311. # 这个选项不能用于TURN REST API或短期凭证机制。
  312. # 'Static'用户帐户不是turnserver程序动态检查,所以他们不能改变在turnserver运行时。
  313. #
  314. #user=username1:key1
  315. #user=username2:key2
  316. # OR:
  317. #user=username1:password1
  318. #user=username2:password2
  319. #
  320. # Keys must be generated by turnadmin utility. The key value depends
  321. # on user name, realm, and password:
  322. #
  323. # 钥匙必须由turnadmin实用程序生成。键值取决于用户名称、领域和密码:
  324. #
  325. # Example:
  326. # 例子,使用以下命令:
  327. #
  328. # $ turnadmin -k -u ninefingers -r north.gov -p youhavetoberealistic
  329. #
  330. # Output: 0xbc807ee29df3c9ffa736523fb2c4e8ee
  331. # 输出是: 0xbc807ee29df3c9ffa736523fb2c4e8ee
  332. #
  333. # ('0x' in the beginning of the key is what differentiates the key from
  334. # password. If it has 0x then it is a key, otherwise it is a password).
  335. # ('0x'开始的关键是区分从密码的关键。如果它有0x,那么它是一个关键,否则这是一个密码)。
  336. #
  337. # The corresponding user account entry in the config file will be:
  338. # 相应的配置文件中的用户帐户条目将:
  339. #
  340. #user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee
  341. # Or, equivalently, with open clear password (less secure):
  342. #或者是这样,明文密码(不安全的):
  343. #user=ninefingers:youhavetoberealistic
  344. #
  345. user=<yourname:yourpsw>
  346. # 'Dynamic' user accounts database file name.
  347. # Only users for long-term mechanism can be stored in a flat file,
  348. # short-term mechanism will not work with option, the short-term
  349. # mechanism required PostgreSQL or MySQL or Redis database.
  350. # 'Dynamic' long-term user accounts are dynamically checked by the turnserver process,
  351. # so that they can be changed while the turnserver is running.
  352. # Default file name is turnuserdb.conf.
  353. #
  354. # 'Dynamic'用户帐户数据库文件名。
  355. # 只有用户长期机制可以存储在一个文件,短期机制不会处理选项,短期机制需要PostgreSQL或MySQL或
  356. # Redis数据库。
  357. # 'Dynamic'的长期用户帐户在turnserver程序中动态检查的,这样他们可以改变的在turnserver运行时。
  358. # 默认文件名是turnuserdb.conf.
  359. #
  360. #userdb=/usr/local/etc/turnuserdb.conf
  361. userdb=/etc/turnuserdb.conf
  362. # PostgreSQL database connection string in the case that we are using PostgreSQL
  363. # as the user database.
  364. # This database can be used for long-term and short-term credential mechanisms
  365. # and it can store the secret value for secret-based timed authentication in TURN RESP API.
  366. # See http://www.postgresql.org/docs/8.4/static/libpq-connect.html for 8.x PostgreSQL
  367. # versions connection string format, see
  368. # http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING
  369. # for 9.x and newer connection string formats.
  370. #
  371. # PostgreSQL数据库连接字符串,使用PostgreSQL作为用户数据库。
  372. # 该数据库可用于长期和短期证书机制,它可以存储的私密值,为基于私密身份验证的在TURN RESP API中。
  373. # 8.x PostgreSQL版本请参见http://www.postgresql.org/docs/8.4/static/libpq-connect.html的连接字符串
  374. # 格式,9.x和更新的请参阅http://www.postgresql.org/docs/9.2/static/libpq-connect.html LIBPQ-CONNSTRING
  375. # 的连接字符串格式。
  376. #
  377. #psql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> connect_timeout=30"
  378. # MySQL database connection string in the case that we are using MySQL
  379. # as the user database.
  380. # This database can be used for long-term and short-term credential mechanisms
  381. # and it can store the secret value for secret-based timed authentication in TURN RESP API.
  382. # Use string format as below (space separated parameters, all optional):
  383. #
  384. # MySQL数据库连接字符串,使用MySQL作为用户数据库。
  385. # 该数据库可用于长期和短期证书机制,它可以存储的私密值,为基于私密身份验证的在TURN RESP API中。
  386. # 使用字符串格式如下(空间分离参数,所有可选):
  387. #
  388. #mysql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> port=<port> connect_timeout=<seconds>"
  389. # Redis database connection string in the case that we are using Redis
  390. # as the user database.
  391. # This database can be used for long-term and short-term credential mechanisms
  392. # and it can store the secret value for secret-based timed authentication in TURN RESP API.
  393. # Use string format as below (space separated parameters, all optional):
  394. #
  395. # Redis数据库连接字符串,使用Redis作为用户数据库。
  396. # 该数据库可用于长期和短期证书机制,它可以存储的私密值,为基于私密身份验证的在TURN RESP API中。
  397. # 使用字符串格式如下(空间分离参数,所有可选):
  398. #
  399. #redis-userdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
  400. # Redis status and statistics database connection string, if used (default - empty, no Redis stats DB used).
  401. # This database keeps allocations status information, and it can be also used for publishing
  402. # and delivering traffic and allocation event notifications.
  403. # The connection string has the same parameters as redis-userdb connection string.
  404. # Use string format as below (space separated parameters, all optional):
  405. #
  406. # Redis状态和统计数据库连接字符串,如果使用(默认空,没有Redis统计数据库使用)。
  407. # 这个数据库保持分配状态信息,它也可以用于发布和交付传输和分配事件通知。
  408. # 连接字符串有相同的参数作为redis-userdb连接字符串。
  409. # 使用字符串格式如下(空间分离参数,所有可选):
  410. #
  411. #redis-statsdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
  412. # Realm for long-term credentials mechanism and for TURN REST API.
  413. #
  414. # TURN REST API的长期凭证机制范围。
  415. #
  416. #realm=mycompany.org
  417. # Per-user allocation quota.
  418. # default value is 0 (no quota, unlimited number of sessions per user).
  419. #
  420. # 每个用户分配配额。
  421. # 默认值为0(没有配额,每个用户无限数量的会话)。
  422. #
  423. #user-quota=0
  424. # Total allocation quota.
  425. # default value is 0 (no quota).
  426. #
  427. # 总分配配额。
  428. # 默认值为0(无配额)。
  429. #
  430. #total-quota=0
  431. # Max bytes-per-second bandwidth a TURN session is allowed to handle
  432. # (input and output network streams are treated separately). Anything above
  433. # that limit will be dropped or temporary suppressed (within
  434. # the available buffer limits).
  435. #
  436. # TURN会话允许最大的传输占用带宽(输入和输出网络流分别处理)。
  437. # 高于限制将被删除或暂时抑制(在可用的缓冲区范围内)。
  438. #
  439. #max-bps=0
  440. max-bps=1024
  441. # Uncomment if no UDP client listener is desired.
  442. # By default UDP client listener is always started.
  443. #
  444. # 如果没有UDP客户端监听器需要取消。
  445. # 默认情况下UDP客户端监听器总是启动。
  446. #
  447. #no-udp
  448. # Uncomment if no TCP client listener is desired.
  449. # By default TCP client listener is always started.
  450. #
  451. # 如果没有TCPP客户端监听器需要取消。
  452. # 默认情况下TCPP客户端监听器总是启动。
  453. #
  454. #no-tcp
  455. # Uncomment if no TLS client listener is desired.
  456. # By default TLS client listener is always started.
  457. #
  458. # 如果没有TLS客户端监听器需要取消。
  459. # 默认情况下TLS客户端监听器总是启动。
  460. #
  461. #no-tls
  462. # Uncomment if no DTLS client listener is desired.
  463. # By default DTLS client listener is always started.
  464. #
  465. # 如果没有DTLS客户端监听器需要取消。
  466. # 默认情况下DTLS客户端监听器总是启动。
  467. #
  468. #no-dtls
  469. # Uncomment if no UDP relay endpoints are allowed.
  470. # By default UDP relay endpoints are enabled (like in RFC 5766).
  471. #
  472. # 如果不允许UDP中继端点需要取消。
  473. # 默认情况下启用UDP继电器端点(如在RFC 5766)。
  474. #
  475. #no-udp-relay
  476. # Uncomment if no TCP relay endpoints are allowed.
  477. # By default TCP relay endpoints are enabled (like in RFC 6062).
  478. #
  479. # 如果不允许TCP中继端点需要取消。
  480. # 默认情况下启用TCP继电器端点(如在RFC 5766)。
  481. #
  482. #no-tcp-relay
  483. # Uncomment if extra security is desired,
  484. # with nonce value having limited lifetime (600 secs).
  485. # By default, the nonce value is unique for a session,
  486. # but it has unlimited lifetime. With this option,
  487. # the nonce lifetime is limited to 600 seconds, after that
  488. # the client will get 438 error and will have to re-authenticate itself.
  489. #
  490. # 取消如果需要额外的安全,现时已有有限的生命周期(600秒)。
  491. # 默认情况下,一个会话的唯一临界值,但它一般拥有无限的生命周期。这个选项,临界值
  492. # 仅限于600秒,之后,客户端将得到438错误,将不得不重新认证。
  493. #
  494. #stale-nonce
  495. # Certificate file.
  496. # Use an absolute path or path relative to the
  497. # configuration file.
  498. #
  499. # 证书文件。
  500. # 使用绝对路径或路径相对于配置文件。
  501. #
  502. #cert=/usr/local/etc/turn_server_cert.pem
  503. # Private key file.
  504. # Use an absolute path or path relative to the
  505. # configuration file.
  506. # Use PEM file format.
  507. #
  508. # 私钥文件。
  509. # 使用绝对路径或路径相对于配置文件。使用PEM文件格式。
  510. #
  511. #pkey=/usr/local/etc/turn_server_pkey.pem
  512. # Private key file password, if it is in encoded format.
  513. # This option has no default value.
  514. #
  515. # 私有密钥文件密码,如果是在编码格式。
  516. # 这个选项没有默认值。
  517. #
  518. #pkey-pwd=...
  519. # Allowed OpenSSL cipher list for TLS/DTLS connections.
  520. # Default value is "DEFAULT".
  521. #
  522. # 允许OpenSSL的密码列表为TLS/DTLS连接。
  523. # 默认值是"DEFAULT"
  524. #
  525. #cipher-list="DEFAULT"
  526. # CA file in OpenSSL format.
  527. # Forces TURN server to verify the client SSL certificates.
  528. # By default it is not set: there is no default value and the client
  529. # certificate is not checked.
  530. #
  531. # 在OpenSSL格式的CA文件。
  532. # 强制TURN服务器验证客户端SSL证书。
  533. # 默认情况下它没有设置:没有默认值,不检查的客户端证书。
  534. #
  535. # Example:
  536. #CA-file=/etc/ssh/id_rsa.cert
  537. # Curve name for EC ciphers, if supported by OpenSSL library (TLS and DTLS).
  538. # The default value is prime256v1.
  539. #
  540. # 曲线名称的EC密码,如果由OpenSSL库支持(TLS和DTLS)。
  541. # 默认值是prime256v1。
  542. #
  543. #ec-curve-name=prime256v1
  544. # Use 566 bits predefined DH TLS key. Default size of the key is 1066.
  545. #
  546. # 使用566位预定义DH TLS键。默认键大小是1066
  547. #
  548. #dh566
  549. # Use 2066 bits predefined DH TLS key. Default size of the key is 1066.
  550. #
  551. # 使用2066位预定义DH TLS键。默认键大小是1066
  552. #
  553. #dh2066
  554. # Use custom DH TLS key, stored in PEM format in the file.
  555. # Flags --dh566 and --dh2066 are ignored when the DH key is taken from a file.
  556. #
  557. # 使用惯例的DH TLS键,使用PEM格式存储在文件里
  558. # 当DH键从文件里加载,将忽略标志--dh566和--dh2066
  559. #
  560. #dh-file=<DH-PEM-file-name>
  561. # Flag to prevent stdout log messages.
  562. # By default, all log messages are going to both stdout and to
  563. # the configured log file. With this option everything will be
  564. # going to the configured log only (unless the log file itself is stdout).
  565. #
  566. # 标志防止输出日志信息
  567. # 默认情况下,所有日志消息将输出到配置的日志文件。采用这一选项都将只配置日志
  568. # (除非日志文件本身是输出的)。
  569. #
  570. #no-stdout-log
  571. # Option to set the log file name.
  572. # By default, the turnserver tries to open a log file in
  573. # /var/log, /var/tmp, /tmp and current directories directories
  574. # (which open operation succeeds first that file will be used).
  575. # With this option you can set the definite log file name.
  576. # The special names are "stdout" and "-" - they will force everything
  577. # to the stdout. Also, the "syslog" name will force everything to
  578. # the system log (syslog).
  579. # In the runtime, the logfile can be reset with the SIGHUP signal
  580. # to the turnserver process.
  581. #
  582. # 设置日志文件
  583. # 默认情况下,turnserver尝试一个日志文件在/var/log,/var/tmp,/tmp和
  584. # 当前目录(那个文件先打开成功,文件将被使用)。
  585. # 采用这一选项可以设置明确的日志文件名。
  586. # 特殊的名字是"stdout"和"-"——他们将强制所有的输出。同时,"syslog"名称将强制所有的系统日志(syslog)。
  587. # 在运行时,日志文件可以重置通过SIGHUP信号在turnserver程序中。
  588. #
  589. #log-file=/var/tmp/turn.log
  590. # Option to redirect all log output into system log (syslog).
  591. #
  592. # 选择重定向所有日志输出到系统日志(syslog)。
  593. #
  594. #syslog
  595. # This flag means that no log file rollover will be used, and the log file
  596. # name will be constructed as-is, without PID and date appendage.
  597. #
  598. # 这个标志意味着没有日志文件将使用翻转,并按原样将创建日志文件名称,没有PID和日期的附加。
  599. #
  600. #simple-log
  601. # Option to set the "redirection" mode. The value of this option
  602. # will be the address of the alternate server for UDP & TCP service in form of
  603. # <ip>[:<port>]. The server will send this value in the attribute
  604. # ALTERNATE-SERVER, with error 300, on ALLOCATE request, to the client.
  605. # Client will receive only values with the same address family
  606. # as the client network endpoint address family.
  607. # See RFC 5389 and RFC 5766 for ALTERNATE-SERVER functionality description.
  608. # The client must use the obtained value for subsequent TURN communications.
  609. # If more than one --alternate-server options are provided, then the functionality
  610. # can be more accurately described as "load-balancing" than a mere "redirection".
  611. # If the port number is omitted, then the default port
  612. # number 3478 for the UDP/TCP protocols will be used.
  613. # Colon ( characters in IPv6 addresses may conflict with the syntax of
  614. # the option. To alleviate this conflict, literal IPv6 addresses are enclosed
  615. # in square brackets in such resource identifiers, for example:
  616. # [2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478 .
  617. # Multiple alternate servers can be set. They will be used in the
  618. # round-robin manner. All servers in the pool are considered of equal weight and
  619. # the load will be distributed equally. For example, if we have 4 alternate servers,
  620. # then each server will receive 25% of ALLOCATE requests. A alternate TURN server
  621. # address can be used more than one time with the alternate-server option, so this
  622. # can emulate "weighting" of the servers.
  623. #
  624. # 选项设置"redirection"模式。这个选项的值将备用服务器的地址UDP和TCP服务形式的<ip>[:<port>]。
  625. # 服务器将发送这个值属性ALTERNATE-SERVER,错误300,在ALLOCATE请求,客户端。
  626. # 客户端将只接收和自己相同的地址族的客户端的值。查看RFC 5389和RFC 5766为ALTERNATE-SERVER的功能描述。
  627. # 客户端必须使用获得的值为随后的TURN通信。如果不止一个——alternate-server选项提供,那么功能可以更准确
  628. # 地描述为"load-balancing",而不仅仅是一个"redirection"。如果端口号省略,那么为UDP/TCP协议,使用默认端
  629. # 口号是3478。冒号(在IPv6地址字符可能与选项的语法冲突。缓解这种冲突,文字IPv6地址包含在方括号在这种
  630. # 资源标识符,例如[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478 。
  631. # 可以设置多个备用服务器。他们将用于循环的方式。所有服务器池中被认为是平等的重量和载荷将平均分配的原则。
  632. # 例如,如果我们有4个备用服务器,每个服务器将获得25%的分配请求。备用TURN服务器地址可以使用超过一次
  633. # alternate-server选项,所以这可以效仿的"weighting"服务器。
  634. #
  635. # Examples:
  636. #alternate-server=1.2.3.4:5678
  637. #alternate-server=11.22.33.44:56789
  638. #alternate-server=5.6.7.8
  639. #alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
  640. # Option to set alternative server for TLS & DTLS services in form of
  641. # <ip>:<port>. If the port number is omitted, then the default port
  642. # number 5349 for the TLS/DTLS protocols will be used. See the previous
  643. # option for the functionality description.
  644. #
  645. # 选项设置替代服务器TLS和DTLS服务形式的<ip>:<port>。
  646. # 如果省略的端口号,那么默认端口号5349将使用TLS/DTLS协议。看到前面选择的功能描述。
  647. #
  648. # Examples:
  649. #tls-alternate-server=1.2.3.4:5678
  650. #tls-alternate-server=11.22.33.44:56789
  651. #tls-alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
  652. # Option to suppress TURN functionality, only STUN requests will be processed.
  653. # Run as STUN server only, all TURN requests will be ignored.
  654. # By default, this option is NOT set.
  655. #
  656. # 选择抑制TURN功能,只有STUN的请求将被处理。
  657. # 作为STUN服务器,所有TURN请求将被忽略。
  658. # 默认情况下,没有设置这个选项。
  659. #
  660. #stun-only
  661. # Option to suppress STUN functionality, only TURN requests will be processed.
  662. # Run as TURN server only, all STUN requests will be ignored.
  663. # By default, this option is NOT set.
  664. #
  665. # 选择抑制STUN功能,只有TURN的请求将被处理。
  666. # 作为TURN服务器,所有STUN请求将被忽略。
  667. # 默认情况下,没有设置这个选项。
  668. #
  669. #no-stun
  670. # This is the timestamp/username separator symbol (character) in TURN REST API.
  671. # The default value is ':'.
  672. #
  673. # 这是时间戳/用户名分离器符号(字符)在TURN REST API。
  674. # 默认是使用':'
  675. #
  676. # rest-api-separator=:
  677. # Flag that can be used to disallow peers on the loopback addresses (127.x.x.x and ::1).
  678. # This is an extra security measure.
  679. #
  680. # 标记用于不接受的端在环回地址(127.x.x.x 和 ::1)。
  681. # 这是一个额外的安全措施。
  682. #
  683. #no-loopback-peers
  684. # Flag that can be used to disallow peers on well-known broadcast addresses (224.0.0.0 and above, and FFXX:*).
  685. # This is an extra security measure.
  686. #
  687. # 标记用于不接受的端在广播地址(224.0.0.0和以上的,和FFXX:*)。
  688. # 这是一个额外的安全措施。
  689. #
  690. #no-multicast-peers
  691. # Option to set the max time, in seconds, allowed for full allocation establishment.
  692. # Default is 60 seconds.
  693. #
  694. # 选项设置的最大时间,以秒为单位,允许完整的分配。
  695. # 默认60秒
  696. #
  697. #max-allocate-timeout=60
  698. # Option to allow or ban specific ip addresses or ranges of ip addresses.
  699. # If an ip address is specified as both allowed and denied, then the ip address is
  700. # considered to be allowed. This is useful when you wish to ban a range of ip
  701. # addresses, except for a few specific ips within that range.
  702. # This can be used when you do not want users of the turn server to be able to access
  703. # machines reachable by the turn server, but would otherwise be unreachable from the
  704. # internet (e.g. when the turn server is sitting behind a NAT)
  705. #
  706. # 选择允许或禁止特定的ip地址或ip地址范围。
  707. # 如果指定一个ip地址允许和拒绝,那么ip地址被认为是允许的。这是有用的,当你希望禁止一个范
  708. # 围的ip地址,除了一些特定的ip范围内。
  709. # 这可以使用当你不希望turn服务器的用户能够访问机器通过turn服务器,但可能是另一方面从互联
  710. # 网上不能到达(例如,当turn服务器是在一个NAT后)
  711. #
  712. # Examples:
  713. # denied-peer-ip=83.166.64.0-83.166.95.255
  714. # allowed-peer-ip=83.166.68.45
  715. # File name to store the pid of the process.
  716. # Default is /var/run/turnserver.pid (if superuser account is used) or
  717. # /var/tmp/turnserver.pid .
  718. #
  719. # 存储进程pid的文件名。
  720. # 默认是/var/run/turnserver.pid(超级用户使用)或者是/var/tmp/turnserver.pid
  721. #
  722. #pidfile="/var/run/turnserver.pid"
  723. pidfile="/var/tmp/turnserver.pid"
  724. # Require authentication of the STUN Binding request.
  725. # By default, the clients are allowed anonymous access to the STUN Binding functionality.
  726. #
  727. # 需要STUN绑定请求的身份验证。
  728. # 默认情况下,客户允许匿名访问STUN绑定功能。
  729. #
  730. #secure-stun
  731. # Require SHA256 digest function to be used for the message integrity.
  732. # By default, the server uses SHA1 (as per TURN standard specs).
  733. # With this option, the server
  734. # always requires the stronger SHA256 function. The client application
  735. # must support SHA256 hash function if this option is used. If the server obtains
  736. # a message from the client with a weaker (SHA1) hash function then the
  737. # server returns error code 426.
  738. #
  739. # 需要SHA256采摘功能用于消息的完整性。
  740. # 默认情况下,服务器使用SHA1(按标准规格)。
  741. # 采用这一选项,服务器总是需要更强的SHA256功能。客户端应用程序必须支持SHA256散列函数
  742. # 如果使用这个选项。如果服务器获得消息从客户端较弱(SHA1)散列函数那么服务器返回错误代码426。
  743. #
  744. #sha256
  745. # Mobility with ICE (MICE) specs support.
  746. #
  747. # 移动的ICE(MICE)的规范支持。
  748. #
  749. #mobility
  750. # User name to run the process. After the initialization, the turnserver process
  751. # will make an attempt to change the current user ID to that user.
  752. #
  753. # 用户名运行程序。初始化后,turnserver程序将试图改变当前用户的用户ID。
  754. #
  755. #proc-user=<user-name>
  756. # Group name to run the process. After the initialization, the turnserver process
  757. # will make an attempt to change the current group ID to that group.
  758. #
  759. # 组名运行程序。初始化后,turnserver程序将试图改变当前组的组ID。
  760. #
  761. #proc-group=<group-name>
  762. # Turn OFF the CLI support.
  763. # By default it is always ON.
  764. # See also options cli-ip and cli-port.
  765. #
  766. # 关掉CLI的支持。
  767. # 默认情况下它总是ON。
  768. # 参阅选项cli-ip和cli-port。
  769. #
  770. #no-cli
  771. #Local system IP address to be used for CLI server endpoint. Default value
  772. # is 127.0.0.1.
  773. #
  774. # 本地系统的IP地址将用于CLI服务器端点。默认值是127.0.0.1。
  775. #
  776. #cli-ip=127.0.0.1
  777. # CLI server port. Default is 5766.
  778. #
  779. # CLI服务器端口。默认是5766。
  780. #
  781. #cli-port=5766
  782. # CLI access password. Default is empty (no password).
  783. #
  784. # CLI访问密码。默认是空的(没有密码)。
  785. #
  786. #cli-password=logen
  787. # Server relay. NON-STANDARD AND DANGEROUS OPTION.
  788. # Only for those applications when we want to run
  789. # server applications on the relay endpoints.
  790. # This option eliminates the IP permissions check on
  791. # the packets incoming to the relay endpoints.
  792. #
  793. # 中继服务器。NON-STANDARD和DANGEROUS的选择。
  794. # 只对这些应用程序时,我们想在中继服务器上运行服务器应用程序端点。
  795. # 这个选项可以消除IP权限检查传递的数据包传入的端点。
  796. #
  797. #server-relay
  798. # Maximum number of output sessions in ps CLI command.
  799. # This value can be changed on-the-fly in CLI. The default value is 256.
  800. #
  801. # 最大数量的输出会议在ps CLI命令。
  802. # 这个值可以动态改变在CLI。默认值是256。
  803. #
  804. #cli-max-output-sessions
  805. # Set network engine type for the process (for internal purposes).
  806. #
  807. # 设置网络引擎类型(用于内部目的)的过程。
  808. #
  809. #ne=[1|2|3]
  810. # Do not allow an SSL/TLS version of protocol
  811. #
  812. # 不允许一个SSL/TLS版本的协议
  813. #
  814. #no-sslv2
  815. #no-sslv3
  816. #no-tlsv1
  817. #no-tlsv1_1
  818. #no-tlsv1_2