{"id":346415,"date":"2023-03-07T15:00:57","date_gmt":"2023-03-07T15:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346415"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346415","title":{"rendered":"<span>\u0421\u043a\u0430\u0437 \u043e \u0442\u043e\u043c \u043a\u0430\u043a pet-project \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434 (\u0447\u0430\u0441\u0442\u044c 2)<\/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<p><a href=\"https:\/\/habr.com\/ru\/post\/718898\/\" rel=\"noopener noreferrer nofollow\"><u>\u041f\u0435\u0440\u0432\u0430\u044f \u0427\u0430\u0441\u0442\u044c<\/u><\/a><\/p>\n<h2>DNS \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430<\/h2>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a\u0442\u043e-\u0442\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u043b, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 DNS. \u0422\u0430\u043a \u0432\u043e\u0442, \u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 Round Robin. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Wireguard \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u043c\u0435\u0441\u0442\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Wireguard \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>[Interface] PrivateKey = &lt;client_private_key> Address = &lt;cient_address_on_server>\/32 DNS = 8.8.8.8, 1.1.1.1 [Peer] PublicKey = &lt;server_private_key> AllowedIPs = 0.0.0.0\/0 Endpoint = domainName.com:&lt;server_port><\/code><\/pre>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79c\/9ff\/350\/79c9ff350bf3e290a91fc0afee92c115.png\" alt=\"\u0420\u0438\u0441. 1\" title=\"\u0420\u0438\u0441. 1\" width=\"693\" height=\"502\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79c\/9ff\/350\/79c9ff350bf3e290a91fc0afee92c115.png\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 1<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b DNS \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c A \u0437\u0430\u043f\u0438\u0441\u044c \u0443 \u0441\u043e\u0432\u0435\u0433\u043e DNS \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043b\u0430\u0433, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c DNS \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442 \u043a \u0441\u0435\u0431\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0443\u0448\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0432\u0441\u0435 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0443\u0441\u043f\u0435\u044e\u0442 \u0443\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043e \u0441\u0442\u0430\u0440\u043e\u043c IP \u0430\u0434\u0440\u0435\u0441\u0435. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0438\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, DNS \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c Round Robin.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18b\/a1b\/bf5\/18ba1bbf56877764d2a082e9d414cb4b.png\" alt=\"\u0440\u0438\u0441. 2\" title=\"\u0440\u0438\u0441. 2\" width=\"710\" height=\"435\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18b\/a1b\/bf5\/18ba1bbf56877764d2a082e9d414cb4b.png\"\/><\/p>\n<div><figcaption>\u0440\u0438\u0441. 2<\/figcaption><\/div>\n<\/figure>\n<p><u>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 actions:<\/u><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">int64 (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>action<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">ENUM (1 &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f; 2 &#8212; \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>user_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">uuid (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>timestamp<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">timestamptz (\u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><u>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 users:<\/u><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">uuid (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>chat_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">int64 (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 Telegram)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>public_key<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>private_key<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>wireguard_ip<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ip \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>subcription_end<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">timestamptz (\u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c <strong>Master<\/strong> \u0438 <strong>Slave<\/strong> \u0445\u043e\u0441\u0442\u044b:<\/p>\n<p><strong>Master <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p><strong>TelegramBot <\/strong>&#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0421\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439,  \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a VPN.<\/p>\n<\/li>\n<li>\n<p><strong>SlavePingWorker<\/strong> &#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043e\u043d \u043f\u0438\u043d\u0433\u0443\u0435\u0442 \u0432\u0441\u0435 <strong>slave<\/strong>. \u0415\u0441\u043b\u0438 <strong>slave <\/strong>\u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ALERT. <\/p>\n<\/li>\n<li>\n<p><strong>PostgresDB<\/strong> &#8212; \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <strong>actions<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Server<\/strong> &#8212; \u043e\u0442\u0434\u0430\u0435\u0442 <strong>slave<\/strong> \u0445\u043e\u0441\u0442\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>actions<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Slave <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p><strong>SlaveWorker<\/strong> &#8212; \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 <strong>master<\/strong> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439  \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>actions<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p><u>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0448\u0430\u0433\u0438 \u043d\u0430 \u0440\u0438\u0441. 2<\/u><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 <strong>TelegramBot<\/strong> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>TelegramBot<\/strong> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 chat_id<strong> <\/strong>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u0430\u043b\u0435\u0435 \u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 public_key, private_key, wireguard_ip \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 users. \u0422\u0430\u043a\u0436\u0435 <strong>TelegramBot <\/strong>\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 actions:<\/p>\n<\/li>\n<\/ol>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"258\" width=\"258\">\n<p align=\"left\"><strong>action<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"197\" width=\"197\">\n<p align=\"left\"><strong>user_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>timestamp<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"258\" width=\"258\">\n<p align=\"left\">1 (<em>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>)<\/p>\n<\/td>\n<td data-colwidth=\"197\" width=\"197\">\n<p align=\"left\">&lt;user_uuid><\/p>\n<\/td>\n<td>\n<p align=\"left\">&lt;\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0432\u0438\u0434\u0435 .conf \u0444\u0430\u0439\u043b\u0430. <\/p>\n<\/li>\n<li>\n<p>Slave1Worker \u0438 Slave2Worker \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u0435\u043b\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Master \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b actions. \u0415\u0441\u043b\u0438 action = 1, \u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 Wireguard, \u0435\u0441\u043b\u0438 action = 2, \u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f. <\/p>\n<\/li>\n<\/ol>\n<h2>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a master \u0438 slave \u0445\u043e\u0441\u0442\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e IP \u0430\u0434\u0440\u0435\u0441\u0443 (\u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430), \u043d\u0435\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SSL.  \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 2 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Man-in-the-middle_attack\" rel=\"noopener noreferrer nofollow\">Man-in-the-middle<\/a> attack. <\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 master \u0438 slave \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c (\u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VPN \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e).<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 master \u0438 slave \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u0422\u0430\u043a \u043a\u0430\u043a API master \u0438 slave \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B4%D0%B5%D0%BC%D0%BF%D0%BE%D1%82%D0%B5%D0%BD%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\">\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u043c<\/a>, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. <\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u0438\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e RSA \u043a\u043b\u044e\u0447\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u044b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439\/\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fc7\/876\/1d3\/fc78761d3d83c8eb49a12c61434aa1e6.png\" alt=\"\u0440\u0438\u0441. 3\" title=\"\u0440\u0438\u0441. 3\" width=\"691\" height=\"516\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc7\/876\/1d3\/fc78761d3d83c8eb49a12c61434aa1e6.png\"\/><\/p>\n<div><figcaption>\u0440\u0438\u0441. 3<\/figcaption><\/div>\n<\/figure>\n<ol>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>master_private_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 slave \u0445\u043e\u0441\u0442<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>master_public_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>slave_private_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>Master \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>slave_public_key<\/strong> \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 responseHandler<\/p>\n<\/li>\n<\/ol>\n<p>\u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 timestamp. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u0440\u0430\u044f, \u0442\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u042f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0434\u043b\u0430\u0439\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 5 \u0441\u0435\u043a\u0443\u043d\u0434. \u042d\u0442\u043e\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0443\u0441\u043f\u0435\u0432\u0430\u043b\u0438 \u0434\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430. <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u0434\u0430 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, github actions, \u043f\u0440\u043e \u0434\u0435\u043b\u0435\u0433\u0430\u0446\u0438\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0438 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u044b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435. <\/p>\n<\/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\/post\/720596\/\"> https:\/\/habr.com\/ru\/post\/720596\/<\/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<p><a href=\"https:\/\/habr.com\/ru\/post\/718898\/\" rel=\"noopener noreferrer nofollow\"><u>\u041f\u0435\u0440\u0432\u0430\u044f \u0427\u0430\u0441\u0442\u044c<\/u><\/a><\/p>\n<h2>DNS \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430<\/h2>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a\u0442\u043e-\u0442\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u043b, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 DNS. \u0422\u0430\u043a \u0432\u043e\u0442, \u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 Round Robin. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Wireguard \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u043c\u0435\u0441\u0442\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Wireguard \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>[Interface] PrivateKey = &lt;client_private_key> Address = &lt;cient_address_on_server>\/32 DNS = 8.8.8.8, 1.1.1.1 [Peer] PublicKey = &lt;server_private_key> AllowedIPs = 0.0.0.0\/0 Endpoint = domainName.com:&lt;server_port><\/code><\/pre>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0438\u0441. 1<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b DNS \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438<\/h3>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c A \u0437\u0430\u043f\u0438\u0441\u044c \u0443 \u0441\u043e\u0432\u0435\u0433\u043e DNS \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043b\u0430\u0433, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c DNS \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442 \u043a \u0441\u0435\u0431\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0443\u0448\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0432\u0441\u0435 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0443\u0441\u043f\u0435\u044e\u0442 \u0443\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043e \u0441\u0442\u0430\u0440\u043e\u043c IP \u0430\u0434\u0440\u0435\u0441\u0435. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0438\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, DNS \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c Round Robin.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>\u0440\u0438\u0441. 2<\/figcaption><\/div>\n<\/figure>\n<p><u>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 actions:<\/u><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">int64 (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>action<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">ENUM (1 &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f; 2 &#8212; \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>user_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">uuid (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"173\" width=\"173\">\n<p align=\"left\"><strong>timestamp<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">timestamptz (\u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><u>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 users:<\/u><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">uuid (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>chat_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">int64 (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 Telegram)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>public_key<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>private_key<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>wireguard_ip<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">text (\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ip \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Wireguard)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>subcription_end<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">timestamptz (\u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c <strong>Master<\/strong> \u0438 <strong>Slave<\/strong> \u0445\u043e\u0441\u0442\u044b:<\/p>\n<p><strong>Master <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p><strong>TelegramBot <\/strong>&#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0421\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439,  \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a VPN.<\/p>\n<\/li>\n<li>\n<p><strong>SlavePingWorker<\/strong> &#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043e\u043d \u043f\u0438\u043d\u0433\u0443\u0435\u0442 \u0432\u0441\u0435 <strong>slave<\/strong>. \u0415\u0441\u043b\u0438 <strong>slave <\/strong>\u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ALERT. <\/p>\n<\/li>\n<li>\n<p><strong>PostgresDB<\/strong> &#8212; \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <strong>actions<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>Server<\/strong> &#8212; \u043e\u0442\u0434\u0430\u0435\u0442 <strong>slave<\/strong> \u0445\u043e\u0441\u0442\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>actions<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Slave <\/strong>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p><strong>SlaveWorker<\/strong> &#8212; \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 <strong>master<\/strong> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439  \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>actions<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p><u>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0448\u0430\u0433\u0438 \u043d\u0430 \u0440\u0438\u0441. 2<\/u><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 <strong>TelegramBot<\/strong> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>TelegramBot<\/strong> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 chat_id<strong> <\/strong>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u0430\u043b\u0435\u0435 \u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 public_key, private_key, wireguard_ip \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 users. \u0422\u0430\u043a\u0436\u0435 <strong>TelegramBot <\/strong>\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 actions:<\/p>\n<\/li>\n<\/ol>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\"><strong>id<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"258\" width=\"258\">\n<p align=\"left\"><strong>action<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"197\" width=\"197\">\n<p align=\"left\"><strong>user_id<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>timestamp<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"258\" width=\"258\">\n<p align=\"left\">1 (<em>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>)<\/p>\n<\/td>\n<td data-colwidth=\"197\" width=\"197\">\n<p align=\"left\">&lt;user_uuid><\/p>\n<\/td>\n<td>\n<p align=\"left\">&lt;\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0432\u0438\u0434\u0435 .conf \u0444\u0430\u0439\u043b\u0430. <\/p>\n<\/li>\n<li>\n<p>Slave1Worker \u0438 Slave2Worker \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u0435\u043b\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Master \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b actions. \u0415\u0441\u043b\u0438 action = 1, \u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 Wireguard, \u0435\u0441\u043b\u0438 action = 2, \u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f. <\/p>\n<\/li>\n<\/ol>\n<h2>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a master \u0438 slave \u0445\u043e\u0441\u0442\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e IP \u0430\u0434\u0440\u0435\u0441\u0443 (\u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430), \u043d\u0435\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SSL.  \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 2 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Man-in-the-middle_attack\" rel=\"noopener noreferrer nofollow\">Man-in-the-middle<\/a> attack. <\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 master \u0438 slave \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c (\u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VPN \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e).<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 master \u0438 slave \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u0422\u0430\u043a \u043a\u0430\u043a API master \u0438 slave \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B4%D0%B5%D0%BC%D0%BF%D0%BE%D1%82%D0%B5%D0%BD%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\">\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u043c<\/a>, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. <\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u0438\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e RSA \u043a\u043b\u044e\u0447\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u044b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439\/\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0440\u0438\u0441. 3<\/figcaption><\/div>\n<\/figure>\n<ol>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>master_private_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 slave \u0445\u043e\u0441\u0442<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>master_public_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>slave_private_key<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>Master \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0432\u0435\u0442 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>slave_public_key<\/strong> \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 responseHandler<\/p>\n<\/li>\n<\/ol>\n<p>\u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 timestamp. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u0440\u0430\u044f, \u0442\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u042f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0434\u043b\u0430\u0439\u043d \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 5 \u0441\u0435\u043a\u0443\u043d\u0434. \u042d\u0442\u043e\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0443\u0441\u043f\u0435\u0432\u0430\u043b\u0438 \u0434\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430. <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u0434\u0430 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, github actions, \u043f\u0440\u043e \u0434\u0435\u043b\u0435\u0433\u0430\u0446\u0438\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0438 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u044b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435. <\/p>\n<\/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\/post\/720596\/\"> https:\/\/habr.com\/ru\/post\/720596\/<\/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-346415","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346415","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=346415"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346415\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}