2
0

jitsi-meet.cfg.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. {{ $C2S_REQUIRE_ENCRYPTION := .Env.PROSODY_C2S_REQUIRE_ENCRYPTION | default "1" | toBool -}}
  2. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}}
  3. {{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}}
  4. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}}
  5. {{ $PROSODY_AUTH_TYPE := .Env.PROSODY_AUTH_TYPE | default $AUTH_TYPE -}}
  6. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}}
  7. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}}
  8. {{ $ENABLE_RECORDING_METADATA := .Env.PROSODY_ENABLE_RECORDING_METADATA | default "1" | toBool -}}
  9. {{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}}
  10. {{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}}
  11. {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}}
  12. {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}}
  13. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" -}}
  14. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool -}}
  15. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" -}}
  16. {{ $JWT_ENABLE_DOMAIN_VERIFICATION := .Env.JWT_ENABLE_DOMAIN_VERIFICATION | default "false" | toBool -}}
  17. {{ $MATRIX_UVS_ISSUER := .Env.MATRIX_UVS_ISSUER | default "issuer" -}}
  18. {{ $MATRIX_UVS_SYNC_POWER_LEVELS := .Env.MATRIX_UVS_SYNC_POWER_LEVELS | default "0" | toBool -}}
  19. {{ $MATRIX_LOBBY_BYPASS := .Env.MATRIX_LOBBY_BYPASS | default "0" | toBool -}}
  20. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" -}}
  21. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool -}}
  22. {{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool -}}
  23. {{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
  24. {{ $ENABLE_END_CONFERENCE := .Env.ENABLE_END_CONFERENCE | default "true" | toBool -}}
  25. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}}
  26. {{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool -}}
  27. {{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}}
  28. {{ $GUEST_AUTH_TYPE := .Env.PROSODY_GUEST_AUTH_TYPE | default "jitsi-anonymous" -}}
  29. {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
  30. {{ $PUBLIC_URL_DOMAIN := $PUBLIC_URL | trimPrefix "https://" | trimSuffix "/" -}}
  31. {{ $STUN_HOST := .Env.STUN_HOST | default "" -}}
  32. {{ $STUN_PORT := .Env.STUN_PORT | default "443" -}}
  33. {{ $TURN_HOST := .Env.TURN_HOST | default "" -}}
  34. {{ $TURN_HOSTS := splitList "," $TURN_HOST -}}
  35. {{ $TURN_PORT := .Env.TURN_PORT | default "443" -}}
  36. {{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}}
  37. {{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT -}}
  38. {{ $TURN_TTL := .Env.TURN_TTL | default "86400" -}}
  39. {{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}}
  40. {{ $TURNS_HOSTS := splitList "," $TURNS_HOST -}}
  41. {{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}}
  42. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  43. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
  44. {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}}
  45. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  46. {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
  47. {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}}
  48. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
  49. {{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}}
  50. {{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}}
  51. {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
  52. {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
  53. {{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool -}}
  54. {{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" -}}
  55. {{ $RATE_LIMIT_LOGIN_RATE := .Env.PROSODY_RATE_LIMIT_LOGIN_RATE | default "3" -}}
  56. {{ $RATE_LIMIT_SESSION_RATE := .Env.PROSODY_RATE_LIMIT_SESSION_RATE | default "200" -}}
  57. {{ $RATE_LIMIT_TIMEOUT := .Env.PROSODY_RATE_LIMIT_TIMEOUT | default "60" -}}
  58. {{ $RATE_LIMIT_ALLOW_RANGES := .Env.PROSODY_RATE_LIMIT_ALLOW_RANGES | default "10.0.0.0/8" -}}
  59. {{ $RATE_LIMIT_CACHE_SIZE := .Env.PROSODY_RATE_LIMIT_CACHE_SIZE | default "10000" -}}
  60. {{ $ENV := .Env -}}
  61. admins = {
  62. {{ if .Env.JIGASI_XMPP_PASSWORD }}
  63. "{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  64. {{ end }}
  65. {{ if .Env.JIBRI_XMPP_PASSWORD }}
  66. "{{ $JIBRI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  67. {{ end }}
  68. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  69. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  70. }
  71. unlimited_jids = {
  72. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  73. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  74. }
  75. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom", "/prosody-plugins-contrib" }
  76. muc_mapper_domain_base = "{{ $XMPP_DOMAIN }}";
  77. muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}";
  78. http_default_host = "{{ $XMPP_DOMAIN }}"
  79. {{ if .Env.TURN_CREDENTIALS -}}
  80. external_service_secret = "{{.Env.TURN_CREDENTIALS}}";
  81. {{- end }}
  82. {{ if or .Env.STUN_HOST .Env.TURN_HOST .Env.TURNS_HOST -}}
  83. external_services = {
  84. {{- if $STUN_HOST }}
  85. { type = "stun", host = "{{ $STUN_HOST }}", port = {{ $STUN_PORT }}, transport = "udp" }
  86. {{- end }}
  87. {{- if $TURN_HOST -}}
  88. {{- range $idx1, $host := $TURN_HOSTS -}}
  89. {{- range $idx2, $transport := $TURN_TRANSPORTS -}}
  90. {{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }}
  91. { type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
  92. {{- end -}}
  93. {{- end -}}
  94. {{- end -}}
  95. {{- if $TURNS_HOST -}}
  96. {{- range $idx, $host := $TURNS_HOSTS -}}
  97. {{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }}
  98. { type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
  99. {{- end }}
  100. {{- end }}
  101. };
  102. {{- end }}
  103. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_ISSUERS }}
  104. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  105. {{ end }}
  106. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_AUDIENCES }}
  107. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  108. {{ end }}
  109. consider_bosh_secure = true;
  110. consider_websocket_secure = true;
  111. {{ if $ENABLE_XMPP_WEBSOCKET }}
  112. smacks_max_unacked_stanzas = 5;
  113. smacks_hibernation_time = 60;
  114. smacks_max_old_sessions = 1;
  115. {{ end }}
  116. {{ if $ENABLE_JAAS_COMPONENTS }}
  117. VirtualHost "jigasi.meet.jitsi"
  118. modules_enabled = {
  119. "bosh";
  120. "muc_password_check";
  121. }
  122. authentication = "token"
  123. app_id = "jitsi";
  124. asap_key_server = "https://jaas-public-keys.jitsi.net/jitsi-components/prod-8x8"
  125. asap_accepted_issuers = { "jaas-components" }
  126. asap_accepted_audiences = { "jigasi.{{ $PUBLIC_URL_DOMAIN }}" }
  127. {{ end }}
  128. VirtualHost "{{ $XMPP_DOMAIN }}"
  129. {{ if $ENABLE_AUTH }}
  130. {{ if eq $PROSODY_AUTH_TYPE "jwt" }}
  131. {{ if .Env.JWT_SIGN_TYPE }}
  132. signature_algorithm = "{{ .Env.JWT_SIGN_TYPE }}"
  133. {{ end -}}
  134. authentication = "{{ $JWT_AUTH_TYPE }}"
  135. app_id = "{{ .Env.JWT_APP_ID }}"
  136. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  137. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  138. {{ if $JWT_ASAP_KEYSERVER }}
  139. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  140. {{ end }}
  141. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  142. {{ else if eq $PROSODY_AUTH_TYPE "ldap" }}
  143. authentication = "cyrus"
  144. cyrus_application_name = "xmpp"
  145. allow_unencrypted_plain_auth = true
  146. {{ else if eq $PROSODY_AUTH_TYPE "matrix" }}
  147. authentication = "matrix_user_verification"
  148. app_id = "{{ $MATRIX_UVS_ISSUER }}"
  149. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  150. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  151. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  152. {{ end }}
  153. {{ if $MATRIX_UVS_SYNC_POWER_LEVELS }}
  154. uvs_sync_power_levels = true
  155. {{ end }}
  156. {{ else if eq $PROSODY_AUTH_TYPE "hybrid_matrix_token" }}
  157. authentication = "hybrid_matrix_token"
  158. app_id = "{{ .Env.JWT_APP_ID }}"
  159. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  160. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  161. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  162. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  163. {{ if .Env.MATRIX_UVS_ISSUER }}
  164. uvs_issuer = "{{ .Env.MATRIX_UVS_ISSUER }}"
  165. {{ end }}
  166. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  167. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  168. {{ end }}
  169. {{ else if eq $PROSODY_AUTH_TYPE "internal" }}
  170. authentication = "internal_hashed"
  171. {{ end }}
  172. {{ else }}
  173. authentication = "jitsi-anonymous"
  174. {{ end }}
  175. ssl = {
  176. key = "/config/certs/{{ $XMPP_DOMAIN }}.key";
  177. certificate = "/config/certs/{{ $XMPP_DOMAIN }}.crt";
  178. }
  179. modules_enabled = {
  180. "bosh";
  181. {{ if $ENABLE_XMPP_WEBSOCKET }}
  182. "websocket";
  183. "smacks"; -- XEP-0198: Stream Management
  184. {{ end }}
  185. "speakerstats";
  186. "conference_duration";
  187. "room_metadata";
  188. {{ if $ENABLE_END_CONFERENCE }}
  189. "end_conference";
  190. {{ end }}
  191. {{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
  192. "external_services";
  193. {{ end }}
  194. {{ if $ENABLE_LOBBY }}
  195. "muc_lobby_rooms";
  196. {{ end }}
  197. {{ if $ENABLE_BREAKOUT_ROOMS }}
  198. "muc_breakout_rooms";
  199. {{ end }}
  200. {{ if $ENABLE_AV_MODERATION }}
  201. "av_moderation";
  202. {{ end }}
  203. {{ if .Env.XMPP_MODULES }}
  204. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MODULES) }}";
  205. {{ end }}
  206. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "ldap") }}
  207. "auth_cyrus";
  208. {{end}}
  209. {{ if $PROSODY_RESERVATION_ENABLED }}
  210. "reservations";
  211. {{ end }}
  212. {{ if $ENABLE_VISITORS }}
  213. "visitors";
  214. {{ end }}
  215. {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }}
  216. "jibri_session";
  217. {{- end }}
  218. }
  219. main_muc = "{{ $XMPP_MUC_DOMAIN }}"
  220. room_metadata_component = "metadata.{{ $XMPP_DOMAIN }}"
  221. {{ if $ENABLE_LOBBY }}
  222. lobby_muc = "lobby.{{ $XMPP_DOMAIN }}"
  223. {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }}
  224. muc_lobby_whitelist = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  225. {{ end }}
  226. {{ end }}
  227. {{ if $PROSODY_RESERVATION_ENABLED }}
  228. reservations_api_prefix = "{{ $PROSODY_RESERVATION_REST_BASE_URL }}"
  229. {{ end }}
  230. {{ if $ENABLE_BREAKOUT_ROOMS }}
  231. breakout_rooms_muc = "breakout.{{ $XMPP_DOMAIN }}"
  232. {{ end }}
  233. speakerstats_component = "speakerstats.{{ $XMPP_DOMAIN }}"
  234. conference_duration_component = "conferenceduration.{{ $XMPP_DOMAIN }}"
  235. {{ if $ENABLE_END_CONFERENCE }}
  236. end_conference_component = "endconference.{{ $XMPP_DOMAIN }}"
  237. {{ end }}
  238. {{ if $ENABLE_AV_MODERATION }}
  239. av_moderation_component = "avmoderation.{{ $XMPP_DOMAIN }}"
  240. {{ end }}
  241. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  242. {{ if $ENABLE_VISITORS -}}
  243. visitors_ignore_list = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  244. {{ end }}
  245. {{ if .Env.XMPP_CONFIGURATION -}}
  246. {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }}
  247. {{ end -}}
  248. {{ if $ENABLE_GUEST_DOMAIN }}
  249. VirtualHost "{{ $XMPP_GUEST_DOMAIN }}"
  250. authentication = "{{ $GUEST_AUTH_TYPE }}"
  251. modules_enabled = {
  252. {{ if $ENABLE_XMPP_WEBSOCKET }}
  253. "smacks"; -- XEP-0198: Stream Management
  254. {{ end }}
  255. }
  256. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  257. {{ if $ENABLE_VISITORS }}
  258. allow_anonymous_s2s = true
  259. {{ end }}
  260. {{ end }}
  261. VirtualHost "{{ $XMPP_AUTH_DOMAIN }}"
  262. ssl = {
  263. key = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.key";
  264. certificate = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.crt";
  265. }
  266. modules_enabled = {
  267. "limits_exception";
  268. {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }}
  269. "jibri_session";
  270. {{- end }}
  271. }
  272. authentication = "internal_hashed"
  273. {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }}
  274. VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}"
  275. modules_enabled = {
  276. "smacks";
  277. }
  278. authentication = "internal_hashed"
  279. {{ end }}
  280. Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  281. storage = "memory"
  282. modules_enabled = {
  283. "muc_hide_all";
  284. "muc_filter_access";
  285. {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}}
  286. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  287. {{ end -}}
  288. }
  289. restrict_room_creation = true
  290. muc_filter_whitelist="{{ $XMPP_AUTH_DOMAIN }}"
  291. muc_room_locking = false
  292. muc_room_default_public_jids = true
  293. muc_room_cache_size = 1000
  294. muc_tombstones = false
  295. muc_room_allow_persistent = false
  296. Component "{{ $XMPP_MUC_DOMAIN }}" "muc"
  297. restrict_room_creation = true
  298. storage = "memory"
  299. modules_enabled = {
  300. "muc_meeting_id";
  301. {{ if .Env.XMPP_MUC_MODULES -}}
  302. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  303. {{ end -}}
  304. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) -}}
  305. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  306. {{ end }}
  307. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "matrix") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  308. "matrix_power_sync";
  309. {{ end -}}
  310. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  311. "matrix_affiliation";
  312. {{ end -}}
  313. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_LOBBY_BYPASS -}}
  314. "matrix_lobby_bypass";
  315. {{ end -}}
  316. {{ if not $DISABLE_POLLS -}}
  317. "polls";
  318. {{ end -}}
  319. {{ if $ENABLE_SUBDOMAINS -}}
  320. "muc_domain_mapper";
  321. {{ end -}}
  322. {{ if $ENABLE_RATE_LIMITS -}}
  323. "muc_rate_limit";
  324. "rate_limit";
  325. {{ end -}}
  326. {{ if .Env.MAX_PARTICIPANTS }}
  327. "muc_max_occupants";
  328. {{ end }}
  329. "muc_password_whitelist";
  330. }
  331. {{ if $ENABLE_RATE_LIMITS -}}
  332. -- Max allowed join/login rate in events per second.
  333. rate_limit_login_rate = {{ $RATE_LIMIT_LOGIN_RATE }};
  334. -- The rate to which sessions from IPs exceeding the join rate will be limited, in bytes per second.
  335. rate_limit_session_rate = {{ $RATE_LIMIT_SESSION_RATE }};
  336. -- The time in seconds, after which the limit for an IP address is lifted.
  337. rate_limit_timeout = {{ $RATE_LIMIT_TIMEOUT }};
  338. -- List of regular expressions for IP addresses that are not limited by this module.
  339. rate_limit_whitelist = {
  340. "127.0.0.1";
  341. {{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) }}
  342. "{{ $cidr }}";
  343. {{ end }}
  344. };
  345. rate_limit_whitelist_hosts = {
  346. "{{ $XMPP_RECORDER_DOMAIN }}";
  347. }
  348. {{ end -}}
  349. -- The size of the cache that saves state for IP addresses
  350. rate_limit_cache_size = {{ $RATE_LIMIT_CACHE_SIZE }};
  351. muc_room_cache_size = 10000
  352. muc_room_locking = false
  353. muc_room_default_public_jids = true
  354. {{ if .Env.XMPP_MUC_CONFIGURATION -}}
  355. {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION) }}
  356. {{ end -}}
  357. {{ if .Env.MAX_PARTICIPANTS }}
  358. muc_access_whitelist = { "focus@{{ $XMPP_AUTH_DOMAIN }}" }
  359. muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}"
  360. {{ end }}
  361. muc_password_whitelist = {
  362. "focus@{{ $XMPP_AUTH_DOMAIN }}";
  363. {{- if $ENABLE_RECORDING }}
  364. "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  365. {{- end }}
  366. {{- if $ENABLE_TRANSCRIPTIONS }}
  367. "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  368. {{- end }}
  369. }
  370. muc_tombstones = false
  371. muc_room_allow_persistent = false
  372. Component "focus.{{ $XMPP_DOMAIN }}" "client_proxy"
  373. target_address = "focus@{{ $XMPP_AUTH_DOMAIN }}"
  374. Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component"
  375. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  376. {{- if .Env.XMPP_SPEAKERSTATS_MODULES }}
  377. modules_enabled = {
  378. "{{ join "\";\n \"" (splitList "," .Env.XMPP_SPEAKERSTATS_MODULES) }}";
  379. }
  380. {{- end }}
  381. Component "conferenceduration.{{ $XMPP_DOMAIN }}" "conference_duration_component"
  382. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  383. {{ if $ENABLE_END_CONFERENCE }}
  384. Component "endconference.{{ $XMPP_DOMAIN }}" "end_conference"
  385. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  386. {{ end }}
  387. {{ if $ENABLE_AV_MODERATION }}
  388. Component "avmoderation.{{ $XMPP_DOMAIN }}" "av_moderation_component"
  389. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  390. {{ end }}
  391. {{ if $ENABLE_LOBBY }}
  392. Component "lobby.{{ $XMPP_DOMAIN }}" "muc"
  393. storage = "memory"
  394. restrict_room_creation = true
  395. muc_tombstones = false
  396. muc_room_allow_persistent = false
  397. muc_room_cache_size = 10000
  398. muc_room_locking = false
  399. muc_room_default_public_jids = true
  400. modules_enabled = {
  401. {{ if $ENABLE_RATE_LIMITS -}}
  402. "muc_rate_limit";
  403. {{ end -}}
  404. {{ if .Env.XMPP_LOBBY_MUC_MODULES -}}
  405. "{{ join "\";\n \"" (splitList "," .Env.XMPP_LOBBY_MUC_MODULES) }}";
  406. {{ end -}}
  407. }
  408. {{ end }}
  409. {{ if $ENABLE_BREAKOUT_ROOMS }}
  410. Component "breakout.{{ $XMPP_DOMAIN }}" "muc"
  411. storage = "memory"
  412. restrict_room_creation = true
  413. muc_room_cache_size = 10000
  414. muc_room_locking = false
  415. muc_room_default_public_jids = true
  416. muc_tombstones = false
  417. muc_room_allow_persistent = false
  418. modules_enabled = {
  419. "muc_meeting_id";
  420. {{ if not $DISABLE_POLLS -}}
  421. "polls";
  422. {{ end -}}
  423. {{ if $ENABLE_RATE_LIMITS -}}
  424. "muc_rate_limit";
  425. {{ end -}}
  426. {{ if .Env.XMPP_BREAKOUT_MUC_MODULES -}}
  427. "{{ join "\";\n \"" (splitList "," .Env.XMPP_BREAKOUT_MUC_MODULES) }}";
  428. {{ end -}}
  429. }
  430. {{ end }}
  431. Component "metadata.{{ $XMPP_DOMAIN }}" "room_metadata_component"
  432. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  433. breakout_rooms_component = "breakout.{{ $XMPP_DOMAIN }}"
  434. {{ if $ENABLE_VISITORS }}
  435. Component "visitors.{{ $XMPP_DOMAIN }}" "visitors_component"
  436. auto_allow_visitor_promotion = true
  437. always_visitors_enabled = true
  438. {{ end }}