{"id":333792,"date":"2022-05-30T09:00:13","date_gmt":"2022-05-30T09:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=333792"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=333792","title":{"rendered":"<span>Jitsi-meet: \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e JWT-\u0442\u043e\u043a\u0435\u043d\u0443<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/z8\/fh\/h6\/z8fhh68ms9if_a1pnil_m4ov0ha.png\" data-src=\"https:\/\/habrastorage.org\/webt\/z8\/fh\/h6\/z8fhh68ms9if_a1pnil_m4ov0ha.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a jitsi \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u0437\u0432\u0430\u043d\u044b\u0445 \u0433\u043e\u0441\u0442\u0435\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0438, \u0441\u043e\u0432\u0435\u0449\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043b\u0438\u0447\u043d\u043e\u0439 \u0431\u0435\u0441\u0435\u0434\u044b \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 jitsi-meet \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JWT-\u0442\u043e\u043a\u0435\u043d\u0430. <a name=\"habracut\"><\/a><\/p>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 JWT-\u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0430 debian. \u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043a \u043d\u0430 \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/512236\/\">jitsi-jibri<\/a> (\u0441 \u043c\u043e\u0435\u0433\u043e \u043c\u0430\u043d\u0430 \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442), \u0442\u0430\u043a \u0438 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 jitsi.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">apt install git cmake luarocks libssl-dev liblua5.2 wget http:\/\/packages.prosody.im\/debian\/pool\/main\/p\/prosody-trunk\/prosody-trunk_1nightly1273-1~buster_amd64.deb dpkg -i prosody-trunk_1nightly1273-1~buster_amd64.deb<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">apt install prosody -y echo deb http:\/\/packages.prosody.im\/debian $(lsb_release -sc) main | sudo tee -a \/etc\/apt\/sources.list wget https:\/\/prosody.im\/files\/prosody-debian-packages.key -O- | sudo apt-key add - apt update apt upgrade apt-get install jitsi-meet-tokens prosody-modules lua5.2 liblua5.2 luarocks libssl-dev<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d Application ID \u0438 Application secret. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0445, \u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\/\u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 prosody)<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">luarocks install basexx<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 \/etc\/prosody\/prosody.cfg.lua \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">vim \/etc\/prosody\/prosody.cfg.lua<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">Include \"conf.d\/*.cfg.lua\"<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0443\u044e\u0441\u044f &#171;s2s_&#187; \u0438 \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">c2s_require_encryption = false<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">luarocks download lua-cjson luarocks unpack lua-cjson-2.1.0.6-1.src.rock<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 lua-cjson-2.1.0.6-1\/lua-cjson\/lua_cjson.c \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 743:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">vim lua-cjson-2.1.0.6-1\/lua-cjson\/lua_cjson.c<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">len = lua_objlen(l, -1); \u043d\u0430 len = lua_rawlen(l, -1);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd lua-cjson-2.1.0.6-1\/lua-cjson luarocks make --force cd .. git clone https:\/\/github.com\/ASolomatin\/luajwt.git cd luajwt\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043d\u0435\u0441\u0451\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b luajwtjitsi-1.3-7.rockspec:<\/p>\n<p>  <\/p>\n<pre><code class=\"lua\">package = \"luajwtjitsi\" version = \"1.3-7\"  source = {         url = \"git:\/\/github.com\/ASolomatin\/luajwt\/\",         tag = \"replace_luacrypto\" }  description = {         summary = \"JSON Web Tokens for Lua\",         detailed = \"Very fast and compatible with pyjwt, php-jwt, ruby-jwt, node-jwt-simple and others\",         homepage = \"https:\/\/github.com\/jitsi\/luajwt\/\",         license = \"MIT &lt;http:\/\/opensource.org\/licenses\/MIT>\" }  dependencies = {         \"lua >= 5.2\",         \"luaossl >= 20190731-0\",         \"lua-cjson >= 2.1.0\",         \"lbase64 >= 20120807-3\" }  build = {         type = \"builtin\",         modules = {                 luajwtjitsi = \"luajwtjitsi.lua\"         } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">luarocks install luajwtjitsi 2.0-0 systemctl restart prosody<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u0447\u0438\u0441\u0442\u0438\u043c \u0444\u0430\u0439\u043b \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u043e\u0434\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">vim \/var\/log\/prosody\/prosody.err systemctl restart prosody vim \/var\/log\/prosody\/prosody.err<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/jwt.io\/\">\u0441\u0430\u0439\u0442<\/a> \u0438 \u0442\u0430\u043c \u0437\u0430\u0434\u0430\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 URL \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 https:\/\/\/name_room?jwt=token .  <\/p>\n<p>\u041d\u0430 <a href=\"https:\/\/jwt.io\/\">\u0441\u0430\u0439\u0442\u0435<\/a> \u0432\u0432\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">HEADER:ALGORITHM &amp; TOKEN TYPE  {   \"typ\": \"JWT\",   \"alg\": \"HS256\" } PAYLOAD:DATA  {  \"context\": {     \"user\": {       \"name\": \"&lt;user>\",       \"id\": \"&lt;user>@gmail.com\",   #optional       \"email\": \"&lt;user@gmail.com>\",  #optional       \"avatar\": \"&lt;link to user's avatar>\"  #optional     }   },   \"aud\": \"jitsi\",   \"iss\": \"&lt;Application_ID>\",   \"sub\": \"&lt;FQDN>\",   \"room\": \"*\",   \"exp\": 98753496345768,   \"moderator\": true } VERIFY SIGNATURE  HMACSHA256(   base64UrlEncode(header) + \".\" +   base64UrlEncode(payload),  &lt;Application_secret>  ) secret base64 encoded<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/oo\/8c\/pw\/oo8cpwpixwau89gdjagg6semg2e.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/oo\/8c\/pw\/oo8cpwpixwau89gdjagg6semg2e.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0441\u0432\u043e\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0441\u0442\u043e &lt;&#8230;>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0411\u0430\u0437\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0438\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u043f\u0440\u043e\u0441\u043e\u0434\u0438\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043f\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u0442\u043e\u043a\u0435\u043d\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0445\u043e\u0441\u0442. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043c\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439. \u0422\u0430\u043a \u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u043e\u0431\u0431\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0443, \u0430 \u0442\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 &#171;\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c\u0441\u044f&#187;.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">vim \/etc\/prosody\/conf.avail\/&lt;FQDN>.cfg.lua<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430\u0448 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"lua\">VirtualHost \"&lt;FQDN>\"             authentication = \"token\"     app_id=\"&lt;APP_ID>\"     app_secret=\"&lt;APP_SECRET>\"     allow_empty_token = false     allow_unencrypted_plain_auth = true   \u2026     ssl = {         key = \"\/etc\/prosody\/certs\/&lt;FQDN>.key\";         certificate = \"\/etc\/prosody\/certs\/&lt;FQDN>.crt\";     }     av_moderation_component = \"avmoderation.&lt;FQDN>\"     speakerstats_component = \"speakerstats.&lt;FQDN>\"     conference_duration_component = \"conferenceduration.&lt;FQDN>\"     -- we need bosh     modules_enabled = {         \"bosh\";         \"pubsub\";         \"ping\"; -- Enable mod_ping         \"speakerstats\";         \"external_services\";         \"conference_duration\";         \"muc_lobby_rooms\";         \"muc_breakout_rooms\";         \"presence_identity\";         \"av_moderation\";     }     c2s_require_encryption = false     lobby_muc = \"lobby.&lt;FQDN>\"     breakout_rooms_muc = \"breakout.&lt;FQDN>\"     main_muc = \"conference.&lt;FQDN>\"     muc_lobby_whitelist = { \"recorder.&lt;FQDN>\" } -- Here we can whitelist jibri to enter lobby enabled rooms  VirtualHost \"guest.&lt;FQDN>\"     authentication = \"anonymous\"     modules_enabled = {             \"bosh\";             \"pubsub\";             \"ping\"; -- Enable mod_ping             \"speakerstats\";             \"conference_duration\";         }     c2s_require_encryption = false  Component \"conference.&lt;FQDN>\" \"muc\"     restrict_room_creation = true     storage = \"memory\"     modules_enabled = {         \"muc_meeting_id\";         \"muc_domain_mapper\";         \"polls\";         \"token_verification\";         \"token_moderation\";         \"muc_rate_limit\";     }     admins = { \"focus@auth.&lt;FQDN>\" }     muc_room_locking = false     muc_room_default_public_jids = true  Component \"breakout.&lt;FQDN>\" \"muc\"     restrict_room_creation = true     storage = \"memory\"     modules_enabled = {         \"muc_meeting_id\";         \"muc_domain_mapper\";         \"token_verification\";         \"muc_rate_limit\";         \"polls\";     }     admins = { \"focus@auth.&lt;FQDN>\" }     muc_room_locking = false     muc_room_default_public_jids = true  -- internal muc component Component \"internal.auth.&lt;FQDN>\" \"muc\"     storage = \"memory\"     modules_enabled = {         \"ping\";     }     admins = { \"focus@auth.&lt;FQDN>\", \"jvb@auth.&lt;FQDN>\" }     muc_room_locking = false     muc_room_default_public_jids = true     muc_room_cache_size = 1000  VirtualHost \"auth.&lt;FQDN>\"     ssl = {         key = \"\/etc\/prosody\/certs\/auth.&lt;FQDN>.key\";         certificate = \"\/etc\/prosody\/certs\/auth.&lt;FQDN>.crt\";     }     modules_enabled = {         \"limits_exception\";     }     authentication = \"internal_hashed\"  -- Proxy to jicofo's user JID, so that it doesn't have to register as a component. Component \"focus.&lt;FQDN>\" \"client_proxy\"     target_address = \"focus@auth.&lt;FQDN>\"  Component \"speakerstats.&lt;FQDN>\" \"speakerstats_component\"     muc_component = \"conference.&lt;FQDN>\"  Component \"conferenceduration.&lt;FQDN>\" \"conference_duration_component\"     muc_component = \"conference.&lt;FQDN>\"  Component \"avmoderation.&lt;FQDN>\" \"av_moderation_component\"     muc_component = \"conference.&lt;FQDN>\"  Component \"lobby.&lt;FQDN>\" \"muc\"     storage = \"memory\"     restrict_room_creation = true     muc_room_locking = false     muc_room_default_public_jids = true     modules_enabled = {         \"muc_rate_limit\";         \"polls\";     }  \u0412 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 (\u044d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f jibri)  -- internal muc component, meant to enable pools of jibri and jigasi clients -- Component \"internal.auth.&lt;FQDN>\" \"muc\" -- \u0414\u0430\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0448\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 --    modules_enabled = { --        \"ping\"; --    } --    storage = \"memory\" --    muc_room_cache_size = 1000  VirtualHost \"recorder.&lt;FQDN>\"     modules_enabled = {         \"ping\";     }     authentication = \"internal_plain\"<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd ~ git clone https:\/\/github.com\/nvonahsen\/jitsi-token-moderation-plugin.git mv jitsi-token-moderation-plugin\/mod_token_moderation.lua \/usr\/share\/jitsi-meet\/prosody-plugins\/bak.mod_token_moderation.lua git clone https:\/\/github.com\/dumasti\/jitsi_mods.git mv \/usr\/share\/jitsi-meet\/prosody-plugins\/mod_muc_lobby_rooms.lua \/usr\/share\/jitsi-meet\/prosody-plugins\/bak.mod_muc_lobby_rooms.lua mv jitsi_mods\/*.lua \/usr\/share\/jitsi-meet\/prosody-plugins\/ mv \/usr\/share\/jitsi-meet\/prosody-plugins\/mod_token_moderation_grand.lua \/usr\/share\/jitsi-meet\/prosody-plugins\/mod_token_moderation.lua<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/jitsi\/meet\/-config.js \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cp \/etc\/jitsi\/meet\/&lt;FQDN>-config.js \/etc\/jitsi\/meet\/bak.&lt;FQDN>-config.js vim \/etc\/jitsi\/meet\/&lt;FQDN>-config.js<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/* eslint-disable no-unused-vars, no-var *\/  var config = {     hosts: {         domain: '&lt;FQDN>',          anonymousdomain: 'guest.&lt;FQDN>',         muc: 'conference.&lt;FQDN>'     },      bosh: '\/\/&lt;FQDN>\/http-bind',      testing: {     },     flags: {     },      enableNoAudioDetection: true,      enableNoisyMicDetection: true,      startAudioOnly: true,      startWithAudioMuted: false,      resolution: 1080,      constraints: {         video: {             height: {                 ideal: 720,                 max: 1080,                 min: 360             }         }     },      disableSimulcast: true,      fileRecordingsEnabled: true,     liveStreamingEnabled: true,     hiddenDomain: 'recorder.&lt;FQDN>',      channelLastN: -1,      enableWelcomePage: true,      defaultLanguage: 'en',      enableUserRolesBasedOnToken: true,      p2p: {         enabled: true,         stunServers: [              { urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }         ]     },      analytics: {     },      deploymentInfo: {     },      mouseMoveCallbackInterval: 1000,     makeJsonParserHappy: 'even if last key had a trailing comma' };  \/* eslint-enable no-unused-vars, no-var *\/<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">vim \/etc\/jitsi\/jicofo\/sip-communicator.properties<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.&lt;FQDN> org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90 org.jitsi.jicofo.auth.URL=EXT_JWT:&lt;FQDN><\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">systemctl restart jitsi-videobridge2 jicofo prosody<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u0418\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 jibri \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438, \u0442\u043e \u0438\u0434\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/post\/512236\/#:~:text=%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%B0%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC,-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%20Jibri\">\u0441\u044e\u0434\u0430<\/a> \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 jibri.<\/p>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 <a href=\"https:\/\/www.linkedin.com\/in\/darya-gulkovich-1179b51b1\/\">\u0414\u0430\u0440\u044c\u044e \u0413\u0443\u043b\u044c\u043a\u043e\u0432\u0438\u0447<\/a>. \u0422\u0430\u043a \u0436\u0435 \u0432\u044b\u0440\u0430\u0436\u0430\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 (\u043f\u0435\u043d\u0434\u0430\u043b\u044c \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438) <a href=\"https:\/\/habr.com\/ru\/users\/w3cproject\/\">\u041d\u0438\u043a\u0438\u0442\u0443 \u0421\u0443\u043a\u043b\u0438\u0447<\/a>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p><a href=\"https:\/\/cloud.timeweb.com\/vds-promo-10-rub?utm_source=habr&amp;utm_medium=banner&amp;utm_campaign=vds-promo-10-rub\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/co\/e2\/kh\/coe2kha8u8_pypip-2k3wk3ppa0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/co\/e2\/kh\/coe2kha8u8_pypip-2k3wk3ppa0.png\"\/><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/666156\/\"> https:\/\/habr.com\/ru\/company\/timeweb\/blog\/666156\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/z8\/fh\/h6\/z8fhh68ms9if_a1pnil_m4ov0ha.png\" data-src=\"https:\/\/habrastorage.org\/webt\/z8\/fh\/h6\/z8fhh68ms9if_a1pnil_m4ov0ha.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a jitsi \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u0437\u0432\u0430\u043d\u044b\u0445 \u0433\u043e\u0441\u0442\u0435\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0438, \u0441\u043e\u0432\u0435\u0449\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043b\u0438\u0447\u043d\u043e\u0439 \u0431\u0435\u0441\u0435\u0434\u044b \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 jitsi-meet \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JWT-\u0442\u043e\u043a\u0435\u043d\u0430. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-333792","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333792"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333792\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}