{"id":484516,"date":"2026-06-22T10:10:59","date_gmt":"2026-06-22T10:10:59","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=484516"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=484516","title":{"rendered":"cfzt: \u043a\u0430\u043a\u00a0\u044f \u043e\u0431\u0435\u0440\u043d\u0443\u043b Zero Trust Cloudflare Tunnel \u0432\u00a0\u043e\u0434\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0437\u0430\u0447\u0435\u043c \u0442\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0442\u0447\u0434\u043e\u0433 \u0434\u043b\u044f\u00a0QUIC"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0443\u00a0\u043c\u0435\u043d\u044f \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432: Grafana, Zabbix, n8n, Navidrome, ollama, \u0411\u0414, \u043f\u0430\u0440\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 API. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430\u0440\u0443\u0436\u0443, \u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0434\u0430\u0448\u0431\u043e\u0440\u0434 Cloudflare \u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442\u00a0\u0436\u0435 \u043f\u0443\u0442\u044c: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c ingress\u2011\u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Zero Trust Access. \u041c\u0438\u043d\u0443\u0442 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u0435\u0437\u00a0\u043e\u0448\u0438\u0431\u043e\u043a. \u0421\u00a0\u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u043e\u0434\u0438\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 tunnel ID \u043b\u043e\u043c\u0430\u0435\u0442 \u0432\u0441\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u041d\u0430\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u0440\u0430\u0437 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e\u00a0\u044d\u0442\u043e \u0440\u0443\u0442\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u00a0\u043e\u0434\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f cfzt\u00a0\u2014 CLI \u043d\u0430\u00a0Go, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u043c\u0435\u0435\u0442:<\/p>\n<p>zt up grafana 3000<\/p>\n<p>\u0418 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 <code>grafana.domain.com<\/code> \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 <code>localhost:3000<\/code> \u0447\u0435\u0440\u0435\u0437 Cloudflare Tunnel, \u0441\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c Zero Trust Access \u0438 systemd \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0435\u0442 \u0440\u0435\u0431\u0443\u0442.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f03\/478\/c34\/f03478c3498c16b192194094a28143c1.gif\" alt=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u043d\u0443\u043b\u044f \u0434\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 health-\u0447\u0435\u043a\u0430\" title=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u043d\u0443\u043b\u044f \u0434\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 health-\u0447\u0435\u043a\u0430\" width=\"1424\" height=\"588\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f03\/478\/c34\/f03478c3498c16b192194094a28143c1.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f03\/478\/c34\/f03478c3498c16b192194094a28143c1.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u00a0\u043d\u0443\u043b\u044f \u0434\u043e\u00a0\u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 health\u2011\u0447\u0435\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0\u2014 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u043f\u0440\u0438\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u00a0\u2014 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u00a0\u0431\u0430\u0433 \u0432\u00a0\u0441\u0430\u043c\u043e\u043c cloudflared, \u0438\u0437\u2011\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u0442\u0447\u0434\u043e\u0433\u2011\u043f\u0440\u043e\u0446\u0435\u0441\u0441. <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u00a0Tailscale \u0438\u043b\u0438\u00a0\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0432\u0435\u0440\u0441\u2011\u043f\u0440\u043e\u043a\u0441\u0438? \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a\u00a0\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0451, \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430\u00a0\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. <\/p>\n<p>Tailscale\u00a0\u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u0434\u043b\u044f\u00a0\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 mesh\u2011\u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0438\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043d\u043e\u00a0\u043d\u0435\u00a0\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445\u00a0\u043b\u0438\u0446 \u0441\u00a0\u043d\u0430\u0432\u0435\u0448\u0430\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0434\u0430\u00a0\u0438 \u0441\u0430\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0440\u0443\u0433\u0430\u044f: \u044d\u0442\u043e VPN, \u0430\u00a0\u043d\u0435\u00a0\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0432\u0435\u0440\u0441 \u0441\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 HTTP. <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 nginx \u0438\u043b\u0438\u00a0caddy + dns\u00a0\u2014 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 80\/443\u00a0\u043d\u0430\u0440\u0443\u0436\u0443, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043b\u0438\u00a0DDNS \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432. \u0414\u043b\u044f\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u00a0NAT \u0431\u0435\u0437\u00a0\u0431\u0435\u043b\u043e\u0433\u043e \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a\u0430 \u044d\u0442\u043e \u0438\u043b\u0438\u00a0\u043d\u0435\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u043b\u0438\u00a0\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u043e\u0432 \u043d\u0430\u00a0\u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u0447\u0435\u0433\u043e \u044f \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c.<\/p>\n<p>Cloudflare Tunnel \u0447\u0435\u0440\u0435\u0437 cloudflared\u00a0\u2014 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u00a0edge Cloudflare, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432, TLS \u0438\u0437\u00a0\u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043f\u043b\u044e\u0441 Zero Trust Access \u043a\u0430\u043a\u00a0\u0441\u043b\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u0430\u043c\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c. \u041c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d\u00a0\u2014 UX. cloudflared tunnel create, cloudflared tunnel route dns, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 access \u0447\u0435\u0440\u0435\u0437 wrangler \u0438\u043b\u0438\u00a0\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u00a0\u2014 \u044d\u0442\u043e \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043a\u043b\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043d\u0443\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u0435\u0449\u0435 \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>cfzt\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0435\u0439\u043a\u0430 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u00a0\u043e\u0434\u0438\u043d workflow \u0441\u00a0\u043e\u0442\u043a\u0430\u0442\u043e\u043c \u043f\u0440\u0438\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u043c \u0448\u0430\u0433\u0435.<\/p>\n<p><strong>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/strong>: \u0447\u0442\u043e\u00a0\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u00a0\u043e\u0434\u0438\u043d zt up<\/p>\n<p>\u041f\u043e\u0434\u00a0\u043a\u0430\u043f\u043e\u0442\u043e\u043c <code>zt up &lt;service_name&gt; &lt;port&gt;<\/code> \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043a\u00a0Cloudflare API \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0433\u0438 \u043f\u0440\u0438\u00a0\u043e\u0448\u0438\u0431\u043a\u0435. \u0412\u043e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code>func createTunnel(opts tunnelOpts) error {    cfg, _ := config.Load()    store, _ := state.LoadStore()    cf := cloudflare.NewClient(cfg.APIToken, cfg.AccountID)    hostname := opts.name + \".\" + cfg.Domain    zoneID, _ := cf.GetZoneID(cfg.Domain)    \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c    tunnelID, credJSON, _ := cf.CreateTunnel(opts.name)    rollback := func(dnsRecordID, accessAppID string) {        if accessAppID != \"\" { cf.DeleteAccessApp(accessAppID) }        if dnsRecordID != \"\" { cf.DeleteDNSRecord(zoneID, dnsRecordID) }        cf.DeleteTunnel(tunnelID)        cloudflared.CleanTunnelFiles(opts.name)        service.Uninstall(opts.name)    }    \/\/ \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0433\u0440\u0435\u0441\u0441    if err := cf.ConfigureTunnel(tunnelID, hostname, opts.port); err != nil {        rollback(\"\", \"\")        return err    }    \/\/ \u043f\u0438\u0448\u0435\u043c cname    dnsRecordID, _ := cf.UpsertCNAME(zoneID, hostname, tunnelID)    \/\/ \u0435\u0441\u043b\u0438 \u043d\u0435 --public, \u0441\u043e\u0437\u0434\u0430\u0451\u043c zero trust access app + bypass policy    var accessAppID string    if !opts.public {        accessAppID, _ = cf.UpsertAccessApp(hostname, opts.name)        cf.CreateBypassPolicy(accessAppID, opts.emails)    }    \/\/ \u043f\u0438\u0448\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 config.yml \u0434\u043b\u044f cloudflared    cfgPath, _ := cloudflared.WriteTunnelConfig(tunnelID, opts.name, hostname, opts.port, opts.protocol, credJSON)    \/\/ \u0441\u0442\u0430\u0432\u0438\u043c systemd user unit    service.Install(opts.name, cfgPath, logPath)    \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 ~\/.zt-state.json    store.Set(&amp;state.Tunnel{Name: opts.name, TunnelID: tunnelID, ...})    store.Save()    return nil}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u00a0\u2014 \u0440\u043e\u043b\u043b\u0431\u044d\u043a. \u0415\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0448\u0430\u0433 4\u00a0\u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u0437\u2011\u0437\u0430 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e email \u0432 \u2011allow, \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 DNS\u2011\u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0441\u0430\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u0430\u00a0\u043d\u0435\u00a0\u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u0438\u0441\u0435\u0442\u044c \u043f\u043e\u043b\u0443\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u043c\u0443\u0441\u043e\u0440\u043e\u043c \u0432\u00a0\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435. \u0411\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u00a0\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0431\u0435\u0437\u00a0DNS \u0438 DNS\u2011\u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0435\u0437\u00a0\u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439, \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0438 \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0442\u043e\u043c \u0440\u0443\u043a\u0430\u043c\u0438 \u0442\u043e \u0435\u0449\u0435 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0433\u0440\u0435\u0441\u0441\u2011\u043a\u043e\u043d\u0444\u0438\u0433\u00a0\u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 yaml, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 cloudflared \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u043e:<\/p>\n<pre><code>tunnel: &lt;tunnel-id&gt;credentials-file: \/home\/user\/.zt\/tunnels\/grafana\/&lt;tunnel-id&gt;.jsoningress:  - hostname: grafana.domain.com    service: http:\/\/localhost:3000  - service: http_status:404<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 ~\/.zt\u2011state.json\u00a0\u2014 \u043f\u043b\u043e\u0441\u043a\u043e\u043c jsone \u0441\u00a0\u043c\u0430\u043f\u043f\u0438\u043d\u0433\u043e\u043c \u0438\u043c\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f, \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 (\u0430\u0439\u0434\u0438, \u043f\u043e\u0440\u0442, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0441\u0442\u0430\u0442\u0443\u0441). \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 zt down grafana \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0441\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0431\u0435\u0437\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u00a0API \u043d\u0430\u00a0\u043f\u043e\u0438\u0441\u043a. <\/p>\n<p><strong>\u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 1<\/strong>: build tags \u0438 \u043a\u0440\u043e\u0441\u0441\u2011\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u00a0Linux, macOS \u0438 Windows (\u0445\u043e\u0442\u044f \u043d\u0430\u00a0Windows \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438, cloudflared \u0442\u0430\u043c \u0431\u0435\u0437\u00a0\u0434\u0435\u043c\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438). \u0414\u043b\u044f\u00a0platform\u2011specific \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u00a0\u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \/\/go:build \u0442\u0435\u0433\u0430\u043c\u0438.<\/p>\n<p>\u0412\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0437\u0430\u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0433!windows \u0432\u00a0runner \u043f\u0440\u0438\u00a0\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u00a0Linux \u0432\u0441\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u00a0\u2014 runner_windows.go \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u00a0\u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435. \u0410\u00a0\u0432\u043e\u0442 CI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u043e\u0441\u0441\u2011\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0434\u00a0\u0432\u0441\u0435 \u0442\u0440\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u0437\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u043d\u0435\u0440\u0430, \u0443\u043f\u0430\u043b \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<pre><code>internal\/cloudflared\/runner_windows.go:7:6: Start redeclared in this block    internal\/cloudflared\/runner.go:12:6: other declaration of Startinternal\/cloudflared\/runner.go:26:41: unknown field Setsid in struct literal of type syscall.SysProcAttr<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u043f\u0435\u0440\u0432\u043e\u0439. syscall.SysProcAttr.Stesid\u00a0\u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0435, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u0434\u043b\u044f\u00a0unix (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 cloudflared \u0432\u00a0\u043d\u043e\u0432\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e, \u043e\u0442\u0432\u044f\u0437\u0430\u0432 \u043e\u0442\u00a0\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430). \u041d\u0430\u00a0\u0432\u0438\u043d\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043d\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438\u00a0\u0431\u044b \u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0438\u043c\u0435\u043d, \u043a\u043e\u0434 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u00a0\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f\u00a0\u0431\u044b. Build tags\u00a0\u2014 \u044d\u0442\u043e \u043d\u0435\u00a0\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u0440\u0436\u0430\u0442\u044c platform\u2011specific \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0431\u0438\u043d\u0430\u0440\u0435 \u0431\u0435\u0437\u00a0ifdef\u2011\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438.<\/p>\n<p>\u0424\u0438\u043a\u0441\u00a0\u2014 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043d\u043e\u00a0\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 <code>go build<\/code> \u043d\u0430\u00a0\u0442\u0432\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043d\u0435\u00a0\u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e\u00a0CI \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c.<\/p>\n<p><strong>\u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 2<\/strong>: secrets \u0432\u00a0Terraform state \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0431\u0435\u0437\u00a0\u043a\u0440\u0435\u0434\u043e\u0432. <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0434\u0443\u043c\u0430\u043b \u043d\u0430\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0431\u044d\u043a\u0430\u043f\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (<code>zt export \/ zt apply<\/code>), \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f\u00a0\u0431\u044b\u043b\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0Terraform, \u0431\u043b\u0430\u0433\u043e \u0443\u00a0Cloudflare \u0435\u0441\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u041d\u043e\u00a0\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0441\u043f\u043b\u044b\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: cloudflared tunnel create \u0447\u0435\u0440\u0435\u0437 API \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 tunnel_secret\u00a0\u2014 \u043a\u0440\u0435\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043f\u0430\u0441\u0442\u044c\u00a0\u043b\u0438\u0431\u043e \u0432\u00a0Terraform state (\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e\u00a0\u0441\u0435\u043a\u0440\u0435\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432\u00a0\u0444\u0430\u0439\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0441\u0442\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u044f\u0442 \u0438\u043b\u0438\u00a0\u0445\u0440\u0430\u043d\u044f\u0442 \u0432\u00a0S3\u00a0\u0431\u0435\u0437\u00a0\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f),\u00a0\u043b\u0438\u0431\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u0432\u00a0\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u043d\u0441\u0438\u0442\u0438\u0432\u2011\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0434\u043b\u044f\u00a0\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044d\u0442\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e Terraform \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 yaml\u2011\u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435\u00a0\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0440\u0435\u0434\u044b \u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0430\u0439\u0434\u0438:<\/p>\n<pre><code>services:  grafana:    port: 3000  portainer:    docker: true    allow:      - mail@domain.com  api:    port: 8080    public: true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u0440\u0435\u0434\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432 ~\/.zt\u2011config.json (\u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>zt init<\/code> \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e), \u0430\u00a0\u0441\u0430\u043c zt.yaml \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u0432\u00a0\u0433\u0438\u0442\u00a0\u2014 \u0442\u0430\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u00a0\u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u0442\u0443, \u0441\u00a0\u043a\u0430\u043a\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p><code>zt apply zt.yaml<\/code> \u043d\u0430\u00a0\u043d\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u0438\u0444\u0444 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043d\u043e\u00a0\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438 \u043d\u0435\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<pre><code>for _, name := range toCreate {    svc := m.Services[name]    port, err := resolveApplyPort(name, svc)    ...    createTunnel(tunnelOpts{        name: name, port: port, protocol: protocol,        public: svc.Public, emails: svc.Allow, docker: svc.Docker,    })}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432\u043d\u0430\u0447\u0430\u043b\u0435, \u043d\u043e\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u044f\u0432\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0434\u044b\u00bb: \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 state.Tunnel \u0438\u043b\u0438\u00a0\u043b\u0430\u0439\u0432\u2011\u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u00a0Cloudflare API. \u0412\u044b\u0431\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u043e\u0435\u00a0\u2014 state.Tunnel \u0443\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435 (\u043f\u043e\u0440\u0442, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, public\/allow), \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0430 \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438\u0441\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0442\u0435\u0440\u044f\u043b\u0438\u0441\u044c. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u00a0\u0434\u0432\u0430 json\u2011\u043f\u043e\u043b\u044f \u0440\u0435\u0448\u0438\u043b\u043e \u044d\u0442\u043e \u0431\u0435\u0437\u00a0\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438\u00a0\u2014 \u0441\u0442\u0430\u0440\u044b\u0435 ~\/.zt\u2011state.json \u0431\u0435\u0437\u00a0\u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f zero\u2011value. <\/p>\n<p><strong>\u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 3<\/strong>: cloudflared \u043d\u0435\u00a0\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0quic \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442\u0447\u0434\u043e\u0433.<\/p>\n<p>\u0421\u0430\u043c\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. cloudflared \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043b\u044f\u00a0\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u00a0edge Cloudflare: QUIC (\u043f\u043e\u0432\u0435\u0440\u0445 UDP,\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 DNS) \u0438 HTTP\/2\u00a0(\u043f\u043e\u0432\u0435\u0440\u0445 TCP, fallback \u0434\u043b\u044f\u00a0\u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0433\u0434\u0430 UDP \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u00a0\u2014 \u0447\u0430\u0441\u0442\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0432\u00a0\u043a\u043e\u0440\u043f. \u0441\u0435\u0442\u044f\u0445). \u041f\u043e\u00a0\u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u2011protocol auto, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0440\u0435\u0448\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0444\u043e\u043b\u043b\u0431\u044d\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 cloudflared \u043d\u0435\u00a0\u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c udp\u2011\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043e\u043d \u043c\u043e\u043b\u0447\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0HTTP\/2. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u00a0\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438\u00a0\u2014 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u00a0quic \u043e\u043d \u043d\u0435\u00a0\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0435\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0431\u0430\u0433 \u0432\u00a0\u0441\u0430\u043c\u043e\u043c cloudflared [<a href=\"https:\/\/github.com\/cloudflare\/cloudflared\/issues\/1534\" rel=\"noopener noreferrer nofollow\">issue #1534<\/a>], \u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u0441 2022\u00a0\u0433\u043e\u0434\u0430: \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0443\u043f\u0430\u0432 \u043d\u0430\u00a0HTTP\/2, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u00a0\u043d\u0451\u043c \u0434\u043e\u00a0\u043f\u043e\u0441\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u044f\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430, \u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00a0\u0431\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0438 \u043f\u0440\u043e\u0448\u043b\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0430\u043a \u043d\u043e\u0447\u044c\u044e \u043d\u0430\u00a0\u043f\u043e\u043b\u043c\u0438\u043d\u0443\u0442\u044b \u0441\u043b\u043e\u0432\u0438\u043b udp\u2011\u0437\u0430\u0442\u044b\u043a, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430\u00a0\u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e\u2011\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u043d\u0435\u00a0\u0441\u0434\u0435\u043b\u0430\u0435\u0442 systemctl restart. \u0421\u0430\u043c cloudflared \u043e\u0431\u00a0\u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0430\u043a \u043d\u0435\u00a0\u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0442 (\u043b\u0438\u0448\u044c \u0440\u043e\u043d\u044f\u0435\u0442 \u0432\u00a0\u043b\u043e\u0433 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443) \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0438\u0445\u043e \u0436\u0438\u0432\u0451\u0442 \u043d\u0430\u00a0HTTP\/2.<\/p>\n<p>\u0420\u0430\u0437 \u043f\u0430\u0446\u0430\u043d\u044b \u0438\u0437\u00a0Cloudflare \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430\u00a0\u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u043d\u0435\u00a0\u0440\u0435\u0448\u0438\u043b\u0438, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 cfzt. \u041f\u043b\u0430\u043d\u00a0\u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0432:<\/p>\n<p>1. \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u00a0\u043b\u043e\u0433\u0435 cloudflared \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 Switching to fallback protocol http2\u00a0\u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f, \u043d\u0435\u00a0\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f\u0441\u044f \u0433\u043e\u0434\u0430\u043c\u0438 \u0444\u0440\u0430\u0437\u0430 (\u0447\u0435\u043a\u043d\u0443\u043b \u0432\u00a0\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043e\u0442\u00a0\u0432\u0435\u0440\u0441\u0438\u0438 2022.4\u00a0\u0434\u043e 2025.9, \u0442\u0435\u043a\u0441\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d).<\/p>\n<p>2. \u041f\u0440\u0438\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u00a0\u0434\u0435\u0440\u0433\u0430\u0442\u044c \u0440\u0435\u0441\u0442\u0430\u0440\u0442 \u0441\u0440\u0430\u0437\u0443 (\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u00a0HTTP\/2), \u0430\u00a0\u0436\u0434\u0430\u0442\u044c \u0431\u044d\u043a\u043e\u0444\u0444\u2011\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f cloudflared \u0437\u0430\u043d\u043e\u0432\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u00a0\u043f\u043e\u043f\u044b\u0442\u043a\u0438 quic.<\/p>\n<p>3. \u0411\u044d\u043a\u043e\u0444\u0444 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e: 10\u00a0\u043c\u0438\u043d\u0443\u0442, 20, 40, 60, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u0434\u043e\u043b\u0431\u0438\u0442\u044c \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430\u043c\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u0443\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e udp \u0441\u043b\u043e\u043c\u0430\u043d \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0440\u0435\u0436\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e)\u00a0\u2014 \u0442\u0430\u043a\u043e\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0448\u0430\u043d\u0441 \u043d\u0430\u00a0\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437 \u0432\u00a0\u0447\u0430\u0441, \u0430\u00a0\u043d\u0435\u00a0\u0437\u0430\u0444\u043b\u0430\u043f\u0430\u043d \u0434\u043e\u00a0\u0434\u044b\u0440. <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043b\u0433\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043d\u0435\u00a0\u0440\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 <code>zt doctor<\/code>. \u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c\u00a0\u2014 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043a:<\/p>\n<pre><code>func scanLogTail(path string, fromOffset int64) (scanResult, error) {    f, err := os.Open(path)    ...    info, _ := f.Stat()    if info.Size() &lt; fromOffset {        fromOffset = 0    }    f.Seek(fromOffset, 0)    found := false    scanner := bufio.NewScanner(f)    for scanner.Scan() {        if strings.Contains(scanner.Text(), \"Switching to fallback protocol http2\") {            found = true        }    }    return scanResult{fallbackDetected: found, newOffset: info.Size()}, nil}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u00a0\u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0442\u00a0\u0441\u0430\u043c\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00a0\u2014 \u0447\u0438\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0431\u0435\u0437\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043b\u043e\u0433\u0430 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0435\u0439\u0441:<\/p>\n<pre><code>func Evaluate(ts *TunnelState, logPath string, now time.Time) (Decision, error) {    result, _ := scanLogTail(logPath, ts.LastLogOffset)    ts.LastLogOffset = result.newOffset    if !result.fallbackDetected {        resetBackoff(ts)        return Decision{}, nil    }    backoff := ts.CurrentBackoff    if backoff &lt;= 0 { backoff = MinBackoff }    if !ts.LastRestartAt.IsZero() &amp;&amp; now.Sub(ts.LastRestartAt) &lt; backoff {        return Decision{Reason: \"fallback detected but within backoff window\"}, nil    }    return Decision{ShouldRestart: true, Reason: \"QUIC fallback detected \u2014 restarting\"}, nil}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441\u00a0\u2014 \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u043e\u0442\u0447\u0434\u043e\u0433\u0430. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 ~\/.zt\u2011state.json \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 (<code>up, down, list<\/code>) \u0431\u0435\u0437\u00a0\u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u043e\u0442\u0447\u0434\u043e\u0433\u2011\u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442\u0438\u043a\u0430\u044e\u0449\u0438\u0439 \u043a\u0430\u0436\u0434\u044b\u0435 30\u00a0\u0441\u0435\u043a\u0443\u043d\u0434, \u043d\u0430\u0447\u043d\u0451\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430\u00a0\u0436\u0435\u00a0\u2014 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043e\u043d\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0437\u0430\u00a0\u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b. \u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 ~\/.zt\u2011watchdog\u2011state.json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u043e\u0433\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c \u0432\u043e\u0442\u0447\u0434\u043e\u0433, \u043d\u0438\u043a\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043b\u043e\u043a\u043e\u0432 \u0438\u043b\u0438\u00a0\u0431\u043e\u043b\u0435\u0435 \u0442\u044f\u0436\u0435\u043b\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0430\u043c \u0432\u043e\u0442\u0447\u0434\u043e\u0433\u2011\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u00a0\u0435\u0449\u0451 \u043e\u0434\u0438\u043d systemd user unit (zt\u2011watchdog.service), \u043e\u0431\u0449\u0438\u0439 \u043d\u0430\u00a0\u0432\u0441\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0441\u0440\u0430\u0437\u0443\u00a0\u2014 \u043d\u0435\u00a0\u043f\u043e\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u043f\u043b\u043e\u0434\u0438\u0442\u044c\u00a0\u043b\u0438\u0448\u043d\u0438\u0445 systemd \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432:<\/p>\n<pre><code>zt watchdog enable   # \u0441\u0442\u0430\u0432\u0438\u0442 \u0438 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 systemd unit, \u0447\u0435\u043a \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043azt watchdog status   # running \/ stoppedzt watchdog disable  # \u0441\u043d\u0438\u043c\u0430\u0435\u0442 unit<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430: \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 udp \u043d\u0430\u00a0\u043f\u043e\u0440\u0442 7844\u00a0(<code>iptables -A OUTPUT -p udp --dport 7844 -j DROP<\/code>), \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u00a0\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430\u00a0HTTP\/2\u00a0\u0432\u00a0\u043b\u043e\u0433\u0435, \u0441\u043d\u0438\u043c\u0430\u0435\u043c \u0431\u043b\u043e\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0435\u2011\u0442\u043e \u0432\u0440\u0435\u043c\u044f (\u0434\u043e 10\u00a0\u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u00a0\u0434\u0435\u0444\u043e\u043b\u0442\u0443) \u0432\u043e\u0442\u0447\u0434\u043e\u0433 \u0434\u0435\u0440\u0433\u0430\u0435\u0442 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438 \u0432\u00a0\u043b\u043e\u0433\u0435 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 quic\u2011\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u0427\u0442\u043e\u00a0\u0434\u0430\u043b\u044c\u0448\u0435.<\/strong><\/p>\n<p>\u0418\u0437\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e \u043e\u0442\u043b\u043e\u0436\u0438\u043b: \u044f\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IPv6\u00a0\u0434\u043b\u044f\u00a0origin\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u0430 (\u0441\u0435\u0439\u0447\u0430\u0441 \u0436\u0451\u0441\u0442\u043a\u043e \u0437\u0430\u0448\u0438\u0442 localhost, \u0447\u0442\u043e\u00a0\u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f\u00a0\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432\u00a0IPv6-only docker \u0441\u0435\u0442\u044f\u0445), \u0438 \u0448\u044d\u0440\u0438\u043d\u0433 \u043e\u0434\u043d\u043e\u0433\u043e cloudflared\u2011\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0435\u0434\u0438\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0441\u00a0\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0433\u0440\u0435\u0441\u0441\u2011\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u00ab\u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441\u00a0\u2014 \u043e\u0434\u0438\u043d \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u00a0\u2014 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u00bb. \u0412\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043a\u0430 \u043d\u0435\u00a0\u0434\u0435\u043b\u0430\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u0440\u0430\u0434\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 systemd\u2011\u044e\u043d\u0438\u0442\u043e\u0432, \u0430\u00a0\u043f\u0440\u043e\u0444\u0438\u0442\u0430 \u043d\u0430\u00a0\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u0445\u043e\u0443\u043c \u043b\u0430\u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>\u041f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/github.com\/casablanque-code\/cfzt\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430\u00a0Go, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u00a0Linux\/macOS\/Windows, \u0440\u0435\u043b\u0438\u0437\u044b \u0441\u00a0\u0447\u0435\u043a\u0441\u0443\u043c\u043c\u0430\u043c\u0438 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u0440\u0433\u0435\u0442.<\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438! <\/p>\n<\/div>\n<p>\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\/1050380\/\">https:\/\/habr.com\/ru\/articles\/1050380\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0443\u00a0\u043c\u0435\u043d\u044f \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432: Grafana, Zabbix, n8n, Navidrome, ollama, \u0411\u0414, \u043f\u0430\u0440\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 API. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430\u0440\u0443\u0436\u0443, \u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0434\u0430\u0448\u0431\u043e\u0440\u0434 Cloudflare \u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442\u00a0\u0436\u0435 \u043f\u0443\u0442\u044c: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c ingress\u2011\u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Zero Trust Access. \u041c\u0438\u043d\u0443\u0442 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u0435\u0437\u00a0\u043e\u0448\u0438\u0431\u043e\u043a. \u0421\u00a0\u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u043e\u0434\u0438\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 tunnel ID \u043b\u043e\u043c\u0430\u0435\u0442 \u0432\u0441\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.\u041d\u0430\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u0440\u0430\u0437 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e\u00a0\u044d\u0442\u043e \u0440\u0443\u0442\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u00a0\u043e\u0434\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f cfzt\u00a0\u2014 CLI \u043d\u0430\u00a0Go, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u043c\u0435\u0435\u0442:zt up grafana 3000\u0418 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 grafana.domain.com \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 localhost:3000 \u0447\u0435\u0440\u0435\u0437 Cloudflare Tunnel, \u0441\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c Zero Trust Access \u0438 systemd \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0435\u0442 \u0440\u0435\u0431\u0443\u0442.\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u00a0\u043d\u0443\u043b\u044f \u0434\u043e\u00a0\u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 health\u2011\u0447\u0435\u043a\u0430\u0412\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0\u2014 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u043f\u0440\u0438\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u00a0\u2014 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u00a0\u0431\u0430\u0433 \u0432\u00a0\u0441\u0430\u043c\u043e\u043c cloudflared, \u0438\u0437\u2011\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u0442\u0447\u0434\u043e\u0433\u2011\u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u00a0Tailscale \u0438\u043b\u0438\u00a0\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0432\u0435\u0440\u0441\u2011\u043f\u0440\u043e\u043a\u0441\u0438? \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a\u00a0\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0451, \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430\u00a0\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. Tailscale\u00a0\u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u0434\u043b\u044f\u00a0\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 mesh\u2011\u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0438\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043d\u043e\u00a0\u043d\u0435\u00a0\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445\u00a0\u043b\u0438\u0446 \u0441\u00a0\u043d\u0430\u0432\u0435\u0448\u0430\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0434\u0430\u00a0\u0438 \u0441\u0430\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0440\u0443\u0433\u0430\u044f: \u044d\u0442\u043e VPN, \u0430\u00a0\u043d\u0435\u00a0\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0432\u0435\u0440\u0441 \u0441\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 HTTP. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 nginx \u0438\u043b\u0438\u00a0caddy + dns\u00a0\u2014 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 80\/443\u00a0\u043d\u0430\u0440\u0443\u0436\u0443, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043b\u0438\u00a0DDNS \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432. \u0414\u043b\u044f\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u00a0NAT \u0431\u0435\u0437\u00a0\u0431\u0435\u043b\u043e\u0433\u043e \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a\u0430 \u044d\u0442\u043e \u0438\u043b\u0438\u00a0\u043d\u0435\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u043b\u0438\u00a0\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u043e\u0432 \u043d\u0430\u00a0\u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u0447\u0435\u0433\u043e \u044f \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c.Cloudflare Tunnel \u0447\u0435\u0440\u0435\u0437 cloudflared\u00a0\u2014 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u00a0edge Cloudflare, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432, TLS \u0438\u0437\u00a0\u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043f\u043b\u044e\u0441 Zero Trust Access \u043a\u0430\u043a\u00a0\u0441\u043b\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u0430\u043c\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c. \u041c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d\u00a0\u2014 UX. cloudflared tunnel create, cloudflared tunnel route dns, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 access \u0447\u0435\u0440\u0435\u0437 wrangler \u0438\u043b\u0438\u00a0\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u00a0\u2014 \u044d\u0442\u043e \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043a\u043b\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043d\u0443\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u0435\u0449\u0435 \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438.cfzt\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0435\u0439\u043a\u0430 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u00a0\u043e\u0434\u0438\u043d workflow \u0441\u00a0\u043e\u0442\u043a\u0430\u0442\u043e\u043c \u043f\u0440\u0438\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u043c \u0448\u0430\u0433\u0435.\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430: \u0447\u0442\u043e\u00a0\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u00a0\u043e\u0434\u0438\u043d zt up\u041f\u043e\u0434\u00a0\u043a\u0430\u043f\u043e\u0442\u043e\u043c zt up &lt;service_name&gt; &lt;port&gt; \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043a\u00a0Cloudflare API \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0433\u0438 \u043f\u0440\u0438\u00a0\u043e\u0448\u0438\u0431\u043a\u0435. \u0412\u043e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:func createTunnel(opts tunnelOpts) error {    cfg, _ := config.Load()    store, _ := state.LoadStore()    cf := cloudflare.NewClient(cfg.APIToken, cfg.AccountID)    hostname := opts.name + &#171;.&#187; + cfg.Domain    zoneID, _ := cf.GetZoneID(cfg.Domain)    \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c    tunnelID, credJSON, _ := cf.CreateTunnel(opts.name)    rollback := func(dnsRecordID, accessAppID string) {        if accessAppID != &#171;&#187; { cf.DeleteAccessApp(accessAppID) }        if dnsRecordID != &#171;&#187; { cf.DeleteDNSRecord(zoneID, dnsRecordID) }        cf.DeleteTunnel(tunnelID)        cloudflared.CleanTunnelFiles(opts.name)        service.Uninstall(opts.name)    }    \/\/ \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0433\u0440\u0435\u0441\u0441    if err := cf.ConfigureTunnel(tunnelID, hostname, opts.port); err != nil {        rollback(&#171;&#187;, &#171;&#187;)        return err    }    \/\/ \u043f\u0438\u0448\u0435\u043c cname    dnsRecordID, _ := cf.UpsertCNAME(zoneID, hostname, tunnelID)    \/\/ \u0435\u0441\u043b\u0438 \u043d\u0435 &#8212;public, \u0441\u043e\u0437\u0434\u0430\u0451\u043c zero trust access app + bypass policy    var accessAppID string    if !opts.public {        accessAppID, _ = cf.UpsertAccessApp(hostname, opts.name)        cf.CreateBypassPolicy(accessAppID, opts.emails)    }    \/\/ \u043f\u0438\u0448\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 config.yml \u0434\u043b\u044f cloudflared    cfgPath, _ := cloudflared.WriteTunnelConfig(tunnelID, opts.name, hostname, opts.port, opts.protocol, credJSON)    \/\/ \u0441\u0442\u0430\u0432\u0438\u043c systemd user unit    service.Install(opts.name, cfgPath, logPath)    \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 ~\/.zt-state.json    store.Set(&amp;state.Tunnel{Name: opts.name, TunnelID: tunnelID, &#8230;})    store.Save()    return nil}\u0412\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u00a0\u2014 \u0440\u043e\u043b\u043b\u0431\u044d\u043a. \u0415\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0448\u0430\u0433 4\u00a0\u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u0437\u2011\u0437\u0430 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e email \u0432 \u2011allow, \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 DNS\u2011\u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0441\u0430\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u0430\u00a0\u043d\u0435\u00a0\u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u0438\u0441\u0435\u0442\u044c \u043f\u043e\u043b\u0443\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u043c\u0443\u0441\u043e\u0440\u043e\u043c \u0432\u00a0\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435. \u0411\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u00a0\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0431\u0435\u0437\u00a0DNS \u0438 DNS\u2011\u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0435\u0437\u00a0\u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439, \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0438 \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0442\u043e\u043c \u0440\u0443\u043a\u0430\u043c\u0438 \u0442\u043e \u0435\u0449\u0435 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435.\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0433\u0440\u0435\u0441\u0441\u2011\u043a\u043e\u043d\u0444\u0438\u0433\u00a0\u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 yaml, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 cloudflared \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u043e:tunnel: &lt;tunnel-id&gt;credentials-file: \/home\/user\/.zt\/tunnels\/grafana\/&lt;tunnel-id&gt;.jsoningress:  &#8212; hostname: grafana.domain.com    service: http:\/\/localhost:3000  &#8212; service: http_status:404\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 ~\/.zt\u2011state.json\u00a0\u2014 \u043f\u043b\u043e\u0441\u043a\u043e\u043c jsone \u0441\u00a0\u043c\u0430\u043f\u043f\u0438\u043d\u0433\u043e\u043c \u0438\u043c\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f, \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 (\u0430\u0439\u0434\u0438, \u043f\u043e\u0440\u0442, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0441\u0442\u0430\u0442\u0443\u0441). \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 zt down grafana \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0441\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0431\u0435\u0437\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u00a0API \u043d\u0430\u00a0\u043f\u043e\u0438\u0441\u043a. \u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 1: build tags \u0438 \u043a\u0440\u043e\u0441\u0441\u2011\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u00a0Linux, macOS \u0438 Windows (\u0445\u043e\u0442\u044f \u043d\u0430\u00a0Windows \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438, cloudflared \u0442\u0430\u043c \u0431\u0435\u0437\u00a0\u0434\u0435\u043c\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438). \u0414\u043b\u044f\u00a0platform\u2011specific \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u00a0\u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \/\/go:build \u0442\u0435\u0433\u0430\u043c\u0438.\u0412\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0437\u0430\u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0433!windows \u0432\u00a0runner \u043f\u0440\u0438\u00a0\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u00a0Linux \u0432\u0441\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u00a0\u2014 runner_windows.go \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u00a0\u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435. \u0410\u00a0\u0432\u043e\u0442 CI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u043e\u0441\u0441\u2011\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0434\u00a0\u0432\u0441\u0435 \u0442\u0440\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u0437\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u043d\u0435\u0440\u0430, \u0443\u043f\u0430\u043b \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439:internal\/cloudflared\/runner_windows.go:7:6: Start redeclared in this block    internal\/cloudflared\/runner.go:12:6: other declaration of Startinternal\/cloudflared\/runner.go:26:41: unknown field Setsid in struct literal of type syscall.SysProcAttr\u0412\u0442\u043e\u0440\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u043f\u0435\u0440\u0432\u043e\u0439. syscall.SysProcAttr.Stesid\u00a0\u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0435, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u0434\u043b\u044f\u00a0unix (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 cloudflared \u0432\u00a0\u043d\u043e\u0432\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e, \u043e\u0442\u0432\u044f\u0437\u0430\u0432 \u043e\u0442\u00a0\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430). \u041d\u0430\u00a0\u0432\u0438\u043d\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043d\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438\u00a0\u0431\u044b \u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0438\u043c\u0435\u043d, \u043a\u043e\u0434 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u00a0\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f\u00a0\u0431\u044b. Build tags\u00a0\u2014 \u044d\u0442\u043e \u043d\u0435\u00a0\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u0440\u0436\u0430\u0442\u044c platform\u2011specific \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0431\u0438\u043d\u0430\u0440\u0435 \u0431\u0435\u0437\u00a0ifdef\u2011\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438.\u0424\u0438\u043a\u0441\u00a0\u2014 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043d\u043e\u00a0\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 go build \u043d\u0430\u00a0\u0442\u0432\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043d\u0435\u00a0\u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e\u00a0CI \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c.\u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 2: secrets \u0432\u00a0Terraform state \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0431\u0435\u0437\u00a0\u043a\u0440\u0435\u0434\u043e\u0432. \u041a\u043e\u0433\u0434\u0430 \u044f \u0434\u0443\u043c\u0430\u043b \u043d\u0430\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0431\u044d\u043a\u0430\u043f\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (zt export \/ zt apply), \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f\u00a0\u0431\u044b\u043b\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0Terraform, \u0431\u043b\u0430\u0433\u043e \u0443\u00a0Cloudflare \u0435\u0441\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u041d\u043e\u00a0\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0441\u043f\u043b\u044b\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: cloudflared tunnel create \u0447\u0435\u0440\u0435\u0437 API \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 tunnel_secret\u00a0\u2014 \u043a\u0440\u0435\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043f\u0430\u0441\u0442\u044c\u00a0\u043b\u0438\u0431\u043e \u0432\u00a0Terraform state (\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e\u00a0\u0441\u0435\u043a\u0440\u0435\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432\u00a0\u0444\u0430\u0439\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0441\u0442\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u044f\u0442 \u0438\u043b\u0438\u00a0\u0445\u0440\u0430\u043d\u044f\u0442 \u0432\u00a0S3\u00a0\u0431\u0435\u0437\u00a0\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f),\u00a0\u043b\u0438\u0431\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u0432\u00a0\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u043d\u0441\u0438\u0442\u0438\u0432\u2011\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0434\u043b\u044f\u00a0\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.\u0414\u043b\u044f\u00a0\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044d\u0442\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e Terraform \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 yaml\u2011\u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435\u00a0\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0440\u0435\u0434\u044b \u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0430\u0439\u0434\u0438:services:  grafana:    port: 3000  portainer:    docker: true    allow:      &#8212; mail@domain.com  api:    port: 8080    public: true\u041a\u0440\u0435\u0434\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432 ~\/.zt\u2011config.json (\u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 zt init \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e), \u0430\u00a0\u0441\u0430\u043c zt.yaml \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u0432\u00a0\u0433\u0438\u0442\u00a0\u2014 \u0442\u0430\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435, \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u00a0\u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u0442\u0443, \u0441\u00a0\u043a\u0430\u043a\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430.zt apply zt.yaml \u043d\u0430\u00a0\u043d\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u0438\u0444\u0444 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043d\u043e\u00a0\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438 \u043d\u0435\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:for _, name := range toCreate {    svc := m.Services[name]    port, err := resolveApplyPort(name, svc)    &#8230;    createTunnel(tunnelOpts{        name: name, port: port, protocol: protocol,        public: svc.Public, emails: svc.Allow, docker: svc.Docker,    })}\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432\u043d\u0430\u0447\u0430\u043b\u0435, \u043d\u043e\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u044f\u0432\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0434\u044b\u00bb: \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 state.Tunnel \u0438\u043b\u0438\u00a0\u043b\u0430\u0439\u0432\u2011\u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u00a0Cloudflare API. \u0412\u044b\u0431\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u043e\u0435\u00a0\u2014 state.Tunnel \u0443\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435 (\u043f\u043e\u0440\u0442, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, public\/allow), \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0430 \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438\u0441\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0442\u0435\u0440\u044f\u043b\u0438\u0441\u044c. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u00a0\u0434\u0432\u0430 json\u2011\u043f\u043e\u043b\u044f \u0440\u0435\u0448\u0438\u043b\u043e \u044d\u0442\u043e \u0431\u0435\u0437\u00a0\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438\u00a0\u2014 \u0441\u0442\u0430\u0440\u044b\u0435 ~\/.zt\u2011state.json \u0431\u0435\u0437\u00a0\u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f zero\u2011value. \u0413\u0440\u0430\u0431\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 3: cloudflared \u043d\u0435\u00a0\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0quic \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442\u0447\u0434\u043e\u0433.\u0421\u0430\u043c\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. cloudflared \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043b\u044f\u00a0\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u00a0edge Cloudflare: QUIC (\u043f\u043e\u0432\u0435\u0440\u0445 UDP,\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 DNS) \u0438 HTTP\/2\u00a0(\u043f\u043e\u0432\u0435\u0440\u0445 TCP, fallback \u0434\u043b\u044f\u00a0\u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0433\u0434\u0430 UDP \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u00a0\u2014 \u0447\u0430\u0441\u0442\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0432\u00a0\u043a\u043e\u0440\u043f. \u0441\u0435\u0442\u044f\u0445). \u041f\u043e\u00a0\u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u2011protocol auto, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0440\u0435\u0448\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.\u041b\u043e\u0433\u0438\u043a\u0430 \u0444\u043e\u043b\u043b\u0431\u044d\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 cloudflared \u043d\u0435\u00a0\u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c udp\u2011\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043e\u043d \u043c\u043e\u043b\u0447\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0HTTP\/2. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u00a0\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438\u00a0\u2014 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u00a0quic \u043e\u043d \u043d\u0435\u00a0\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0435\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0431\u0430\u0433 \u0432\u00a0\u0441\u0430\u043c\u043e\u043c cloudflared [issue #1534], \u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u0441 2022\u00a0\u0433\u043e\u0434\u0430: \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0443\u043f\u0430\u0432 \u043d\u0430\u00a0HTTP\/2, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u00a0\u043d\u0451\u043c \u0434\u043e\u00a0\u043f\u043e\u0441\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u044f\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430, \u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00a0\u0431\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0438 \u043f\u0440\u043e\u0448\u043b\u043e.\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0430\u043a \u043d\u043e\u0447\u044c\u044e \u043d\u0430\u00a0\u043f\u043e\u043b\u043c\u0438\u043d\u0443\u0442\u044b \u0441\u043b\u043e\u0432\u0438\u043b udp\u2011\u0437\u0430\u0442\u044b\u043a, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430\u00a0\u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e\u2011\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u043d\u0435\u00a0\u0441\u0434\u0435\u043b\u0430\u0435\u0442 systemctl restart. \u0421\u0430\u043c cloudflared \u043e\u0431\u00a0\u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0430\u043a \u043d\u0435\u00a0\u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0442 (\u043b\u0438\u0448\u044c \u0440\u043e\u043d\u044f\u0435\u0442 \u0432\u00a0\u043b\u043e\u0433 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443) \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0438\u0445\u043e \u0436\u0438\u0432\u0451\u0442 \u043d\u0430\u00a0HTTP\/2.\u0420\u0430\u0437 \u043f\u0430\u0446\u0430\u043d\u044b \u0438\u0437\u00a0Cloudflare \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430\u00a0\u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u043d\u0435\u00a0\u0440\u0435\u0448\u0438\u043b\u0438, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 cfzt. \u041f\u043b\u0430\u043d\u00a0\u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0432:1. \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u00a0\u043b\u043e\u0433\u0435 cloudflared \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 Switching to fallback protocol http2\u00a0\u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f, \u043d\u0435\u00a0\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f\u0441\u044f \u0433\u043e\u0434\u0430\u043c\u0438 \u0444\u0440\u0430\u0437\u0430 (\u0447\u0435\u043a\u043d\u0443\u043b \u0432\u00a0\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043e\u0442\u00a0\u0432\u0435\u0440\u0441\u0438\u0438 2022.4\u00a0\u0434\u043e 2025.9, \u0442\u0435\u043a\u0441\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d).2. \u041f\u0440\u0438\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u00a0\u0434\u0435\u0440\u0433\u0430\u0442\u044c \u0440\u0435\u0441\u0442\u0430\u0440\u0442 \u0441\u0440\u0430\u0437\u0443 (\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u00a0HTTP\/2), \u0430\u00a0\u0436\u0434\u0430\u0442\u044c \u0431\u044d\u043a\u043e\u0444\u0444\u2011\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-484516","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/484516","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=484516"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/484516\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=484516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=484516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=484516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}