{"id":471328,"date":"2025-08-20T09:01:07","date_gmt":"2025-08-20T09:01:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=471328"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=471328","title":{"rendered":"<span>\u0417\u0432\u043e\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 Jabber \u0432 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"bordered full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4f\/a9c\/f1d\/d4fa9cf1d948df30b44cc29b3e8ac4bf.jpg\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d4f\/a9c\/f1d\/d4fa9cf1d948df30b44cc29b3e8ac4bf.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4f\/a9c\/f1d\/d4fa9cf1d948df30b44cc29b3e8ac4bf.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u0441\u0432\u0435\u0442\u0435 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0435\u0433\u043e, \u0441\u0432\u043e\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u043e\u0432 \u043d\u0430 XMPP \u0441\u0442\u0430\u043b\u0438 \u043a\u0430\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431: \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0432\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Jabber-\u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u0435\u043b\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438: \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043c\u0430\u043c\u0435, \u0431\u0430\u0431\u0443\u0448\u043a\u0435, \u0442\u0435\u0449\u0435, \u0436\u0435\u043d\u0435 \u0438 \u0441\u043e\u0441\u0435\u0434\u043a\u0435 \u0414\u0430\u0448\u0435. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c.<\/p>\n<p>\u0417\u0432\u043e\u043d\u043a\u0438 \u0438\u0434\u0443\u0442 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 p2p. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u0430 \u0445\u0438\u0442\u0440\u044b\u0439 NAT, \u0442\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 STUN-\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0435\u0441\u0442\u044c \u043f\u043e\u0434 \u0432\u0441\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: Android, iOS, Windows, macOS \u0438 Linux.<\/p>\n<h2>\u0427\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f?<\/h2>\n<ol>\n<li>\n<p>VDS \/ VPS \u0441 \u0431\u0435\u043b\u044b\u043c IP<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<ol>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 docker \u0438 <\/strong> <strong>Docker Compose \u0432\u0435\u0440\u0441\u0438\u0438 2  <\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0448\u0430\u0433. \u0414\u043b\u044f Ubuntu \/ Debian<\/p>\n<pre><code class=\"bash\">sudo apt update sudo apt install -y docker.io docker-compose-plugin sudo systemctl enable --now docker<\/code><\/pre>\n<p>\u0414\u043b\u044f  RHEL \/ Rocky Linux \/ AlmaLinux <\/p>\n<pre><code class=\"bash\">sudo dnf -y install dnf-plugins-core sudo dnf config-manager --add-repo https:\/\/download.docker.com\/linux\/fedora\/docker-ce.repo sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin  sudo systemctl enable --now docker<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u2014 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.  \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 Docker Compose \u0432\u0435\u0440\u0441\u0438\u0438 2 \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c docker-compose v1.  <\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c DNS<\/strong><\/p>\n<pre><code>A     chat.your-domain.com    \u2192 &lt;\u0431\u0435\u043b\u044b\u0439 IP VDS\/VPS&gt; CNAME groups.chat.your-domain.com \u2192 chat.your-domain.com CNAME share.chat.your-domain.com  \u2192 chat.your-domain.com<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0434\u043d\u0443 A-\u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0434\u0432\u0435 CNAME<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442\u044b<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>Ubuntu \/ Debian<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># \u0412\u0435\u0431\/ACME sudo ufw allow 80\/tcp sudo ufw allow 443\/tcp  # XMPP sudo ufw allow 5222\/tcp     # c2s sudo ufw allow 5269\/tcp     # s2s (\u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f, \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e)  # STUN\/TURN (\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b) sudo ufw allow 3478\/tcp sudo ufw allow 3478\/udp sudo ufw allow 3479\/tcp sudo ufw allow 3479\/udp sudo ufw allow 5349\/tcp     # TLS sudo ufw allow 5349\/udp sudo ufw allow 5350\/tcp sudo ufw allow 5350\/udp  # RTP-\u0440\u0435\u043b\u0435 TURN (\u043c\u0435\u0434\u0438\u0430) sudo ufw allow 49152:65535\/udp  # (\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) proxy65 \u0434\u043b\u044f file-transfer sudo ufw allow 5000\/tcp <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>RHEL \/ Rocky Linux \/ AlmaLinux <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\"># \u0412\u0435\u0431\/ACME sudo firewall-cmd --permanent --add-port=80\/tcp sudo firewall-cmd --permanent --add-port=443\/tcp  # XMPP sudo firewall-cmd --permanent --add-port=5222\/tcp sudo firewall-cmd --permanent --add-port=5269\/tcp  # STUN\/TURN sudo firewall-cmd --permanent --add-port=3478\/tcp sudo firewall-cmd --permanent --add-port=3478\/udp sudo firewall-cmd --permanent --add-port=3479\/tcp sudo firewall-cmd --permanent --add-port=3479\/udp sudo firewall-cmd --permanent --add-port=5349\/tcp sudo firewall-cmd --permanent --add-port=5349\/udp sudo firewall-cmd --permanent --add-port=5350\/tcp sudo firewall-cmd --permanent --add-port=5350\/udp  # RTP-\u0440\u0435\u043b\u0435 TURN (\u043c\u0435\u0434\u0438\u0430) sudo firewall-cmd --permanent --add-port=49152-65535\/udp  # (\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) proxy65 sudo firewall-cmd --permanent --add-port=5000\/tcp  sudo firewall-cmd --reload <\/code><\/pre>\n<\/div>\n<\/details>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c snikket <\/strong><\/p>\n<pre><code class=\"bash\">cd \/opt git clone https:\/\/github.com\/snikket-im\/snikket-selfhosted.git snikket cd snikket .\/scripts\/init.sh<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <code>.\/scripts\/init.sh<\/code> \u0432\u0430\u0441 \u0441\u043f\u0440\u043e\u0441\u044f\u0442 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 email, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code>.\/scripts\/start.sh<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043e\u043a, \u0442\u043e https:\/\/&lt;your domain&gt;\/ \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.   <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0430\u0439\u0442:<\/p>\n<pre><code class=\"bash\">.\/scripts\/new-invite.sh --admin --group default<\/code><\/pre>\n<\/li>\n<li>\n<p> <strong>\u0410\u0434\u043c\u0438\u043d\u043a\u0430 \u0438 \u0438\u043d\u0432\u0430\u0439\u0442\u044b \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0430\u0439\u0442 \u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 <code>https:\/\/&lt;\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d&gt;\/<\/code> \u2014 \u0438 \u0432\u044b \u043f\u043e\u043f\u0430\u0434\u0451\u0442\u0435 \u0432 \u0430\u0434\u043c\u0438\u043d-\u0437\u043e\u043d\u0443:  <\/p>\n<figure class=\"bordered full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43a\/7a4\/2f3\/43a7a42f34536e00f7437f8dc8fe7e30.gif\" alt=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442\" title=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442\" width=\"1253\" height=\"970\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43a\/7a4\/2f3\/43a7a42f34536e00f7437f8dc8fe7e30.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43a\/7a4\/2f3\/43a7a42f34536e00f7437f8dc8fe7e30.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442<\/figcaption><\/div>\n<\/figure>\n<p> \u0418\u0437 \u0430\u0434\u043c\u0438\u043d-\u0437\u043e\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u043c\u043e\u0436\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f.  <\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451! <\/strong><\/p>\n<\/li>\n<\/ol>\n<h2>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e  \u043c\u044b  \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 XMPP (Jabber) \u2014 \u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0431\u0435\u0437 \u0440\u0435\u043a\u043b\u0430\u043c\u044b \u0438 \u0441\u043b\u0435\u0436\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 XMPP.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0440\u0443\u043f\u043f\u044b \u0438 \u0447\u0430\u0442\u044b \u2014 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043d\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b\u044b \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0430 \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0444\u043e\u0442\u043e, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0432\u043e\u043d\u043a\u0438 \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 STUN\/TURN \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u043e- \u0438 \u0432\u0438\u0434\u0435\u043e\u0441\u0432\u044f\u0437\u0438 (WebRTC).<\/p>\n<\/li>\n<li>\n<p> \u0421\u043a\u0432\u043e\u0437\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0441\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430   \u2014 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041c\u0443\u043b\u044c\u0442\u0438\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u0434\u0435\u0432\u0430\u0439\u0441\u044b \u2014 \u043e\u0434\u0438\u043d \u044e\u0437\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>Docker-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u2014 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 Linux-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 1 \u0413\u0411 RAM, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f Raspberry Pi.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e  \u2014  \u0432\u0441\u0451 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0437\u0432\u043e\u043d\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 TURN\/STUN, \u043d\u0443 \u043b\u0438\u0431\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 Snikket Hosting \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0441\u043e\u0432\u0441\u0435\u043c \u043b\u0435\u043d\u044c   \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e $6\/\u043c\u0435\u0441 \u0437\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0435\u0434\u0438\u0430\u0440\u0435\u043b\u0435\u0435\u0432 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/li>\n<li>\n<p> Jitter\u2011\u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f WebRTC \u2014 \u0441\u043b\u0443\u0436\u0438\u0442 \u0431\u0443\u0444\u0435\u0440\u043e\u043c, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0443\u0434\u0438\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 NAT.  <\/p>\n<\/li>\n<li>\n<p>Snikket \u0441\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438 \u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b Let\u2019s Encrypt.  \u0423 \u043d\u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0441\u0442\u044c certbot-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b  \u0438 \u0434\u043b\u044f \u0432\u0435\u0431\u2011\u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u0438 \u0434\u043b\u044f \u0441\u043b\u0443\u0436\u0431 XMPP, STUN\/TURN <\/p>\n<\/li>\n<\/ol>\n<h4>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e jitter-\u0431\u0443\u0444\u0435\u0440\u0435<\/h4>\n<p>Jitter\u2011\u0431\u0443\u0444\u0435\u0440 \u2014 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0430\u0443\u0434\u0438\u043e\u2011\u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043f\u043e\u0434\u0430\u0447\u0443 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0437\u0432\u0443\u043a\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u0445 \u0441\u0435\u0442\u0438 \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0412 Snikket \u0442\u0430\u043a\u043e\u0439 \u0431\u0443\u0444\u0435\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 WebRTC-\u0434\u0432\u0438\u0436\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430 NAT \u0441 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e, \u0437\u0432\u043e\u043d\u043e\u043a \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043b\u0430\u0432\u043d\u044b\u043c   \u0438 \u0431\u0435\u0437 \u0440\u0435\u0437\u043a\u0438\u0445 \u00ab\u0434\u0451\u0440\u0433\u0430\u043d\u0438\u0439\u00bb \u0430\u0443\u0434\u0438\u043e.  <\/p>\n<p><strong>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0437\u0432\u043e\u043d\u043a\u0430\u0445<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0432\u043e\u043d\u043a\u0438 P2P. \u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0447\u0435\u0440\u0435\u0437 STUN.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 NAT \u0441\u043b\u043e\u0436\u043d\u044b\u0439 (\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439, CGNAT \u0438 \u0442.\u043f.), \u0442\u043e\u0433\u0434\u0430 \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 TURN-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412 Snikket \u043e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439. TURN \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 UDP-\u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>TURN \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043f\u043e\u0442\u043e\u043a. \u0412\u0441\u0451 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c SRTP (Secure RTP) \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 WebRTC.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0436\u0435  \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f TURN, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438. \u041e\u043d \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0431\u0430\u0439\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u0430 \u0442\u0430\u043a\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u0437\u0432\u043e\u043d\u043e\u043a \u0438\u0434\u0451\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e P2P.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u044b\u0439 NAT: \u0442\u0440\u0430\u0444\u0438\u043a \u00ab\u043f\u0440\u043e\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f\u00bb \u0447\u0435\u0440\u0435\u0437 TURN, \u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f end-to-end encrypted, \u0431\u0435\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0430\u0443\u0434\u0438\u043e\u0442\u0440\u0430\u0444\u0438\u043a\u0430<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u2014 \u043b\u0443\u0447\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c, \u0442\u0430\u043a \u0432\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0443\u043a\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438\u043b\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u00ab\u0440\u0435\u0437\u0430\u0442\u044c\u00bb \u0437\u0432\u043e\u043d\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c TURN \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <strong>443<\/strong> \u0438 \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0434 HTTPS.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 IP \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c TURN \u043d\u0430 \u043d\u0435\u0433\u043e, \u043d\u0430 \u043f\u043e\u0440\u0442 443.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c nginx-\u0441\u043f\u043b\u0438\u0442\u0442\u0435\u0440 \u0438 \u0440\u0430\u0437\u0440\u0443\u043b\u0438\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c IP.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435. \u0410 \u043f\u043e\u043a\u0430 \u2014 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c <strong>turnserver<\/strong> \u0432 Docker: \u043e\u043d \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<pre><code>mkdir \/opt\/turnserver cd \/opt\/turnserver<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0444\u0430\u0439\u043b docker-compose.yml \u0432\u043e\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<pre><code>version: \"3.8\" services:   coturn:     image: instrumentisto\/coturn:latest     container_name: coturn     restart: unless-stopped     network_mode: host     volumes:       - \/opt\/turnserver\/turnserver.conf:\/etc\/coturn\/turnserver.conf:ro<\/code><\/pre>\n<h4>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 A:  \u0414\u0412\u0410 \u00ab\u0431\u0435\u043b\u044b\u0445\u00bb IP  <\/h4>\n<p>Snikket \u0436\u0438\u0432\u0451\u0442 \u043d\u0430 IP\u2081 (HTTP\/HTTPS\/XMPP), \u0430 TURN \u2014 \u043d\u0430 IP\u2082 \u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 <code>443\/TLS<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <\/p>\n<p>DNS:<\/p>\n<p><a href=\"http:\/\/chat.your-domain.com\" rel=\"noopener noreferrer nofollow\">chat.your-domain.com<\/a> \u2192 IP\u2081<\/p>\n<p><a href=\"http:\/\/turn.your-domain.com\" rel=\"noopener noreferrer nofollow\">turn.your-domain.com<\/a> \u2192 IP\u2082<\/p>\n<p>Snikket (IP\u2081) \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 TURN \u0432 \u0444\u0430\u0439\u043b\u0435 \/opt\/snikket\/snikket.conf  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<pre><code class=\"bash\">SNIKKET_TWEAK_TURNSERVER=0 SNIKKET_TWEAK_TURNSERVER_DOMAIN=turn.your-domain.com SNIKKET_TWEAK_TURNSERVER_SECRET=ME_SECRET<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c: <code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b <code>\/etc\/coturn\/turnserver.conf<\/code>  \u043a\u043b\u0430\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">listening-ip=IP_2 tls-listening-port=443 relay-ip=IP_2 fingerprint use-auth-secret static-auth-secret=ME_SECRET realm=turn.your-domain.com cert=\/etc\/letsencrypt\/live\/turn.example.com\/fullchain.pem pkey=\/etc\/letsencrypt\/live\/turn.example.com\/privkey.pem<\/code><\/pre>\n<p>\u0418 \u0434\u0430\u043b\u0435\u0435 <code>docker compose up -d<\/code>   \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong> \u043f\u0440\u043e\u0449\u0435, \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u043b\u043e\u0435\u043a; \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c, \u0437\u0432\u043e\u043d\u043a\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u00ab\u043a\u0430\u043a HTTPS\u00bb \u043d\u0430 443\/TLS; \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0436\u0438\u0442\u0442\u0435\u0440\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 stream. <\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong> \u043d\u0443\u0436\u0435\u043d \u0432\u0442\u043e\u0440\u043e\u0439 IP.  <\/p>\n<hr\/>\n<h4>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 B:  \u041e\u0414\u0418\u041d \u00ab\u0431\u0435\u043b\u044b\u0439\u00bb IP  \u0438 nginx \u043a\u0430\u043a \u0441\u043f\u043b\u0438\u0442\u0442\u0435\u0440<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d  turn.your-domain.com  \u0438 \u0432\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0431\u0435\u043b\u044b\u0439  ip. <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c nginx \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: <\/p>\n<pre><code class=\"nginx\">stream {   map $ssl_preread_server_name $backend {     turn.example.com    turn_tls;     default             https_upstream;   }   upstream turn_tls        { server 127.0.0.1:5349; }   upstream https_upstream  { server 127.0.0.1:8443; }    server {     listen 443 reuseport;     proxy_pass $backend;     ssl_preread on;   } }<\/code><\/pre>\n<p> \u041e\u0442\u0434\u0430\u0435\u043c   HTTP \u043d\u0430 Snikket, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u0430\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u043b\/\u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u043b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b:  <\/p>\n<pre><code class=\"nginx\">server {   listen 80; listen [::]:80;   server_name chat.your-domain.com groups.chat.your-domain.com share.chat.your-domain.com;   location \/ {     proxy_set_header Host $host;     proxy_pass http:\/\/127.0.0.1:5080;   # SNIKKET_TWEAK_INTERNAL_HTTP_PORT   } } <\/code><\/pre>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 TURN \u0432 \u0444\u0430\u0439\u043b\u0435 \/opt\/snikket\/snikket.conf  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<pre><code class=\"bash\">SNIKKET_TWEAK_TURNSERVER=0 SNIKKET_TWEAK_TURNSERVER_DOMAIN=turn.your-domain.com SNIKKET_TWEAK_TURNSERVER_SECRET=ME_SECRET<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c: <code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b <code>\/etc\/coturn\/turnserver.conf<\/code>  \u043a\u043b\u0430\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">listening-ip=127.0.0.1 tls-listening-port=5349 relay-ip=&lt;\u041f\u0423\u0411\u041b\u0418\u0427\u041d\u042b\u0419_IP&gt; fingerprint use-auth-secret static-auth-secret=&lt;\u0414\u041b\u0418\u041d\u041d\u042b\u0419_\u0421\u0415\u041a\u0420\u0415\u0422&gt; realm=example.com cert=\/etc\/letsencrypt\/live\/turn.example.com\/fullchain.pem pkey=\/etc\/letsencrypt\/live\/turn.example.com\/privkey.pem <\/code><\/pre>\n<p><code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong> \u043e\u0434\u0438\u043d IP, \u0437\u0432\u043e\u043d\u043a\u0438 \u00ab\u043a\u0430\u043a HTTPS\u00bb \u043d\u0430 443\/TLS; Snikket \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0441\u0430\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c LE. <\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong> \u0447\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435; extra\u2011\u0445\u043e\u043f (nginx stream) \u2192 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442\u0441\u044f \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\/\u0434\u0436\u0438\u0442\u0442\u0435\u0440.  <\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/938760\/\"> https:\/\/habr.com\/ru\/articles\/938760\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"bordered full-width\"><\/figure>\n<p>\u0412 \u0441\u0432\u0435\u0442\u0435 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0435\u0433\u043e, \u0441\u0432\u043e\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u043e\u0432 \u043d\u0430 XMPP \u0441\u0442\u0430\u043b\u0438 \u043a\u0430\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431: \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0432\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Jabber-\u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u0435\u043b\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438: \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043c\u0430\u043c\u0435, \u0431\u0430\u0431\u0443\u0448\u043a\u0435, \u0442\u0435\u0449\u0435, \u0436\u0435\u043d\u0435 \u0438 \u0441\u043e\u0441\u0435\u0434\u043a\u0435 \u0414\u0430\u0448\u0435. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c.<\/p>\n<p>\u0417\u0432\u043e\u043d\u043a\u0438 \u0438\u0434\u0443\u0442 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 p2p. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u0430 \u0445\u0438\u0442\u0440\u044b\u0439 NAT, \u0442\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 STUN-\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0435\u0441\u0442\u044c \u043f\u043e\u0434 \u0432\u0441\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: Android, iOS, Windows, macOS \u0438 Linux.<\/p>\n<h2>\u0427\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f?<\/h2>\n<ol>\n<li>\n<p>VDS \/ VPS \u0441 \u0431\u0435\u043b\u044b\u043c IP<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043c\u0435\u043d<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<ol>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 docker \u0438 <\/strong> <strong>Docker Compose \u0432\u0435\u0440\u0441\u0438\u0438 2  <\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0448\u0430\u0433. \u0414\u043b\u044f Ubuntu \/ Debian<\/p>\n<pre><code class=\"bash\">sudo apt update sudo apt install -y docker.io docker-compose-plugin sudo systemctl enable --now docker<\/code><\/pre>\n<p>\u0414\u043b\u044f  RHEL \/ Rocky Linux \/ AlmaLinux <\/p>\n<pre><code class=\"bash\">sudo dnf -y install dnf-plugins-core sudo dnf config-manager --add-repo https:\/\/download.docker.com\/linux\/fedora\/docker-ce.repo sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin  sudo systemctl enable --now docker<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u2014 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.  \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 Docker Compose \u0432\u0435\u0440\u0441\u0438\u0438 2 \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c docker-compose v1.  <\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c DNS<\/strong><\/p>\n<pre><code>A     chat.your-domain.com    \u2192 &lt;\u0431\u0435\u043b\u044b\u0439 IP VDS\/VPS&gt; CNAME groups.chat.your-domain.com \u2192 chat.your-domain.com CNAME share.chat.your-domain.com  \u2192 chat.your-domain.com<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0434\u043d\u0443 A-\u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0434\u0432\u0435 CNAME<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442\u044b<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>Ubuntu \/ Debian<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># \u0412\u0435\u0431\/ACME sudo ufw allow 80\/tcp sudo ufw allow 443\/tcp  # XMPP sudo ufw allow 5222\/tcp     # c2s sudo ufw allow 5269\/tcp     # s2s (\u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f, \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e)  # STUN\/TURN (\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b) sudo ufw allow 3478\/tcp sudo ufw allow 3478\/udp sudo ufw allow 3479\/tcp sudo ufw allow 3479\/udp sudo ufw allow 5349\/tcp     # TLS sudo ufw allow 5349\/udp sudo ufw allow 5350\/tcp sudo ufw allow 5350\/udp  # RTP-\u0440\u0435\u043b\u0435 TURN (\u043c\u0435\u0434\u0438\u0430) sudo ufw allow 49152:65535\/udp  # (\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) proxy65 \u0434\u043b\u044f file-transfer sudo ufw allow 5000\/tcp <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>RHEL \/ Rocky Linux \/ AlmaLinux <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\"># \u0412\u0435\u0431\/ACME sudo firewall-cmd --permanent --add-port=80\/tcp sudo firewall-cmd --permanent --add-port=443\/tcp  # XMPP sudo firewall-cmd --permanent --add-port=5222\/tcp sudo firewall-cmd --permanent --add-port=5269\/tcp  # STUN\/TURN sudo firewall-cmd --permanent --add-port=3478\/tcp sudo firewall-cmd --permanent --add-port=3478\/udp sudo firewall-cmd --permanent --add-port=3479\/tcp sudo firewall-cmd --permanent --add-port=3479\/udp sudo firewall-cmd --permanent --add-port=5349\/tcp sudo firewall-cmd --permanent --add-port=5349\/udp sudo firewall-cmd --permanent --add-port=5350\/tcp sudo firewall-cmd --permanent --add-port=5350\/udp  # RTP-\u0440\u0435\u043b\u0435 TURN (\u043c\u0435\u0434\u0438\u0430) sudo firewall-cmd --permanent --add-port=49152-65535\/udp  # (\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) proxy65 sudo firewall-cmd --permanent --add-port=5000\/tcp  sudo firewall-cmd --reload <\/code><\/pre>\n<\/div>\n<\/details>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c snikket <\/strong><\/p>\n<pre><code class=\"bash\">cd \/opt git clone https:\/\/github.com\/snikket-im\/snikket-selfhosted.git snikket cd snikket .\/scripts\/init.sh<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <code>.\/scripts\/init.sh<\/code> \u0432\u0430\u0441 \u0441\u043f\u0440\u043e\u0441\u044f\u0442 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 email, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code>.\/scripts\/start.sh<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043e\u043a, \u0442\u043e https:\/\/&lt;your domain&gt;\/ \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.   <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0430\u0439\u0442:<\/p>\n<pre><code class=\"bash\">.\/scripts\/new-invite.sh --admin --group default<\/code><\/pre>\n<\/li>\n<li>\n<p> <strong>\u0410\u0434\u043c\u0438\u043d\u043a\u0430 \u0438 \u0438\u043d\u0432\u0430\u0439\u0442\u044b \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0430\u0439\u0442 \u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 <code>https:\/\/&lt;\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d&gt;\/<\/code> \u2014 \u0438 \u0432\u044b \u043f\u043e\u043f\u0430\u0434\u0451\u0442\u0435 \u0432 \u0430\u0434\u043c\u0438\u043d-\u0437\u043e\u043d\u0443:  <\/p>\n<figure class=\"bordered full-width\">\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442<\/figcaption><\/div>\n<\/figure>\n<p> \u0418\u0437 \u0430\u0434\u043c\u0438\u043d-\u0437\u043e\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u043c\u043e\u0436\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f.  <\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451! <\/strong><\/p>\n<\/li>\n<\/ol>\n<h2>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e  \u043c\u044b  \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 XMPP (Jabber) \u2014 \u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0431\u0435\u0437 \u0440\u0435\u043a\u043b\u0430\u043c\u044b \u0438 \u0441\u043b\u0435\u0436\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 XMPP.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0440\u0443\u043f\u043f\u044b \u0438 \u0447\u0430\u0442\u044b \u2014 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043d\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b\u044b \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0430 \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0444\u043e\u0442\u043e, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0432\u043e\u043d\u043a\u0438 \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 STUN\/TURN \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u043e- \u0438 \u0432\u0438\u0434\u0435\u043e\u0441\u0432\u044f\u0437\u0438 (WebRTC).<\/p>\n<\/li>\n<li>\n<p> \u0421\u043a\u0432\u043e\u0437\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0441\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430   \u2014 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041c\u0443\u043b\u044c\u0442\u0438\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u0434\u0435\u0432\u0430\u0439\u0441\u044b \u2014 \u043e\u0434\u0438\u043d \u044e\u0437\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>Docker-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u2014 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 Linux-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 1 \u0413\u0411 RAM, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f Raspberry Pi.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e  \u2014  \u0432\u0441\u0451 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0437\u0432\u043e\u043d\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 TURN\/STUN, \u043d\u0443 \u043b\u0438\u0431\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 Snikket Hosting \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0441\u043e\u0432\u0441\u0435\u043c \u043b\u0435\u043d\u044c   \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e $6\/\u043c\u0435\u0441 \u0437\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0435\u0434\u0438\u0430\u0440\u0435\u043b\u0435\u0435\u0432 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/li>\n<li>\n<p> Jitter\u2011\u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f WebRTC \u2014 \u0441\u043b\u0443\u0436\u0438\u0442 \u0431\u0443\u0444\u0435\u0440\u043e\u043c, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0443\u0434\u0438\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 NAT.  <\/p>\n<\/li>\n<li>\n<p>Snikket \u0441\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438 \u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b Let\u2019s Encrypt.  \u0423 \u043d\u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0441\u0442\u044c certbot-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b  \u0438 \u0434\u043b\u044f \u0432\u0435\u0431\u2011\u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u0438 \u0434\u043b\u044f \u0441\u043b\u0443\u0436\u0431 XMPP, STUN\/TURN <\/p>\n<\/li>\n<\/ol>\n<h4>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e jitter-\u0431\u0443\u0444\u0435\u0440\u0435<\/h4>\n<p>Jitter\u2011\u0431\u0443\u0444\u0435\u0440 \u2014 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0430\u0443\u0434\u0438\u043e\u2011\u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043f\u043e\u0434\u0430\u0447\u0443 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0437\u0432\u0443\u043a\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u0445 \u0441\u0435\u0442\u0438 \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0412 Snikket \u0442\u0430\u043a\u043e\u0439 \u0431\u0443\u0444\u0435\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 WebRTC-\u0434\u0432\u0438\u0436\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430 NAT \u0441 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e, \u0437\u0432\u043e\u043d\u043e\u043a \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043b\u0430\u0432\u043d\u044b\u043c   \u0438 \u0431\u0435\u0437 \u0440\u0435\u0437\u043a\u0438\u0445 \u00ab\u0434\u0451\u0440\u0433\u0430\u043d\u0438\u0439\u00bb \u0430\u0443\u0434\u0438\u043e.  <\/p>\n<p><strong>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0437\u0432\u043e\u043d\u043a\u0430\u0445<\/strong><\/p>\n<ul>\n<li>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0432\u043e\u043d\u043a\u0438 P2P. \u041a\u043b\u0438\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0447\u0435\u0440\u0435\u0437 STUN.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 NAT \u0441\u043b\u043e\u0436\u043d\u044b\u0439 (\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439, CGNAT \u0438 \u0442.\u043f.), \u0442\u043e\u0433\u0434\u0430 \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 TURN-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412 Snikket \u043e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439. TURN \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 UDP-\u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>TURN \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043f\u043e\u0442\u043e\u043a. \u0412\u0441\u0451 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c SRTP (Secure RTP) \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 WebRTC.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0436\u0435  \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f TURN, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438. \u041e\u043d \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0431\u0430\u0439\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u0430 \u0442\u0430\u043a\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u0437\u0432\u043e\u043d\u043e\u043a \u0438\u0434\u0451\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e P2P.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u044b\u0439 NAT: \u0442\u0440\u0430\u0444\u0438\u043a \u00ab\u043f\u0440\u043e\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f\u00bb \u0447\u0435\u0440\u0435\u0437 TURN, \u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f end-to-end encrypted, \u0431\u0435\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0430\u0443\u0434\u0438\u043e\u0442\u0440\u0430\u0444\u0438\u043a\u0430<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u2014 \u043b\u0443\u0447\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c, \u0442\u0430\u043a \u0432\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0443\u043a\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438\u043b\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u00ab\u0440\u0435\u0437\u0430\u0442\u044c\u00bb \u0437\u0432\u043e\u043d\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c TURN \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <strong>443<\/strong> \u0438 \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0434 HTTPS.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 IP \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c TURN \u043d\u0430 \u043d\u0435\u0433\u043e, \u043d\u0430 \u043f\u043e\u0440\u0442 443.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c nginx-\u0441\u043f\u043b\u0438\u0442\u0442\u0435\u0440 \u0438 \u0440\u0430\u0437\u0440\u0443\u043b\u0438\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c IP.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435. \u0410 \u043f\u043e\u043a\u0430 \u2014 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c <strong>turnserver<\/strong> \u0432 Docker: \u043e\u043d \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<pre><code>mkdir \/opt\/turnserver cd \/opt\/turnserver<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0444\u0430\u0439\u043b docker-compose.yml \u0432\u043e\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<pre><code>version: \"3.8\" services:   coturn:     image: instrumentisto\/coturn:latest     container_name: coturn     restart: unless-stopped     network_mode: host     volumes:       - \/opt\/turnserver\/turnserver.conf:\/etc\/coturn\/turnserver.conf:ro<\/code><\/pre>\n<h4>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 A:  \u0414\u0412\u0410 \u00ab\u0431\u0435\u043b\u044b\u0445\u00bb IP  <\/h4>\n<p>Snikket \u0436\u0438\u0432\u0451\u0442 \u043d\u0430 IP\u2081 (HTTP\/HTTPS\/XMPP), \u0430 TURN \u2014 \u043d\u0430 IP\u2082 \u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 <code>443\/TLS<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <\/p>\n<p>DNS:<\/p>\n<p><a href=\"http:\/\/chat.your-domain.com\" rel=\"noopener noreferrer nofollow\">chat.your-domain.com<\/a> \u2192 IP\u2081<\/p>\n<p><a href=\"http:\/\/turn.your-domain.com\" rel=\"noopener noreferrer nofollow\">turn.your-domain.com<\/a> \u2192 IP\u2082<\/p>\n<p>Snikket (IP\u2081) \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 TURN \u0432 \u0444\u0430\u0439\u043b\u0435 \/opt\/snikket\/snikket.conf  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<pre><code class=\"bash\">SNIKKET_TWEAK_TURNSERVER=0 SNIKKET_TWEAK_TURNSERVER_DOMAIN=turn.your-domain.com SNIKKET_TWEAK_TURNSERVER_SECRET=ME_SECRET<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c: <code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b <code>\/etc\/coturn\/turnserver.conf<\/code>  \u043a\u043b\u0430\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">listening-ip=IP_2 tls-listening-port=443 relay-ip=IP_2 fingerprint use-auth-secret static-auth-secret=ME_SECRET realm=turn.your-domain.com cert=\/etc\/letsencrypt\/live\/turn.example.com\/fullchain.pem pkey=\/etc\/letsencrypt\/live\/turn.example.com\/privkey.pem<\/code><\/pre>\n<p>\u0418 \u0434\u0430\u043b\u0435\u0435 <code>docker compose up -d<\/code>   \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong> \u043f\u0440\u043e\u0449\u0435, \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u043b\u043e\u0435\u043a; \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c, \u0437\u0432\u043e\u043d\u043a\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u00ab\u043a\u0430\u043a HTTPS\u00bb \u043d\u0430 443\/TLS; \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0436\u0438\u0442\u0442\u0435\u0440\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 stream. <\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong> \u043d\u0443\u0436\u0435\u043d \u0432\u0442\u043e\u0440\u043e\u0439 IP.  <\/p>\n<hr\/>\n<h4>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 B:  \u041e\u0414\u0418\u041d \u00ab\u0431\u0435\u043b\u044b\u0439\u00bb IP  \u0438 nginx \u043a\u0430\u043a \u0441\u043f\u043b\u0438\u0442\u0442\u0435\u0440<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d  turn.your-domain.com  \u0438 \u0432\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0431\u0435\u043b\u044b\u0439  ip. <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c nginx \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: <\/p>\n<pre><code class=\"nginx\">stream {   map $ssl_preread_server_name $backend {     turn.example.com    turn_tls;     default             https_upstream;   }   upstream turn_tls        { server 127.0.0.1:5349; }   upstream https_upstream  { server 127.0.0.1:8443; }    server {     listen 443 reuseport;     proxy_pass $backend;     ssl_preread on;   } }<\/code><\/pre>\n<p> \u041e\u0442\u0434\u0430\u0435\u043c   HTTP \u043d\u0430 Snikket, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u0430\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u043b\/\u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u043b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b:  <\/p>\n<pre><code class=\"nginx\">server {   listen 80; listen [::]:80;   server_name chat.your-domain.com groups.chat.your-domain.com share.chat.your-domain.com;   location \/ {     proxy_set_header Host $host;     proxy_pass http:\/\/127.0.0.1:5080;   # SNIKKET_TWEAK_INTERNAL_HTTP_PORT   } } <\/code><\/pre>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 TURN \u0432 \u0444\u0430\u0439\u043b\u0435 \/opt\/snikket\/snikket.conf  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<pre><code class=\"bash\">SNIKKET_TWEAK_TURNSERVER=0 SNIKKET_TWEAK_TURNSERVER_DOMAIN=turn.your-domain.com SNIKKET_TWEAK_TURNSERVER_SECRET=ME_SECRET<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c: <code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b <code>\/etc\/coturn\/turnserver.conf<\/code>  \u043a\u043b\u0430\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">listening-ip=127.0.0.1 tls-listening-port=5349 relay-ip=&lt;\u041f\u0423\u0411\u041b\u0418\u0427\u041d\u042b\u0419_IP&gt; fingerprint use-auth-secret static-auth-secret=&lt;\u0414\u041b\u0418\u041d\u041d\u042b\u0419_\u0421\u0415\u041a\u0420\u0415\u0422&gt; realm=example.com cert=\/etc\/letsencrypt\/live\/turn.example.com\/fullchain.pem pkey=\/etc\/letsencrypt\/live\/turn.example.com\/privkey.pem <\/code><\/pre>\n<p><code>docker compose up -d<\/code> \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b\u0441\u044f. <\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong> \u043e\u0434\u0438\u043d IP, \u0437\u0432\u043e\u043d\u043a\u0438 \u00ab\u043a\u0430\u043a HTTPS\u00bb \u043d\u0430 443\/TLS; Snikket \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0441\u0430\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c LE. <\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong> \u0447\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435; extra\u2011\u0445\u043e\u043f (nginx stream) \u2192 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442\u0441\u044f \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\/\u0434\u0436\u0438\u0442\u0442\u0435\u0440.  <\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/938760\/\"> https:\/\/habr.com\/ru\/articles\/938760\/<\/a><br \/><\/br><\/br><\/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-471328","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471328","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=471328"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471328\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}