{"id":390014,"date":"2024-06-29T08:58:49","date_gmt":"2024-06-29T08:58:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=390014"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=390014","title":{"rendered":"<span>\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u043b\u0438\u0446\u043e\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0438\u043b\u0438 <\/p>\n<h3>\u0412\u0435\u0431 \u043c\u043e\u0440\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u0435\u043b\u043e\u043a <\/h3>\n<p><sup>(\u043f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442)<\/sup><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0443\u0441\u043f\u0435\u0445\u0438 \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438 data science \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0443\u043a \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0441\u0442\u0430\u0434\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438 \u0441\u043b\u043e\u0432\u0430. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0441\u0435\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0451 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0439, \u0431\u044b\u0441\u0442\u0440\u0435\u0439 (\u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u043a\u0430) \u041c\u043e\u0436\u043d\u043e \u0438 \u0441 AI, \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 AI, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0443!<\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0432\u0430\u0442\u0430 \u0434\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0439 \u043f\u043b\u0438\u043d\u0442\u0443\u0441\u0430. \u041e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432. \u0412\u0441\u0451 \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445.<\/p>\n<p>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043d\u0430 \u043f\u043e\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0435\u0439 \u0434\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0412\u0441\u0451 \u044f\u0441\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0431\u043e\u0437\u0440\u0438\u043c\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0433\u043e\u0434\u0430\u043c\u0438. \u0418 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0441\u0432\u043e\u0451\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0431\u044b \u0447\u0442\u043e \u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0443\u0442 \u0432\u0441\u0451 \u0432 \u043a\u0443\u0447\u0435, \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b &#8212; \u044f\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0443\u0434\u0430 \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439, \u043a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c web \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a \u043f\u0438\u0442\u043e\u043d\u0443 \u0432 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u043b\u043d\u043e, \u043d\u043e \u0434\u044c\u044f\u0432\u043e\u043b \u0442\u043e \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u043c\u0435\u043b\u043e\u0447\u0430\u0445. \u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0435\u0431\u043c\u043e\u0440\u0434\u0443 \u0432 10 \u0441\u0442\u0440\u043e\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e \u043e\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u0432\u0430\u043c \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u044f\u043c\u043e\u0439 IP \u0438 \u0432\u0441\u0435 \u0431\u043e\u0442\u044b \u043c\u0438\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043d\u0435\u0433\u043e \u0441\u0442\u0443\u0447\u0430\u0442\u044c, \u043e\u0442\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443\u0448\u043b\u044b\u0439 \u043a\u0430\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u043b\u0435\u0437\u0435\u0442! \u041d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f! \u041d\u0443\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0441\u0442\u0440\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u041a\u043e\u0434, \u0441\u0432\u043e\u0439, \u0435\u0449\u0451 \u043d\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435\u0437\u0430\u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0447\u0435\u043d\u044b\u0439, \u0437\u0434\u0435\u0441\u044c \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043d\u043e\u0441\u0438\u043c \u043c\u043e\u0440\u0434\u0443 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u0435\u0451 \u0438 \u0441\u0442\u0440\u043e\u0438\u043c \u043a \u043d\u0435\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c. <\/p>\n<p>\u041f\u043e\u043a\u0443\u043f\u0430\u0435\u043c\/\u0430\u0440\u0435\u043d\u0434\u0443\u0435\u043c\/\u0431\u0435\u0440\u0451\u043c_\u0432_\u0434\u0430\u0440 VDS, \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u0445\u043e\u043d\u044c\u043a\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 KVM, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u043c FreeBSD. \u0418\u0445 \u043a\u0430\u043a-\u0442\u043e \u0432 \u0441\u0435\u0442\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0438 \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0442\u0440\u044e\u043a\u0438 \u043d\u0430 FreeBSD \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e \u0438 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e. (\u0418 \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 512, \u0430 \u0442\u043e \u0438 \u0432 128 \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u043e \u043f\u043e \u0434\u0435\u043d\u044c\u0433\u0430\u043c).<\/p>\n<p>\u0422\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0445, \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 &#8212; OpenVPN. \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421 \u043a \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0430 FreeBSD.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0443\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0430 \u0433\u0434\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0433\u0434\u0435 \u043a\u043b\u0438\u0435\u043d\u0442? \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0430 VDS \u0443 \u043c\u0435\u043d\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 VPN. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0430, \u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u043d\u0435 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u041d\u043e, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d, \u0442\u043e \u044f \u043f\u043e\u0442\u0435\u0440\u044f\u044e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c VDS \u0438 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u0432\u043d\u0443\u0442\u0440\u044c, \u043a \u0441\u0443\u043f\u0435\u0440\u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0441\u0432\u043e\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0438 \u043a \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0435\u0441\u0442\u044c, \u0432 \u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u043c \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438, \u0442\u043e \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0432\u0437\u043b\u043e\u043c\u0435 \u0435\u0433\u043e, \u0443\u0442\u0435\u043a\u0443\u0442 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0445\u0430\u043a\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0412 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432, \u0432\u0441\u0435 \u043d\u0430\u0433\u043b\u0443\u0445\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u0437\u0432\u043d\u0435, \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 VPN \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443 \u0434\u043b\u044f FastCGI.<\/p>\n<p>\u0418\u0442\u0430\u043a \u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 VSD \u0441 FreeBSD \u043e\u0431\u044b\u0447\u043d\u044b\u0439 web \u0441\u0435\u0440\u0432\u0435\u0440 lighttpd, \u043e\u0431\u044b\u0447\u043d\u044b\u0439 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c FastCGI \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 openvpn \u043d\u0430 \u0441\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043b\u0441\u044f \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0438\u0440\u0443, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043c\u0438\u0440. \u041d\u043e \u0432\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: &#8212; \u0430 \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430? \u0415\u0441\u043b\u0438 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e, \u0442\u043e \u0442\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &#8212; \u043f\u0440\u044f\u043c\u043e\u0439 IP \u0438 \u0441\u043e\u0431\u043b\u0430\u0437\u043d \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u044f\u043c\u043e\u0439, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u0443\u0434\u0430 \u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0438 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VPN \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e scp \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 FreeBSD \u0438 \u043e\u0442\u0442\u0443\u0434\u0430 \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0435\u043c \u0436\u0435 lighttpd. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0438 \u0447\u0435\u0440\u0435\u0437 10 \u043c\u0438\u043d\u0443\u0442 \u0443\u0434\u0430\u043b\u0438\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u0433\u043e, \u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043d\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<p>\u041e\u0442\u0434\u0430\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, lighhtpd \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u043f\u0440\u043e\u0441\u0430 \u0441 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 &#8212; \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e? \u041e\u0442\u0432\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0435\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u043e FastCGI \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b. \u041c\u0430\u043b\u043e \u043b\u0438, \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 )) \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043e\u0442\u0432\u043b\u0435\u043a\u043b\u0438, \u043f\u043e\u043e\u0431\u0435\u0434\u0430\u0442\u044c \u0443\u0448\u0451\u043b \u0438 \u0442.\u0434. \u0421\u0435\u0441\u0441\u0438\u044f \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043b\u0430\u0441\u044c \u0438 \u0447\u0442\u043e \u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0430 \u043d\u043e\u0432\u0430\u044f, \u0432\u043e\u0442 \u0432 \u043d\u043e\u0432\u043e\u043c FastCGI \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u0438 \u0432\u0441\u044f \u0438\u043d\u0444\u043e \u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430.<\/p>\n<p>\u041d\u0443 \u0438 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><a href=\"https:\/\/github.com\/ChePeter\/funhouse_mirror\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441 Github<\/a><\/p>\n<p>\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443: <a href=\"http:\/\/107.189.8.250\/\" rel=\"noopener noreferrer nofollow\">http:\/\/107.189.8.250\/<\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0415\u0449\u0451 \u0440\u0430\u0437 &#8212; \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0430\u0432\u043a\u0438 \u0438 \u043a\u0440\u0438\u0442\u0438\u043a\u0443.<\/p>\n<h2>FreeBSD \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0438<\/h2>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c FreeBSD \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \/etc\/rc.conf<\/p>\n<pre><code class=\"bash\">sendmail_enable=\"NONE\" hostname=\"fun-house-serv.mirror\" ifconfig_vtnet0=\"inet 107.189.8.250 netmask 255.255.255.0\" defaultrouter=\"107.189.8.1\" pf_enable=\"YES\" pf_rules=\"\/etc\/pf.conf\" pflog_enable=\"YES\"  gateway_enable=\"YES\" sshd_enable=\"YES\"  lighttpd_enable=\"YES\" # Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable dumpdev=\"AUTO\"  openvpn_enable=\"YES\" openvpn_configfile=\"\/usr\/local\/etc\/openvpn\/server.conf\" openvpn_dir=\"\/usr\/local\/etc\/openvpn\"<\/code><\/pre>\n<p> \u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u043b<\/p>\n<pre><code class=\"bash\">log_opt = \"log\" ext_if=\"vtnet0\" int_if=\"tun0\" icmp_types=\"echoreq\"  #block all set skip on lo set skip on int_if scrub in  block in $log_opt on $ext_if pass out keep state  # Protect against spoofing antispoof quick for { lo $int_if }  # Allow other traffic pass in on $ext_if proto tcp to ($ext_if) port ssh flags S\/SA keep state pass in on $ext_if proto tcp to ($ext_if) port http flags S\/SA keep state pass in on $ext_if proto udp to any port 1194 pass in inet proto icmp from ($int_if:network) icmp-type $icmp_types keep state pass in inet proto icmp from ($ext_if:network) icmp-type $icmp_types keep state<\/code><\/pre>\n<p>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u0437\u0432\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e ssh, http \u0438 vpn (1194 \u043f\u043e\u0440\u0442). \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0441 tun0, \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0424\u043e\u0440\u0432\u0430\u0440\u0434\u0438\u043d\u0433 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044e\u0437\u0435\u0440\u0430 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e ssh \u043d\u0430 \u0431\u0435\u0441\u043f\u0430\u0440\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043a\u043b\u044e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b scp \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f. \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0443\u0436\u0435\u043d \u0438 \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u041d\u0443 \u0438 \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u0430\u0440\u043a\u043e\u0437\u044f\u0431\u0440\u043e\u0432 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, <a href=\"https:\/\/unix1.jinr.ru\/~lavr\/vt\/vtcons.html\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c FreeBSD<\/a>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \/boot\/loader.conf:<\/p>\n<pre><code>hw.vga.textmode=1<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u0430\u0432\u0438\u043c lighttpd \u0438 openvpn \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u044e\u0437\u0435\u0440\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 www. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u043f\u0430\u043f\u043a\u0438 lighttpd. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044e\u0437\u0435\u0440\u0430 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c openvpn, \u043b\u0443\u0447\u0448\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 root. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0438 lighttpd \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u043c \u0432\u043e FreeBSD \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u043f\u043a\u0430\u043c. \u041f\u0440\u0430\u0432\u0438\u043c <code>\/usr\/local\/etc\/lighttpd\/lighttpd.conf<\/code><\/p>\n<pre><code class=\"bash\">var.log_root    = \"\/var\/log\/lighttpd\" var.server_root = \"\/usr\/local\/www\/lighttpd\" var.state_dir   = \"\/var\/run\" var.home_dir    = \"\/var\/run\/lighttpd\" var.conf_dir    = \"\/usr\/local\/etc\/lighttpd\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432 lighttpd.conf \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 URL \u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code class=\"bash\">$HTTP[\"host\"] =~ \"107.189.8.250\/*\" {     url.rewrite-once = (         \"^(www\\.)?\\\/upload\\.html$\" => \"\",         \"^(www\\.)?\\\/main\\.fcgi$\" => \"\",         \"^(www\\.)?(.*)?\\.fcgi\\?$\" => \"\",         \"^(www\\.)?\\\/images\\\/(.*)?$\" => \"\",         \"^\/(.*)?\" => \"\/upload.html\"   ) }<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c \u0442\u0430\u043c \u0436\u0435 modules.conf<\/p>\n<pre><code class=\"bash\">server.modules = (   \"mod_rewrite\",   \"mod_access\", #  \"mod_evasive\", #  \"mod_auth\", #  \"mod_authn_file\", #  \"mod_redirect\", #  \"mod_setenv\", #  \"mod_alias\", )<\/code><\/pre>\n<p>\u0438 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u043c \u0436\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>fastcgi<\/code><\/p>\n<pre><code class=\"bash\">## ## FastCGI (mod_fastcgi) ## include \"conf.d\/fastcgi.conf\"<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043c <code>fastcgi.conf<\/code>, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c<\/p>\n<pre><code class=\"bash\">server.modules += ( \"mod_fastcgi\" ) fastcgi.server    = (     \".fcgi\" => (         \"main\" => (             # Use host \/ port instead of socket for TCP fastcgi              \"host\" => \"192.168.0.66\",              \"port\" => 8888,              \"check-local\" => \"disable\",                  )                ) )<\/code><\/pre>\n<p>&#171;192.168.0.66&#187; \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u043e\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043d\u0435\u043c \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u042d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u043c\u043e\u0436\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0430 \u044d\u0442\u043e\u0442 &#171;192.168.0.66&#187; \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 VPN \u0447\u0435\u0440\u0435\u0437 tun0. \u041d\u0443 \u0438 \u043f\u043e\u0440\u0442 8888 \u0432\u044b\u0431\u0440\u0430\u043d \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c jupyter notebook. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0421 \u0438 \u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 1024.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<pre><code class=\"bash\">mkdir \/usr\/local\/www\/data\/ mkdir \/usr\/local\/www\/data\/images chown &lt;user>:www \/usr\/local\/www\/data\/images\/ chmod 710 \/usr\/local\/www\/data\/images\/<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043d\u0430\u0448 &lt;user> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0447\u043b\u0435\u043d\u043e\u043c \u0433\u0440\u0443\u043f\u043f\u044b www \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/usr\/local\/www\/data\/images<\/code> \u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b www \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c OpenVPN, (<a href=\"https:\/\/www.site-motor.ru\/docs\/freebsd\/security_openvpn.html\" rel=\"noopener noreferrer nofollow\">\u0432\u043e\u0442 \u0442\u0443\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439<\/a>), \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f openvpn<\/p>\n<pre><code class=\"bash\">mkdir \/etc\/openvpn mkdir \/etc\/openvpn\/keys mkdir \/var\/log\/openvpn pw useradd -n _openvpn -s \/usr\/bin\/nologin <\/code><\/pre>\n<p><code>_openvpn<\/code> &#8212; \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u044e\u0437\u0435\u0440, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e openvpn \u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 <code>login\/shell\/home_dir<\/code> \u0435\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f nobody.<\/p>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043c <code>\/usr\/local\/etc\/openvpn\/server.conf<\/code><\/p>\n<pre><code class=\"bash\">proto udp port 1194 dev tun0 topology subnet  ca\/usr\/local\/etc\/openvpn\/keys\/ca.crt cert\/usr\/local\/etc\/openvpn\/keys\/server.crt key\/usr\/local\/etc\/openvpn\/keys\/server.key dh\/usr\/local\/etc\/openvpn\/keys\/dh2048.pem  server 10.0.1.0 255.255.255.0 route 192.168.0.0 255.255.255.0 push \"redirect-gateway def1\"  keepalive 10 120 comp-lzo user _openvpn group _openvpn daemon openvpn persist-key persist-tun  tls-server tls-auth \/usr\/local\/etc\/openvpn\/keys\/ta.key 0 verb 3 status \/var\/log\/openvpn\/openvpn-status.log log-append  \/var\/log\/openvpn\/openvpn.log client-config-dir ccd <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u044e\u0447\u0438 \u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430<\/p>\n<pre><code class=\"bash\">drw-------  2 root  wheel  512 24 \u0441\u0435\u043d\u0442. 20:25 keys -rw-r--r--  1 root  wheel  749 18 \u043e\u043a\u0442.  10:17 server.conf <\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u044e\u0447\u0438, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e CN, \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u044e\u0437\u0435\u0440\u0430 \u0438 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 \/usr\/local\/etc\/openvpn\/ccd\/<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a &#8212; \u0432\u0441\u0435 \u0442\u0440\u0438 \u0438\u043c\u0435\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. OpenVPN \u0431\u0435\u0440\u0435\u0442 \u0438\u043c\u044f \u044e\u0437\u0435\u0440\u0430 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0439, \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \/ccd\/&lt;user> \u0438 \u0432\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u0435\u0441\u044c \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 OpenVPN \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0412\u0441\u0451 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>\/usr\/local\/etc\/openvpn\/ccd\/&lt;user><\/code> \u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438<\/p>\n<pre><code>iroute 192.168.0.0 255.255.255.0<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u0442\u044c 192.168.0.0 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 VPN, \u0442\u0443\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 tun0 \u0441\u043b\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e &#8212; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043e\u0442 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044f \u0438 \u043a\u043b\u0430\u0434\u0435\u043c \u0432 \u0444\u0430\u0439\u043b upload.html<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html>  &lt;head>   &lt;meta charset=\"utf-8\">   &lt;meta name=\"google-site-verification\" content=\"VC7sVZeZ-E94q8E9-W-2DzZcuoLwGt9FWaBzN0n2c9c\" \/>   &lt;title>\"send the picture to the house of mirrors\"&lt;\/title>   &lt;h2>\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443&lt;\/h2>   &lt;h2>\u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u043c\u0435\u0442\u0435 SUBMIT&lt;\/h2>   &lt;h1>\u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0430, \u043c\u043e\u0436\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u0435\u0448\u043d\u043e&lt;\/h1>  &lt;\/head>  &lt;body>   &lt;form enctype=\"multipart\/form-data\" action=\"\/main.fcgi\" method=\"post\">    &lt;p>&lt;input type=\"file\" multiple accept=\"image\/*,image\/jpeg\" name=\"f\">    &lt;input type=\"submit\" value=\"SUBMIT\">&lt;\/p>   &lt;\/form>  &lt;\/body> &lt;\/html><\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c 5 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u043e\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b google \u043d\u0430\u0445\u043e\u0434\u0438\u043b \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 http:\/\/107.189.8.250. \u041f\u043e\u0434\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e. \u0415\u0441\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0442\u043e \u043f\u0440\u0430\u0432\u044c\u0442\u0435 accept=&#187;image&#8230;&#187;. \u041d\u0435 \u0441\u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a FastCGI \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0443\u044e. \u041d\u043e \u044d\u0442\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b &#8212; \u0435\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0442\u043e \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430. \u041d\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 &#8230;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0435\u043c FreeBSD \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0436\u0435 \u043c\u044b \u0442\u0430\u043c \u043d\u0430\u0434\u0435\u043b\u0430\u043b\u0438, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u043b\u0438 lighttpd, openvpn? \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b? \u041c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0440\u0442\u044b, \u0432\u0441\u0451 \u0442\u0430\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a\u0443\u043b\u0445\u0430\u0446\u043a\u0435\u0440\u043e\u0432 \u0438 \u0431\u043e\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430.<\/p>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0442\u0440\u0438\u0445 \u044d\u0442\u043e crontab -e \u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c &lt;user> \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u0432\u043e\u0435 \u0438\u043c\u044f, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0447\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u043d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043e\u043b\u0433\u043e. \u041a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043d\u0443\u0442 \u0444\u0430\u0439\u043b\u044b \u0441\u0442\u0430\u0440\u0448\u0435 10 \u043c\u0438\u043d\u0443\u0442 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0422.\u0435. \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 20 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<pre><code class=\"bash\">*\/10    *       *       *       * \/usr\/bin\/find \/usr\/local\/www\/data\/images\/ -user &lt;user> -type f -mmin +10 -deletelete <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u043e\u0441\u044c &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c IP, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0430\u0434\u0440\u0435\u0441. \u0423 \u0432\u0430\u0441 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0430 &lt;user>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0438. \u0415\u0441\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a &#8212; \u043f\u0438\u0448\u0438\u0442\u0435 \u043c\u043d\u0435, \u043c\u043e\u0436\u0435\u0442 \u044f \u0447\u0442\u043e \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u0433\u043b\u044f\u043d\u0443 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Ubuntu<\/h2>\n<p>\u0422\u0443\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u043b\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0438 \u043a\u0440\u0430\u0442\u043a\u043e.<\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f VPN \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/iproute2\/rt_tables<\/code><\/p>\n<pre><code class=\"bash\"># # reserved values # 255local 254main 253default 200vpn 0unspec # # local # #1inr.ruhep <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 200 vpn \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0435 \u0441 vpn \u0447\u0435\u0440\u0435\u0437 tun0 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 tun0. \u041f\u0440\u043e\u0441\u0442\u043e \u0432 \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 (\u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f &lt;user>) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ssh-keygen -t rsa<\/code>\u0438 \u0442\u0430\u043a\u0436\u0435 \u0440\u0443\u0442\u0438\u043d\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0438\u0445 \u043d\u0430 \u043d\u0430\u0448 FreeBSD <code>ssh-copy-id &lt;user>@10.0.1.1<\/code>. \u0413\u0434\u0435 10.0.1.1 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0447\u0435\u0440\u0435\u0437 VPN \u043d\u0430 tun0.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0443\u0442\u0438\u043d\u043d\u043e OpenVPN \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 <code>\/etc\/openvpn\/client\/<\/code><\/p>\n<p>\u044d\u0442\u043e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <code>client_&lt;user>.conf<\/code><\/p>\n<pre><code class=\"bash\">client remote 107.189.8.250 1194 udp  proto udp dev tun0 dev-type tun keepalive 10 120 nobind persist-key persist-tun ns-cert-type server comp-lzo verb 3 script-security 2 route 10.0.1.0 255.255.255.0 10.0.1.5 --route-noexec  ca ca.crt cert &lt;user>.crt key &lt;user>.key  remote-cert-tls server  # If a tls-auth key is used on the server # then every client must also have the key. tls-auth ta.key 1  up \"\/etc\/openvpn\/client\/special_vpn\"  key-direction 1 verb 3 status \/var\/log\/openvpn\/openvpn-status.log log-append  \/var\/log\/openvpn\/openvpn.log <\/code><\/pre>\n<p>\u0438 \u0432 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e \u043a\u043b\u0430\u0434\u0435\u043c \u043a\u043b\u044e\u0447\u0438. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e &lt;user> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0432\u0435\u0437\u0434\u0435, \u0442\u0430\u043c \u043d\u0430 FreeBSD \u0432 \u0442\u0440\u0435\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0438 \u0442\u0443\u0442. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 &lt;user> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a FreeBSD \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430 \u0435\u0451 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>\u0412 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0438\u0442 \u0444\u0430\u0439\u043b \/etc\/openvpn\/client\/special_vpn<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  \/usr\/sbin\/ip rule add from 10.0.1.1 table vpn \/usr\/sbin\/ip route add default via 10.0.1.5 dev tun0 table vpn <\/code><\/pre>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u0435\u0433\u043e \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. OpenVPN \u0430\u0434\u0440\u0435\u0441 10.0.1.1 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 VPN \u0432 \u0441\u0435\u0442\u0438 10.0.1.0, \u0447\u0442\u043e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0430 FreeBSD \u0432 \u0444\u0430\u0439\u043b\u0435 server.conf. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043d\u0438\u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u0434\u0430\u0435\u0442 \u0438 \u043d\u0435 \u0431\u0435\u0440\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 10.0.1.1 \u0438 \u0447\u0435\u0440\u0435\u0437 VPN \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043e \u043c\u0435\u0441\u0442\u0430.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432 \u044d\u0442\u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0443\u0447\u0443 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439, \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e. \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OpenVPN-AS \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0439. \u0418 \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430, \u0445\u043e\u0442\u044f \u043f\u043e\u0447\u0442\u0438 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0430\u044f, \u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e VPN, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u044f\u0434\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432 \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u0440\u0435\u0434\u0443. \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0432\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 &#8212; OpenVPN \u0438 \u044d\u0442\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f <code>gcc -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lpthread -lfcgi -lssl -lcrypto<\/code><\/p>\n<p>\u0418 \u0441\u043e\u0432\u0441\u0435\u043c \u0448\u0442\u0440\u0438\u0445, (fun_house \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u044f \u044e\u0437\u0435\u0440\u0430 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f) \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c crontab -e<\/p>\n<pre><code class=\"bash\">@reboot \/home\/fun_house\/funhouse.sh<\/code><\/pre>\n<p>\u0418 \u0432 \u0444\u0430\u0439\u043b\u0435 \/home\/fun_house\/funhouse.sh <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh cd \/home\/fun_house .\/funhouse<\/code><\/pre>\n<p>funhouse &#8212; \u0438\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043d\u0430\u043c\u0438 \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 FastCGI \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0422\u0430\u043a\u043e\u0439 crontab \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h2>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0443\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e. \u041d\u043e \u0442\u0430\u043a \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0438, \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0438 \u043a\u043e\u0433\u0434\u0430, \u0447\u0442\u043e \u0437\u0430 \u043a\u0435\u043c \u0438 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445. \u0418 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u041f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u0441\u0451 &#8212; \u043f\u0430\u0440\u0430 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 THREAD_COUNT \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0436\u0434\u0435\u0442. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0442\u043e\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u043b\u0441\u044f, \u0432\u044b\u0431\u0440\u0430\u043b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043d\u0430\u0436\u0430\u043b &#171;\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c&#187;. Lighttpd, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 FastCGI \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 192.168.0.66 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 OpenVPN \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430 8888 \u043f\u043e\u0440\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0432 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0436\u0434\u0435\u0442 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0435\u0442 \u0435\u0433\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c FastCGI \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0430\u0440\u0441\u0438\u0442 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441 \u0434\u0438\u0441\u043a\u0430, \u0434\u0430\u043b\u0435\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0451 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b \u0432 \u0444\u0430\u0439\u043b \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>\u0418 \u0442\u0430\u043a \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 data\/marks, data\/imges \u0438 log<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e FastCGI \u0432 \u043f\u043e\u0442\u043e\u043a\u0430\u0445 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 habr.com\/ru\/post\/154187\/ \u0438 \u0432\u0441\u044f \u0438\u0434\u0435\u044f \u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u043e fastcgi \u0432\u0437\u044f\u0442 \u043e\u0442\u0442\u0443\u0434\u0430. \u041e\u0441\u043e\u0431\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e<a class=\"mention\" href=\"\/users\/janagan\">@janagan<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e \u043a\u0430\u0442\u043e\u043c \u0432\u0435\u0441\u044c source \u043a\u043e\u0434 \u043d\u0430 \u043f\u043e\u0447\u0442\u0438 1000 \u0441\u0442\u0440\u043e\u043a \u043e\u0434\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c.\u041d\u0430\u0432\u0435\u0440\u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. <\/p>\n<p><a href=\"https:\/\/github.com\/ChePeter\/funhouse_mirror\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441 Github<\/a>.<\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0433\u0440\u043e\u043c\u0430\u0434\u043d\u044b\u0439 \u0432 1000 \u0441\u0442\u0440\u043e\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>source funhouse_mirror<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">\/\/============================================================================ \/\/ Name        : fun-house_mirror.cpp \/\/ Author      : Peter Che \/\/ Version     : \/\/ Copyright   : Peter Che 7210208@gmail.com \/\/ Description : Pet Project in C \/\/============================================================================  \/*  * \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435  * 1. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438  * 2. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0436\u0434\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 FastCGI \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  * 3. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u0430\u0440\u0441\u0438\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438  *    \u0438 \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 FastCGI,  *    \u043b\u0438\u0431\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0434\u0438\u0441\u043a\u0430.  * 4. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0444\u0430\u0439\u043b-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438  *    OpenCV.  * 5. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u0435\u0431\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. \u0415\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0442\u043e resize  * 6. \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043d\u043e\u043f\u043e\u043a \"\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f\"\/\"\u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\", \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442  *    \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u0442\u0430\u0440\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u0430\u0439\u043b.  * 7.   \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u0442\u043e\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 ) \u0433\u0435\u043d\u0435\u0440\u0438\u0442 \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b  * 8. \u043f\u043e\u0442\u043e\u043a \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b remap (\u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430)  * 9. \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0442\u0440\u0438 remap \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443  * 10. \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e scp \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 10.0.1.1 (FreeBSD)  * 11. \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e  HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0451  *     \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440  * 12. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.  *\/  #include &lt;errno.h>  #include &lt;unistd.h> #include &lt;pthread.h> #include &lt;sys\/types.h> #include &lt;stdio.h> #include &lt;string.h> #include \"math.h\" #include &lt;fcntl.h> #include &lt;time.h>       \/* time_t, struct tm, time, localtime *\/  #include \"fcgi_config.h\" #include \"fcgiapp.h\"  #include \"opencv2\/core\/utility.hpp\" #include \"opencv2\/imgproc.hpp\" #include \"opencv2\/imgcodecs.hpp\" #include \"opencv2\/core\/mat.hpp\"  #include &lt;openssl\/sha.h>  using namespace cv; using namespace std;  \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \/\/ \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430, \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438 \u0438 \u043f\u0443\u0442\u0438, \/\/ \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b. \u0422.\u0435. \u0432\u0441\u044f \u0438\u043d\u0444\u043e \u0434\u043b\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \/\/ \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \/\/ \/\/ debug \u0438 log \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \/\/ \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043e\u0442\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \/\/ #define BUFLEN_F NAME_MAX + 1024 #define BUFLEN_TXT PATH_MAX + NAME_MAX #define LOG_TXT_LEN PATH_MAX + NAME_MAX + 1024 #define THREAD_COUNT 4 \/\/ \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432.  \/\/ \u0430\u0434\u0440\u0435\u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. #define FRONT_ADDR \"107.189.8.250\" \/\/ \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \/\/ \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \/\/ \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0438  \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0439 #define SOCKET_PATH \"192.168.0.66:8888\"  \/\/ \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \/\/ \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0442\u0438\u043f\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 \"9\" \u0432 \u043a\u043e\u0434\u0435 \/\/ \u043b\u0443\u0447\u0448\u0435 \u0434\u0435\u0444\u0430\u0439\u043d\u0438\u0442\u044c \/\/ #define ERROR_OPEN_TEMP_FILE 1 \/\/Error open temporary data file #define ERROR_ACCEPT_NEW_REQUEST 2 \/\/Error accept new request #define ERROR_IMAGE_ZERO_DIMENSION 3 #define ERROR_FILE_NAME 4 #define REQUEST_FORMAT_ERROR_0 5 \/\/ REQUEST_FORMAT_ERROR #define REQUEST_CONTENTLENGHT_ERROR 6 \/\/ #define REQUEST_GETSTR_ERROR 7 \/\/ #define REQUEST_BOUNDARY_ERROR 8 \/\/ #define REQUEST_FILENAME_NOTFOUND 9 \/\/ #define REQUEST_FILENAME_ERROR 10 \/\/ #define REQUEST_FORMAT_ERROR_6 11 \/\/ #define REQUEST_CONTENTTYPE_ERROR 12 \/\/ #define REQUEST_FILETYPE_ERROR 13 \/\/ #define REQUEST_FORMAT_ERROR_RD 14 \/\/ #define REQUEST_SERVER_NAME_ERROR 15 \/\/ SERVER_NAME_FORMAT_ERROR #define ERROR_RENAME_TMPFILE 101 #define READ_FILE_EXEPTION 102 \/\/read file exception #define WRITE_FILE_EXEPTION 103 #define ERROR_TRANFER_RES_FILE 104 #define ERROR_FASTCGI_SEND 105 #define ERROR_ 105  #define SALT_LEN 3  \/\/ \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \/\/ \u0432 \u044d\u0442\u043e\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0432\u0441\u0435 12 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \/\/ #define PARAMETERS_NUM 12  #define MAX_IMAGE_ROWS 512 #define MAX_IMAGE_COLS 512 #define MIN_IMAGE_ROWS 16 #define MIN_IMAGE_COLS 16  \/\/ \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \/\/ \u0442.\u0435. \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 param \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c ANGLE_0 \u0431\u0443\u0434\u0435\u0442 0 \/\/ \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \/\/ \u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \/\/ \u0447\u0442\u043e \u0442\u043e \u0436\u0435 \u0447\u0442\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 param, \u0442\u043e \/\/ \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 #define ANGLE_0 0 #define ANGLE_1 1 #define ANGLE_2 2  #define PERIOD_0 3 #define PERIOD_1 4 #define PERIOD_2 5  #define AMPLITUDE_0 6 #define AMPLITUDE_1 7 #define AMPLITUDE_2 8  #define SIGN_0 9 #define SIGN_1 10 #define SIGN_2 11  \/\/\u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043e\u043a\u0435\u0442\u0430 static int socketId; \/\/ \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \/\/ \u0438 \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \/\/  \u043e\u0431\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445 static pthread_mutex_t accept_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;  FILE *log_file; FILE *marks_file;  \/\/ \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043b\u0438 1 \u0438\u043b\u0438 0 \u0438\u043b\u0438 -1 \/\/ \u0441 \u0440\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \/\/ \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \/\/ \u0435\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e \u043d\u0443\u043b\u044f\u043c, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 float rand_101(void) { float ret = float(rand() % 6); if (ret &lt; 2.) return (0.); else if (ret &lt; 4.) return (-1.); return (1.); }  \/\/ \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \/\/ \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 base64 \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 HTML \u043a\u043e\u0434 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \/\/ \u0430 base58, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0438 \u0431\u0438\u0442\u043a\u043e\u0439\u043d, \u043d\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c (( void char2hex(char *hex, char *src, size_t src_len) { size_t i; uchar t;  for (i = 0; i &lt; src_len; i++) { t = (uchar) src[i] &amp; 0xff; hex[i * 2] = (uchar) ((uchar) ((t &amp; 0x0f)) + 65); hex[2 * i + 1] = (uchar) ((uchar) (((t >> 4) &amp; 0x0f)) + 65); } }  void hex2char(const char *hex, char *src, size_t src_len) { size_t i;  for (i = 0; i &lt; src_len; i++) src[i] = (uchar) ((uchar) ((hex[i * 2 + 1] - 65) &lt;&lt; 4) + (uchar) (hex[i * 2] - 65)); }  static void* do_thread(void *thread_num) {  \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \/\/ \u043a\u043e\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0434\u0435\u0444\u0430\u0439\u043d\u0430\u0445 int error_idx; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 int ret; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 int thread_idx; \/\/ FCGX_Request request;  \/\/ \u0442\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 char tmp_file_name[22] = \"data\/tmp\/  fcgi.bin\"; \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u043e\u043a\u0435\u0442\u0430 fastcgi char buffer[BUFLEN_F + 1]; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 fastcgi \u0437\u0430\u043f\u0440\u043e\u0441 char *buf_start; char *buf_end; char *buf_current; \/\/ current point in buffer \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 fastcgi char *server_name; char *boundary; char *content_type; char *request_method; char *script_name; char *ch_content_len; \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e lighttpd \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u0442 \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \/\/ \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 int int content_len; int file_len; \/\/ \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 char file_name[NAME_MAX]; \/\/ \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 char file_path[PATH_MAX + NAME_MAX]; char file_type[NAME_MAX]; char out_file_path[PATH_MAX];  \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b scp char exec_txt[BUFLEN_TXT]; \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446 HTML char html_txt[BUFLEN_TXT]; \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 fcgi char fcgi_txt[BUFLEN_TXT]; \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043e\u043a char hex_txt[BUFLEN_TXT]; \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \/\/ \u0437\u0430\u043f\u0438\u0441\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \/\/ \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \/\/ \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0441\u0442\u0430\u043d\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0437\u0434\u0435 \u0433\u0434\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0436\u0443\u0440\u043d\u0430\u043b, \/\/ \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 stdout. \/\/ \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u043b\u0435\u0442\u0438\u0442, \u0442\u043e \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 char log_txt[LOG_TXT_LEN];  \/\/ \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u044d\u0448 unsigned char md_buf[SHA256_DIGEST_LENGTH]; \/\/ \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 char *t_pointer; int i, j; float scale;  \/\/ \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a float row, col, row2, col2, row1, col1, f_i, f_j, angle_i, angle_j; \/\/ \u0432 img_origin \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438 \u0435\u0451 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \/\/ \u0440\u0435\u0441\u0430\u0439\u0437\u0438\u0442\u044c.\u0412 img_in \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Mat img_in, img_origin; int img_width;  \/\/ \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0438\u043a\u0438 \/\/ \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 HTML \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \/\/ \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430+\u0441\u043e\u043b\u044c. \/\/ \u044d\u0442\u043e \u0434\u043e\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c, \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043f\u043e\u043a\u0430\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a float param[PARAMETERS_NUM]; unsigned char salt; float tt;\/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439  char *first_point; int batchRW; int done;  int tmp_fd;  \/\/ http:\/\/all-ht.ru\/inf\/prog\/c\/func\/localtime_r.html \/\/\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 long int s_time; \/\/\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0435\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 struct tm m_time; \/\/\u0411\u0443\u0444\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 char time_buf[26];   thread_idx = *((int*) thread_num);  \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u043e\u043a\u0435\u0442\u0443 if (FCGX_InitRequest(&amp;request, socketId, 0) != 0) { \/\/\u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 fprintf(log_file, \" thread %d. Can not initializing request\\n\", thread_idx); return NULL; }  \/\/ \u0441\u043e\u043a\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442 \u0438 \u0436\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 for (;;) {  \/\/ \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \/\/ \u0432\u0441\u0435 \u0431\u0443\u0444\u0435\u0440\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u044e\u0442\u0441\u044f error_idx = 0; bzero(log_txt, LOG_TXT_LEN); bzero(file_name, NAME_MAX); bzero(file_path, PATH_MAX + NAME_MAX); bzero(file_type, NAME_MAX); bzero(out_file_path, PATH_MAX); bzero(exec_txt, BUFLEN_TXT); bzero(html_txt, BUFLEN_TXT); bzero(fcgi_txt, BUFLEN_TXT); bzero(hex_txt, BUFLEN_TXT); bzero(log_txt, LOG_TXT_LEN); bzero(time_buf, 26);  do { \/\/ \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 log_txt \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \/\/ \u0432 \u043a\u043e\u043d\u0446\u0435 \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432 \u0444\u0430\u0439\u043b \u0436\u0443\u0440\u043d\u0430\u043b\u0430 s_time = time(NULL); localtime_r(&amp;s_time, &amp;m_time); sprintf(log_txt + strlen(log_txt), \" thread %d. time %s\", thread_idx, asctime_r(&amp;m_time, time_buf)); sprintf(tmp_file_name, \"%s%03d%s\", \"data\/tmp\/\", thread_idx, \"fcgi.bin\"); \/\/ \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u0430 \/\/ \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0438 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \/\/ \u0445\u043e\u0442\u044c \u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \/\/ \/\/ \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043e\u043a\u0435\u0442\u0430 \/\/ \u0442\u0430\u043a \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e, \u0447\u0442\u043e \u0431\u044b \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u0440\u043e\u0433\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u043d\u0435 \u0446\u0438\u043a\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 tmp_fd = open(tmp_file_name, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (tmp_fd &lt; 3) { sprintf(log_txt + strlen(log_txt), \"\\t%s %s.\\n\", \"Error open temporary data file\", tmp_file_name); \/\/ \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0444\u0430\u0439\u043b, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u043e\u043b\u044c\u043d\u0430 \/\/ \u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442 \/\/ \u0438 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0436\u0434\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 error_idx = ERROR_OPEN_TEMP_FILE; continue; } \/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 sprintf(log_txt + strlen(log_txt), \"\\tdata file %s opened\\n\\tTry to accept new request\\n\", tmp_file_name);  \/\/ \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c FastCGI \u0437\u0430\u043f\u0440\u043e\u0441 \/\/ \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \/\/ \u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0436\u0434\u0443\u0442 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \/\/ \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0442\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \/\/ \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043e\u0442\u043e\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f pthread_mutex_lock(&amp;accept_mutex); ret = FCGX_Accept_r(&amp;request); pthread_mutex_unlock(&amp;accept_mutex);  if (ret &lt; 0) { \/\/ \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \/\/ \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b fprintf(log_file, \" thread %d. Error accept new request\\n\", thread_idx); fflush(log_file); error_idx = ERROR_ACCEPT_NEW_REQUEST; continue; } \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 FastCGI \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \/\/ \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 server_name = FCGX_GetParam(\"SERVER_NAME\", request.envp); content_type = FCGX_GetParam(\"CONTENT_TYPE\", request.envp); ch_content_len = FCGX_GetParam(\"CONTENT_LENGTH\", request.envp); content_len = atoi(ch_content_len); request_method = FCGX_GetParam(\"REQUEST_METHOD\", request.envp); script_name = FCGX_GetParam(\"SCRIPT_NAME\", request.envp);  \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u0440\u0438\u0448\u0435\u043b \u043b\u0438 FastCGI \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430? \/\/ \u0438\u043b\u0438 \u044d\u0442\u043e \u0447\u044c\u044f \u0442\u043e \u0448\u0443\u0442\u043a\u0430 if (strncmp(server_name, FRONT_ADDR, strlen(FRONT_ADDR))) { error_idx = REQUEST_SERVER_NAME_ERROR; continue; }  \/\/ \u043f\u043e\u043b\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0438\u043b\u0438 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 if (!(server_name and request_method and script_name)) { error_idx = REQUEST_FORMAT_ERROR_0; continue; }  \/\/ \u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \/\/ \u0442.\u0435. \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \/\/ \u0438 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0444\u0430\u0439\u043b if (content_len != 0) { \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c \/\/ \u0432 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 boundary = strcasestr(content_type, \"boundary=\") + strlen(\"boundary=\"); if ((content_len &lt;= 100) or (content_len >= 10000000)) { \/\/ \u0435\u0441\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0430\u043b\u043e \u0438\u043b\u0438 \u0432\u0435\u043b\u0438\u043a\u043e, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0446\u0438\u043a\u043b \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u0440\u0430\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u0432 \u043a\u043e\u0434\u0435 \/\/ \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0438 \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u0435, \/\/ \u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 error_idx = REQUEST_CONTENTLENGHT_ERROR; continue; } \/\/ \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441 \u0441\u043e\u043a\u0435\u0442\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0441\u0447\u0438\u0442\u0430\u043d\u043e\u0433\u043e \u0432 batchRW batchRW = FCGX_GetStr(buffer, BUFLEN_F, request.in); if (batchRW &lt;= 0) { error_idx = REQUEST_GETSTR_ERROR; break; } \/\/ \u0438\u0449\u0435\u043c boundary \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0412\u0441\u044f \u0438\u043d\u0444\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0433\u043e if ((buf_start = strcasestr(buffer, boundary)) == NULL) { error_idx = REQUEST_BOUNDARY_ERROR; break; } buf_start += strlen(boundary);  \/\/ \u0438\u0449\u0435\u043c \u0441\u043b\u043e\u0432\u043e \"filename=\" \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 if ((buf_current = strcasestr(buf_start, \"filename=\")) == NULL) { error_idx = REQUEST_FILENAME_NOTFOUND; break; } buf_current += strlen(\"filename=\"); \/\/ \u0442\u0435\u043f\u0435\u0440\u044c buf_current \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u043f\u043e\u0441\u043b\u0435 \"filename=\" \/\/ \u0438 \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 if (*(buf_current++) != '\"') \/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f { error_idx = REQUEST_FILENAME_ERROR; break; } \/\/ \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 buffer \/\/ \u0442\u043e, \u0447\u0442\u043e \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043f\u043e\u0441\u043b\u0435 \"filename=\" \u0438 \u0435\u0441\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0438 buf_end = (char*) memchr(buf_current, '\"', batchRW - 2 * strlen(boundary)); bzero(file_name, NAME_MAX); \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u0434\u043b\u0438\u043d\u0443 \/\/ \u0442.\u043a. \u0434\u0430\u043b\u0435\u0435 \u043a \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c 3 \u0431\u0430\u0439\u0442\u0430 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u0441\u043e\u043b\u044c, \/\/ \u0442\u043e \u0444\u0430\u0439\u043b\u044b \u0441 \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \/\/ \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0442\u0430\u043c \u0436\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \/\/ \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043d\u043c \/\/ \u043d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043d\u043e\u0432\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c if (buf_end - buf_current >= (int) (NAME_MAX - SALT_LEN - 3) or buf_end - buf_current &lt;= 4) { error_idx = REQUEST_FILENAME_ERROR; break; } \/\/ \u0432\u043e\u0442 \u0442\u0443\u0442 \u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430  t_pointer = file_name; \/\/ \u043a \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u043f\u0438\u0441\u044b\u0432\u0430\u043c \u0441\u043e\u043b\u044c, \u0447\u0442\u043e \u0431\u044b \u0438\u043c\u0435\u043d\u0430 \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b\u0438\u0441\u044c. \/\/ \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u044f\u0442 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0442\u043e\u043a\u0435 \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \/\/ \u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 \u0441\u043e\u043b\u044c \/\/ \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0443\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u0430, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u043e\u043b\u044c - \u044d\u0442\u043e \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u043e\u043f\u043e\u0440\u044f\u0434\u043a\u0430 for (i = 0; i &lt; SALT_LEN; i++) { salt = rand() % 256; char2hex(t_pointer, (char*) &amp;salt, sizeof(salt)); t_pointer += 2 * sizeof(salt); } memcpy(t_pointer, buf_current, buf_end - buf_current); \/\/ \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0438\u043f \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f if ((buf_current = strcasestr(buf_start, \"Content-Type: \")) == NULL) { error_idx = REQUEST_CONTENTTYPE_ERROR; break; } buf_current += strlen(\"Content-Type: \"); \/\/ \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e 0d 0a \u0434\u043e \u043a\u043e\u043d\u0446\u0430 buffer buf_end = (char*) memchr(buf_current, 0x0d, batchRW); \/\/ \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u044f\u0442\u0441\u044f \u0432 \u0431\u0443\u0444\u0435\u0440 \/\/ \u043d\u0443 \u0438\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f. \u0422\u0430\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f  bzero(file_type, NAME_MAX); if (buf_end - buf_current >= NAME_MAX or buf_end - buf_current == 0) { error_idx = REQUEST_FILETYPE_ERROR; break; } memcpy(file_type, buf_current, buf_end - buf_current);  if (strncmp(buf_end, \"\\r\\n\\r\\n\", 4) != 0) { error_idx = REQUEST_FORMAT_ERROR_RD; break; } buf_start = buf_end + 4; \/\/ 2 is fin boundary '--' 6 if first 2d2d2d2d2d2d \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0434\u043b\u0438\u043d\u0443 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0435\u0441\u0442\u044c \u0434\u043b\u0438\u043d\u0430 \u0444\u0430\u0439\u043b\u0430. file_len = content_len - (buf_start - buffer) - strlen(boundary) - 2 - 6; done = file_len; \/\/ \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f. \/\/ \u043d\u043e \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0443 \u0442\u0430\u043a\u0443\u044e \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u0447\u0442\u043e \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \/\/ \u043f\u043e\u0447\u0438\u043b\u043e\u0441\u044c \u043a\u0440\u0438\u0432\u043e\u0432\u0430\u0442\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0435\u0441\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435  \/\/ \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432 \u0431\u0443\u0444\u0435\u0440\u0435 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u0430 \/\/ \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439, \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0444\u0430\u0439\u043b batchRW = batchRW - (buf_start - buffer); \/\/ \u0438 \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u0441\u043e\u043a\u0435\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b \/\/ \u0434\u043b\u0438\u043d\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \/\/ \u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0440\u0438\u0441\u043b\u0430\u043b \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d.  \/\/ \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430,\u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435\u0442 \u043c\u0435\u0441\u0442\u0430 \u0438\u043b\u0438 \u043c\u0438\u0440 \u0440\u0443\u0445\u043d\u0443\u043b \/\/ \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u043f\u043e continue  \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0438 \u0436\u0434\u0430\u0442\u044c \/\/ \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u043e if (file_len &lt;= batchRW) { ret = write(tmp_fd, buf_start, file_len); done = 0; } else { ret = write(tmp_fd, buf_start, batchRW); done -= batchRW; } if (ret &lt; 0) { error_idx = WRITE_FILE_EXEPTION; break; } while (done > 0) { \/\/ \u0432\u043e\u0442 \u0442\u0443\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c batchRW = FCGX_GetStr(buffer, BUFLEN_F, request.in); if (batchRW &lt;= 0) break; if (done &lt;= batchRW) { ret = write(tmp_fd, buffer, done); done = 0; break; } else { ret = write(tmp_fd, buffer, batchRW); done -= batchRW; } if (ret &lt; 0) { error_idx = WRITE_FILE_EXEPTION; break; } } if (ret &lt; 0) { error_idx = WRITE_FILE_EXEPTION; break; }  \/\/ \u0432\u043e\u0442 \u0442\u0443\u0442 \u0444\u0430\u0439\u043b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 data\/images\/ \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \/\/ \u0438 \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u043d\u0430\u043f\u0440\u043c\u0435\u0440 OpenCV close(tmp_fd);  bzero(file_path, PATH_MAX + NAME_MAX); errno = 0; if (strlen(file_name) > 0) { memcpy(file_path, \"data\/images\/\", 12); memmove(file_path + 12, file_name, strlen(file_name)); if ((ret = rename(tmp_file_name, file_path)) &lt; 0) { \/\/ \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b. \u0420\u0430\u0431\u043e\u0447\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0438 \u0444\u0430\u0439\u043b \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u0434 \u0442\u0435\u043c \u0438\u043c\u0435\u043d\u0435\u043c \/\/ \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u0435\u043b + \u0441\u043e\u043b\u044c + \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u0430 error_idx = ERROR_RENAME_TMPFILE; break; } } } else { \/\/ \u0435\u0441\u043b\u0438 \u0432 fastCGI \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0417\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \/\/ \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \/\/ \u0412\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b marks \/\/ \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 (\u0430 \u043e\u043d \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d) \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \/\/ \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u0438 \u043d\u0443\u0436\u043d\u044b\u0445 bzero(fcgi_txt, BUFLEN_TXT); first_point = strchr(script_name, '.'); hex2char((char*) (script_name + 1), fcgi_txt, (size_t) (first_point - script_name - 1) \/ 2); bzero(file_name, NAME_MAX); strcpy(file_name, fcgi_txt + SHA256_DIGEST_LENGTH + PARAMETERS_NUM * sizeof(param[ANGLE_1]) + SALT_LEN * sizeof(salt)); bzero(file_path, PATH_MAX + NAME_MAX); memcpy(file_path, \"data\/images\/\", 12); memmove(file_path + 12, file_name, strlen(file_name)); memcpy(param, fcgi_txt + SHA256_DIGEST_LENGTH, PARAMETERS_NUM * sizeof(param[ANGLE_1]));  \/\/ \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 if (strncmp(first_point + 1, \"yes\", 3) == 0) fprintf(marks_file, \"%s\", \"yes\"); else fprintf(marks_file, \"%s\", \"no\"); \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b fprintf(marks_file, \"\\t%s\", file_name); for (i = 0; i &lt; PARAMETERS_NUM; i++) { sprintf(log_txt + strlen(log_txt), \"\\treceived parameter_%0d=%f\\n\", i, param[i]); fprintf(marks_file, \"\\t%f\", param[i]); } fprintf(marks_file, \"\\n\"); fflush(marks_file); }  } while (0); \/\/ \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 sprintf(log_txt + strlen(log_txt), \"\\tserver name -  %s \\n\", server_name); sprintf(log_txt + strlen(log_txt), \"\\tcontent_type   %s \\n\", content_type); sprintf(log_txt + strlen(log_txt), \"\\tcontent length %d \\n\", content_len); sprintf(log_txt + strlen(log_txt), \"\\trequest_method %s \\n\", request_method); sprintf(log_txt + strlen(log_txt), \"\\tscript name    %s \\n\", script_name); sprintf(log_txt + strlen(log_txt), \"\\tContent-Type:  %s \\n\", file_type); sprintf(log_txt + strlen(log_txt), \"\\tfile_name      %s \\n\", file_name);  \/\/ \u0435\u0441\u043b\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \/\/ \u0442\u043e \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b - \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0438\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 while (error_idx == 0 and strlen(file_name) > 0) { \/\/                          ... \/\/ \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 OpenCV \/\/ \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u041d\u0430\u0432\u0435\u0440\u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435. \/\/ \u0442\u043e \u0432\u043e\u0442 \u0432 \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \/\/ \u0432 filename \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \/\/ \/\/ \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 s_time = time(NULL); localtime_r(&amp;s_time, &amp;m_time); sprintf(log_txt + strlen(log_txt), \"\\topencv start time %s\", asctime_r(&amp;m_time, time_buf));  \/\/ \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0432 \u043f\u044f\u043c\u044f\u0442\u044c \/\/ \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \/\/ \u0438 \u0442\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0438\u043f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0431\u0435\u0437 OpenCV \/\/ \u0438\u043b\u0438 \u043f\u043e\u0434\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 imread  \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \/\/ \u0430 \u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u0437\u0430 \u0437\u0430\u043f\u0440\u043e\u0441. \/\/ \u043c\u043e\u0436\u043d\u043e try { img_origin = imread(file_path, IMREAD_COLOR); \/\/ \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 OpenCV \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \/\/ \u0444\u0430\u0439\u043b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0431\u0430\u0436\u043d\u044b\u0439 } catch (cv::Exception &amp;e) { const char *err_msg = e.what(); fprintf(log_file, \" thread %d. read file exception caught: %s \\n \", thread_idx, err_msg); fflush(log_file); error_idx = READ_FILE_EXEPTION; continue; } \/\/ \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \/\/ \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e OpenCV \u0444\u0430\u0439\u043b\u044b \u0444\u043e\u0440\u043c\u0430\u0442\u0430 .heif \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u044b \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e \/\/ \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0449\u0438 if (img_origin.rows &lt; MIN_IMAGE_ROWS or img_origin.cols &lt;= MIN_IMAGE_COLS) { error_idx = ERROR_IMAGE_ZERO_DIMENSION; \/\/ .heif not supported https:\/\/github.com\/opencv\/opencv\/issues\/14534 continue; } \/\/ \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u0436\u0438\u043c\u0430\u0435\u043c \/\/ \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 MAX_IMAGE_ROWS \u0438 MAX_IMAGE_COLS \/\/ \u0435\u0441\u0434\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0440\u0430\u0432\u0435\u043d 0, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c if (img_origin.rows >= MAX_IMAGE_ROWS or img_origin.cols >= MAX_IMAGE_COLS) {  scale = MIN(float(img_origin.rows)\/MAX_IMAGE_ROWS, float(img_origin.cols)\/MAX_IMAGE_COLS); resize(img_origin, img_in, Size(int(float(img_origin.cols) \/ scale), int(float(img_origin.rows) \/ scale)), INTER_LINEAR); } else img_in = img_origin;  \/\/ \u0442\u0443\u0442 \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \/\/ \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \/\/ \u0438 \u0442\u0443\u0442 \u043a\u0430\u043a \u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \/\/ \u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u0441\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \/\/ \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u0442 \u0438\u0437 \u0446\u0438\u043a\u043b\u043e\u0432 \/\/ \u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430 col1 = float(img_in.cols - 1); row1 = float(img_in.rows - 1); col2 = col1 \/ 2; row2 = row1 \/ 2;  \/\/ \u044d\u0442\u043e \u0421++ \u0447\u0430\u0441\u0442\u044c. OpenCV \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a \/\/ \u043c\u043e\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \/\/ \u043c\u043e\u0436\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u044e \u043f\u043e\u043f\u043e\u0437\u0436\u0435 Mat img_out(img_in.size(), img_in.type()); \/\/ \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0451 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 remap \/\/ \u0442\u043e \u0442\u0443\u0442 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Mat map_r(img_in.size(), CV_32FC1); Mat map_c(img_in.size(), CV_32FC1);  Mat map_r_s(img_in.size(), CV_32FC1); Mat map_c_s(img_in.size(), CV_32FC1);  Mat map_r_ss(img_in.size(), CV_32FC1); Mat map_c_ss(img_in.size(), CV_32FC1);  Mat map_r_sss(img_in.size(), CV_32FC1); Mat map_c_sss(img_in.size(), CV_32FC1); \/\/ \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 param \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \/\/ \u0433\u0434\u0435 \u0442\u043e \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430, \u0433\u0434\u0435 \u0442\u043e \u0441\u0436\u0430\u0442\u0438\u0435 \u0438\u043b\u0438 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \/\/ \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0438\u043b\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \/\/ param[PERIOD_0] = 0.5 + 1.5 * (float) rand() \/ (float) (RAND_MAX); param[AMPLITUDE_0] = (0.125 + 0.125 * (float((rand() % 256) - 128) \/ 255.)); param[SIGN_0] = rand_101(); param[ANGLE_0] = 0.125 * M_PI;  param[PERIOD_1] = 0.5 + 1.5 * (float) rand() \/ (float) (RAND_MAX); param[AMPLITUDE_1] = float(img_in.rows) \/ 10.; param[AMPLITUDE_1] = param[AMPLITUDE_1] * (1. + 0.5 * (0.5 - (float) rand() \/ (float) (RAND_MAX))); param[SIGN_1] = rand_101(); param[ANGLE_1] = 0.125 * M_PI;  param[PERIOD_2] = 0.5 + 1.5 * (float) rand() \/ (float) (RAND_MAX); param[AMPLITUDE_2] = float(img_in.cols) \/ 10.; param[AMPLITUDE_2] = param[AMPLITUDE_2] * (1. + 0.75 * (0.5 - (float) rand() \/ (float) (RAND_MAX))); param[SIGN_2] = rand_101(); param[ANGLE_2] = 0.125 * M_PI;  \/\/ \u0432\u043e\u0442 \u0442\u0443\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c map \u0434\u043b\u044f remap for (i = 0; i &lt; img_in.rows; i++) { f_i = float(i); row = f_i - row2; angle_i = param[PERIOD_1] * M_PI * f_i \/ row1; for (j = 0; j &lt; img_in.cols; j++) { f_j = float(j); col = f_j - col2;  tt = (1. + sin(-M_PI \/ 2 + 4. * M_PI * f_j \/ col1)) \/ 2; if (col > 0) tt = -tt; map_c_s.at&lt;float>(i, j) = (f_j - tt * (col1 \/ 7) * 0.5 * sin(param[SIGN_1] * angle_i)); map_r_s.at&lt;float>(i, j) = f_i;  angle_j = param[PERIOD_2] * M_PI * f_j \/ col1; tt = (1. + sin(-M_PI \/ 2 + 4. * M_PI * f_i \/ row1)) \/ 2; if (row > 0) tt = -tt; map_c_ss.at&lt;float>(i, j) = f_j; map_r_ss.at&lt;float>(i, j) = (f_i - tt * (row1 \/ 7) * 0.5 * sin(param[SIGN_2] * angle_j));  tt = (1. - abs(col) \/ col2) * (1. - abs(row) \/ row2); angle_j = param[SIGN_0] * param[AMPLITUDE_0] * M_PI * sin(M_PI * tt); map_r.at&lt;float>(i, j) = row * cos(angle_j) - col * sin(angle_j) + float(img_in.rows) \/ 2; map_c.at&lt;float>(i, j) = row * sin(angle_j) + col * cos(angle_j) + float(img_in.cols) \/ 2; } }  img_in.copyTo(img_out); \/\/ \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u044d\u0442\u0438 \u0440\u0435\u043c\u0430\u043f\u044b \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \/\/ \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u0443\u0442\u0438\u0442\u044c, \u0434\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0436\u0438\u043c\u0430\u044e\u0442-\u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0442 remap(img_out, img_out, map_c_s, map_r_s, INTER_LINEAR, BORDER_CONSTANT, Scalar(0, 0, 0)); remap(img_out, img_out, map_c_ss, map_r_ss, INTER_LINEAR, BORDER_CONSTANT, Scalar(0, 0, 0)); remap(img_out, img_out, map_c, map_r, INTER_LINEAR, BORDER_CONSTANT, Scalar(0, 0, 0));  bzero(out_file_path, PATH_MAX); sprintf(out_file_path, \"%s%03d%s\", \"data\/images\/\", thread_idx, file_name);  try { \/\/ \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0444\u0430\u0439\u043b imwrite(out_file_path, img_out); } catch (cv::Exception &amp;e) { const char *err_msg = e.what(); fprintf(log_file, \" thread %d. write file exception caught: %s \\n \", thread_idx, err_msg); fflush(log_file); error_idx = WRITE_FILE_EXEPTION; continue; } \/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 OpenCV s_time = time(NULL); localtime_r(&amp;s_time, &amp;m_time); sprintf(log_txt + strlen(log_txt), \"\\topencv   end time %s\", asctime_r(&amp;m_time, time_buf));  \/\/ \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u041e\u0421 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \/\/ \u0430\u0434\u0440\u0435\u0441 10.0.1.1 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 VPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 VPN \/\/ \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043d\u0430\u0448 FreeBSD \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \/\/ \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u0435\u0434\u0435\u0442 \u0434\u0432\u0430\u0436\u0434\u044b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \/\/ \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c FRONT_ADDR \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0431\u0443\u0434\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \/\/ \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \/\/ \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u043c FreeBSD \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0440\u0442 SSH \u043d\u0430 FRONT_ADDR \/\/ \u0441\u043e\u0432\u0441\u0435\u043c \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 VPN bzero(exec_txt, BUFLEN_TXT); sprintf(exec_txt, \"scp %s funhouse@10.0.1.1:\/usr\/local\/www\/data\/images\/%03d%.*s\", \/\/ \"cp %s \/var\/www\/html\/images\/%03d%.*s\", \/\/ \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c cp \/\/ \u0435\u0441\u043b\u0438 lighttpd \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u044d\u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438 scp \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \/\/ \u0438 cp \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 out_file_path, thread_idx, (int) strlen(file_name), file_name); \/\/ \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 VPN \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0441\u0435\u0442\u0438. if (system(exec_txt) != 0) { fprintf(log_file, \" thread %d. File %s not moved successfully\\n\", thread_idx, out_file_path); error_idx = ERROR_TRANFER_RES_FILE; continue; }  bzero(fcgi_txt, BUFLEN_TXT); \/\/ \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \/\/ \u0433\u043e\u0442\u043e\u0432\u0438\u043c fcgi \u043e\u0442\u0432\u0435\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \/\/ \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b,\u0441\u043e\u043b\u044c \u0438 \u0445\u0435\u0448 \/\/ \u0445\u0435\u0448 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0442\u043e\u043c t_pointer = fcgi_txt; for (i = 0; i &lt; PARAMETERS_NUM; i++) { memcpy(t_pointer, &amp;param[i], sizeof(param[i])); t_pointer += sizeof(param[i]); sprintf(log_txt + strlen(log_txt), \"\\tparameter_%0d=%f\\n\", i, param[i]); } for (i = 0; i &lt; SALT_LEN; i++) { salt = rand() % 256; memcpy(t_pointer, &amp;salt, sizeof(salt)); t_pointer += sizeof(salt); } memcpy(t_pointer, file_name, strlen(file_name)); SHA256((const unsigned char*) fcgi_txt, (size_t) (PARAMETERS_NUM * sizeof(param[ANGLE_1]) + SALT_LEN * sizeof(salt) + strlen(file_name)), md_buf); \/\/ fcgi \u0437\u0430\u043f\u0440\u043e\u0441\u044b-\u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0433\u043e\u0442\u043e\u0432\u044b \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0440\u043e\u0438\u043c HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 bzero(html_txt, BUFLEN_TXT); sprintf(html_txt + strlen(html_txt), \"Status: 200 OK\\r\\n\"); sprintf(html_txt + strlen(html_txt), \"&lt;!DOCTYPE HTML PUBLIC \\\"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\\\" \\\"http:\/\/www.w3.org\/TR\/html4\/strict.dtd\\\">\\r\\n\"); sprintf(html_txt + strlen(html_txt), \"Content-Type: text\/html\\r\\n\\r\\n\"); sprintf(html_txt + strlen(html_txt), \"&lt;html>\\r\\n&lt;meta charset=\\\"utf-8\\\">\\r\\n\"); sprintf(html_txt + strlen(html_txt), \"&lt;body>\\r\\n\"); \/\/ \u0435\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430, \u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0436\u0430\u0442\u0438\u044f img_width = img_out.cols > MAX_IMAGE_ROWS ? MAX_IMAGE_ROWS : img_out.cols; sprintf(html_txt + strlen(html_txt), \"  &lt;img src=http:\/\/%s\/images\/%03d%s alt=\\\"Computed image\\\" style=\\\"width:%dpx\\\" >\\r\\n\", FRONT_ADDR, thread_idx, file_name, img_width); sprintf(html_txt + strlen(html_txt), \"&lt;form>\\n\"); \/\/ \u0437\u0434\u0435\u0441\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u043b\u044c\u044e \u0438 \u0445\u0435\u0448\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u0434 \u0438\u0437 \u0431\u0443\u043a\u0432 \/\/ \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 base64 \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f,\u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0435 \u0434\u043b\u044f HTML \u0441\u0438\u043c\u0432\u043e\u043b\u044b \/\/ \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 base58 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \/\/ \u0442\u043e \u043b\u0438 \u043b\u0435\u043d\u044c, \u0442\u043e \u043b\u0438 \u043d\u0435 \u0441\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u043b \u043a\u0430\u043a bzero(hex_txt, BUFLEN_TXT); char2hex(hex_txt, (char*) md_buf, SHA256_DIGEST_LENGTH);  char2hex(hex_txt + 2 * SHA256_DIGEST_LENGTH, fcgi_txt, PARAMETERS_NUM * sizeof(param[ANGLE_1]) + SALT_LEN * sizeof(salt) + strlen(file_name)); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0448\u0438\u0442 FastCGI \u0437\u0430\u043f\u0440\u043e\u0441 \/\/ \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u043b\u044c\u044e \u0438 \u0445\u0435\u0448 sprintf(html_txt + strlen(html_txt), \"&lt;p>&lt;button type=\\\"submit\\\" formaction=\\\"%*s.yes.fcgi\\\"> \u041d\u0420\u0410\u0412\u0418\u0422\u0421\u042f &lt;\/button>&lt;\/p>\\n\", (int) strlen(hex_txt), hex_txt); sprintf(html_txt + strlen(html_txt), \"&lt;p>&lt;button type=\\\"submit\\\" formaction=\\\"%*s.no.fcgi\\\"> \u041e\u0422\u041a\u0410\u0417\u0410\u0422\u042c &lt;\/button>&lt;\/p>\\n\", (int) strlen(hex_txt), hex_txt); sprintf(html_txt + strlen(html_txt), \"&lt;p>&lt;button type=\\\"submit\\\" formaction=\\\"upload.html\\\"> \u0415\u0429\u0415 \u041a\u0410\u0420\u0422\u0418\u041d\u041a\u0423 &lt;\/button>&lt;\/p>\\n\"); \/\/ \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u043c\u0435\u0442 \u043a\u0430\u043a\u0443\u044e \u043b\u0438\u0431\u043e \u0438\u0437 \u043a\u043d\u043e\u043f\u043e\u043a \/\/ \u0442\u043e fcgi \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0434\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b sprintf(html_txt + strlen(html_txt), \"&lt;\/form>\"); sprintf(html_txt + strlen(html_txt), \"&lt;\/body>\\r\\n&lt;\/html>\\r\\n\");  \/\/ \u0442\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0432\u043d\u0435\u0448\u043d\u0438\u0439, FreeBSD, \u0441\u0435\u0440\u0432\u0435\u0440 \/\/ \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u043a\u0430\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0442\u0440\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \"\u0414\u0410\" \"\u041d\u0415\u0422\" \"\u041e\u0422\u041b\u041e\u0416\u0418\u0422\u042c\" if ((ret = FCGX_PutS(html_txt, request.out)) &lt; 0) { error_idx = ERROR_FASTCGI_SEND; continue; };  sprintf(log_txt + strlen(log_txt), \"\\t%s\\n\", \"send page\"); break; } if (error_idx != 0) { \/\/ \u0435\u0441\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0435\u0449\u0435 \u043a\u043e\u0433\u0434\u0430 \/\/ \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u043c\u044b \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u043b\u0438, \/\/ \u0442\u043e \u0432\u043e\u0442 \u0442\u0443\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 bzero(html_txt, BUFLEN_TXT);  sprintf(html_txt + strlen(html_txt), \"Status: 200 OK\\r\\nContent-Type: text\/html\\r\\n\\r\\n\"); sprintf(html_txt + strlen(html_txt), \"&lt;head>\\n\"); sprintf(html_txt + strlen(html_txt), \"&lt;meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=http:\/\/%s\/upload.html\\\"\\n\", FRONT_ADDR); sprintf(html_txt + strlen(html_txt), \"&lt;\/head>\"); printf(\"%s\\n\", html_txt); FCGX_PutS(html_txt, request.out);  sprintf(log_txt + strlen(log_txt), \"\\t%s error %d\\n\", \"Moved to upload page\", error_idx); fflush(log_file); error_idx = 0; }  \/\/ \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u043c\u043e\u0433\u043b\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0438 \u043d\u0443\u0436\u043d\u043e \/\/\u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 FCGX_Finish_r(&amp;request);  \/\/\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f - \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0442.\u043f. s_time = time(NULL); localtime_r(&amp;s_time, &amp;m_time); sprintf(log_txt + strlen(log_txt), \"\\tend request %s\", asctime_r(&amp;m_time, time_buf)); sprintf(log_txt + strlen(log_txt), \"\\terror_idx %d\\n\\t +++ FCGX_fin\\n\\n\", error_idx);  \/\/ \u0442\u0430\u043a \u043a\u0430\u043a \u0436\u0443\u0440\u043d\u0430\u043b \u0443 \u043d\u0430\u0441 \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \/\/ \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u0442\u043e\u043a\u0438 \u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043d\u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f - \u043a\u0430\u0448\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \/\/ \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u043c\u043e\u043d\u043e\u043f\u043e\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u0430 pthread_mutex_lock(&amp;log_mutex); fprintf(log_file, \"%s\", log_txt); fflush(log_file); pthread_mutex_unlock(&amp;log_mutex); } \/\/ \u043d\u0443 \u0438 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u0430\u043a \u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0435\u0448\u0438\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \/\/ \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c pthread_mutex_destroy(&amp;accept_mutex); pthread_mutex_destroy(&amp;log_mutex); return NULL; }  int main(void) { int i;  int thread_num[THREAD_COUNT]; pthread_t id[THREAD_COUNT];  \/\/ \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438 \u0444\u0430\u0439\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 if ((log_file = fopen(\".\/log\/funhouse_mirror.log\", \"a\")) == NULL) { perror(\"log file open error \"); return (44); } if ((marks_file = fopen(\".\/data\/marks\/funhouse_mirror.marks\", \"a\")) == NULL) { perror(\"marks file open error \"); return (44); }  pid_t pid = getpid();  \/\/ habr.com\/ru\/post\/154187\/ \/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 FCGX_Init(); fprintf(log_file, \"\\n\\n\\nfunhouse_mirror started \\nLib is inited pid %d \\n\", pid); fflush(log_file);  \/\/\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u043e\u043a\u0435\u0442 socketId = FCGX_OpenSocket(SOCKET_PATH, 20); if (socketId &lt; 0) { \/\/\u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0441\u043e\u043a\u0435\u0442\u0430 fprintf(log_file, \" socketID &lt; 0 and = %d \", socketId); fflush(log_file); return (11); } fprintf(log_file, \"Socket is opened\\n\"); fflush(log_file);  \/\/ \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \/\/ \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0435 for (i = 0; i &lt; THREAD_COUNT; i++) { thread_num[i] = i; pthread_create(&amp;(id[i]), NULL, do_thread, &amp;(thread_num[i])); }  \/\/ \u0436\u0434\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \/\/ \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0442\u0430\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \/\/ \u0438 \u043f\u043e\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043e\u0448\u0438\u0431\u043a\u0435 \/\/ \u0436\u0434\u0435\u043c \u0432\u0441\u0435\u0445 for (i = 0; i &lt; THREAD_COUNT; i++) { pthread_join(id[i], NULL); fprintf(log_file, \"Thread %lu is joined\\n\", id[i]); fflush(log_file); } return 0; } <\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/588580\/\"> https:\/\/habr.com\/ru\/articles\/588580\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0438\u043b\u0438 <\/p>\n<h3>\u0412\u0435\u0431 \u043c\u043e\u0440\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u0435\u043b\u043e\u043a <\/h3>\n<p><sup>(\u043f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442)<\/sup><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0443\u0441\u043f\u0435\u0445\u0438 \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438 data science \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0443\u043a \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0441\u0442\u0430\u0434\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438 \u0441\u043b\u043e\u0432\u0430. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0441\u0435\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0451 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0439, \u0431\u044b\u0441\u0442\u0440\u0435\u0439 (\u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u043a\u0430) \u041c\u043e\u0436\u043d\u043e \u0438 \u0441 AI, \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 AI, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0443!<\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0432\u0430\u0442\u0430 \u0434\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0439 \u043f\u043b\u0438\u043d\u0442\u0443\u0441\u0430. \u041e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432. \u0412\u0441\u0451 \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445.<\/p>\n<p>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043d\u0430 \u043f\u043e\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0435\u0439 \u0434\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0412\u0441\u0451 \u044f\u0441\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0431\u043e\u0437\u0440\u0438\u043c\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0433\u043e\u0434\u0430\u043c\u0438. \u0418 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0441\u0432\u043e\u0451\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0431\u044b \u0447\u0442\u043e \u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0443\u0442 \u0432\u0441\u0451 \u0432 \u043a\u0443\u0447\u0435, \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b &#8212; \u044f\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0443\u0434\u0430 \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439, \u043a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c web \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a \u043f\u0438\u0442\u043e\u043d\u0443 \u0432 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u043b\u043d\u043e, \u043d\u043e \u0434\u044c\u044f\u0432\u043e\u043b \u0442\u043e \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u043c\u0435\u043b\u043e\u0447\u0430\u0445. \u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0435\u0431\u043c\u043e\u0440\u0434\u0443 \u0432 10 \u0441\u0442\u0440\u043e\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e \u043e\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u0432\u0430\u043c \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u044f\u043c\u043e\u0439 IP \u0438 \u0432\u0441\u0435 \u0431\u043e\u0442\u044b \u043c\u0438\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043d\u0435\u0433\u043e \u0441\u0442\u0443\u0447\u0430\u0442\u044c, \u043e\u0442\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443\u0448\u043b\u044b\u0439 \u043a\u0430\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u043b\u0435\u0437\u0435\u0442! \u041d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f! \u041d\u0443\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0441\u0442\u0440\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u041a\u043e\u0434, \u0441\u0432\u043e\u0439, \u0435\u0449\u0451 \u043d\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435\u0437\u0430\u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0447\u0435\u043d\u044b\u0439, \u0437\u0434\u0435\u0441\u044c \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043d\u043e\u0441\u0438\u043c \u043c\u043e\u0440\u0434\u0443 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u0435\u0451 \u0438 \u0441\u0442\u0440\u043e\u0438\u043c \u043a \u043d\u0435\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c. <\/p>\n<p>\u041f\u043e\u043a\u0443\u043f\u0430\u0435\u043c\/\u0430\u0440\u0435\u043d\u0434\u0443\u0435\u043c\/\u0431\u0435\u0440\u0451\u043c_\u0432_\u0434\u0430\u0440 VDS, \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u0445\u043e\u043d\u044c\u043a\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 KVM, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u043c FreeBSD. \u0418\u0445 \u043a\u0430\u043a-\u0442\u043e \u0432 \u0441\u0435\u0442\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0438 \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0442\u0440\u044e\u043a\u0438 \u043d\u0430 FreeBSD \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u043e \u0438 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e. (\u0418 \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 512, \u0430 \u0442\u043e \u0438 \u0432 128 \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u043e \u043f\u043e \u0434\u0435\u043d\u044c\u0433\u0430\u043c).<\/p>\n<p>\u0422\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0442\u043e\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0445, \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 &#8212; OpenVPN. \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421 \u043a \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0430 FreeBSD.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0443\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0430 \u0433\u0434\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0433\u0434\u0435 \u043a\u043b\u0438\u0435\u043d\u0442? \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0430 VDS \u0443 \u043c\u0435\u043d\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 VPN. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0430, \u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u043d\u0435 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u041d\u043e, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d, \u0442\u043e \u044f \u043f\u043e\u0442\u0435\u0440\u044f\u044e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c VDS \u0438 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u0432\u043d\u0443\u0442\u0440\u044c, \u043a \u0441\u0443\u043f\u0435\u0440\u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0441\u0432\u043e\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0438 \u043a \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0435\u0441\u0442\u044c, \u0432 \u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u043c \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438, \u0442\u043e \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0432\u0437\u043b\u043e\u043c\u0435 \u0435\u0433\u043e, \u0443\u0442\u0435\u043a\u0443\u0442 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0445\u0430\u043a\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0412 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432, \u0432\u0441\u0435 \u043d\u0430\u0433\u043b\u0443\u0445\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u0437\u0432\u043d\u0435, \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 VPN \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443 \u0434\u043b\u044f FastCGI.<\/p>\n<p>\u0418\u0442\u0430\u043a \u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 VSD \u0441 FreeBSD \u043e\u0431\u044b\u0447\u043d\u044b\u0439 web \u0441\u0435\u0440\u0432\u0435\u0440 lighttpd, \u043e\u0431\u044b\u0447\u043d\u044b\u0439 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c FastCGI \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 openvpn \u043d\u0430 \u0441\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u043b\u0441\u044f \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0438\u0440\u0443, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043c\u0438\u0440. \u041d\u043e \u0432\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: &#8212; \u0430 \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430? \u0415\u0441\u043b\u0438 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e, \u0442\u043e \u0442\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &#8212; \u043f\u0440\u044f\u043c\u043e\u0439 IP \u0438 \u0441\u043e\u0431\u043b\u0430\u0437\u043d \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u044f\u043c\u043e\u0439, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u0443\u0434\u0430 \u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0438 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VPN \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e scp \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 FreeBSD \u0438 \u043e\u0442\u0442\u0443\u0434\u0430 \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0435\u043c \u0436\u0435 lighttpd. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0438 \u0447\u0435\u0440\u0435\u0437 10 \u043c\u0438\u043d\u0443\u0442 \u0443\u0434\u0430\u043b\u0438\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043c\u0438\u0440\u0435 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u0433\u043e, \u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043d\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<p>\u041e\u0442\u0434\u0430\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, lighhtpd \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u043f\u0440\u043e\u0441\u0430 \u0441 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 &#8212; \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e? \u041e\u0442\u0432\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0435\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u043e FastCGI \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b. \u041c\u0430\u043b\u043e \u043b\u0438, \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 )) \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043e\u0442\u0432\u043b\u0435\u043a\u043b\u0438, \u043f\u043e\u043e\u0431\u0435\u0434\u0430\u0442\u044c \u0443\u0448\u0451\u043b \u0438 \u0442.\u0434. \u0421\u0435\u0441\u0441\u0438\u044f \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043b\u0430\u0441\u044c \u0438 \u0447\u0442\u043e \u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0430 \u043d\u043e\u0432\u0430\u044f, \u0432\u043e\u0442 \u0432 \u043d\u043e\u0432\u043e\u043c FastCGI \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u0438 \u0432\u0441\u044f \u0438\u043d\u0444\u043e \u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430.<\/p>\n<p>\u041d\u0443 \u0438 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><a href=\"https:\/\/github.com\/ChePeter\/funhouse_mirror\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441 Github<\/a><\/p>\n<p>\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443: <a href=\"http:\/\/107.189.8.250\/\" rel=\"noopener noreferrer nofollow\">http:\/\/107.189.8.250\/<\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0415\u0449\u0451 \u0440\u0430\u0437 &#8212; \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438 \u0433\u043e\u0442\u043e\u0432 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0430\u0432\u043a\u0438 \u0438 \u043a\u0440\u0438\u0442\u0438\u043a\u0443.<\/p>\n<h2>FreeBSD \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0438<\/h2>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c FreeBSD \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \/etc\/rc.conf<\/p>\n<pre><code class=\"bash\">sendmail_enable=\"NONE\" hostname=\"fun-house-serv.mirror\" ifconfig_vtnet0=\"inet 107.189.8.250 netmask 255.255.255.0\" defaultrouter=\"107.189.8.1\" pf_enable=\"YES\" pf_rules=\"\/etc\/pf.conf\" pflog_enable=\"YES\"  gateway_enable=\"YES\" sshd_enable=\"YES\"  lighttpd_enable=\"YES\" # Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable dumpdev=\"AUTO\"  openvpn_enable=\"YES\" openvpn_configfile=\"\/usr\/local\/etc\/openvpn\/server.conf\" openvpn_dir=\"\/usr\/local\/etc\/openvpn\"<\/code><\/pre>\n<p> \u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u043b<\/p>\n<pre><code class=\"bash\">log_opt = \"log\" ext_if=\"vtnet0\" int_if=\"tun0\" icmp_types=\"echoreq\"  #block all set skip on lo set skip on int_if scrub in  block in $log_opt on $ext_if pass out keep state  # Protect against spoofing antispoof quick for { lo $int_if }  # Allow other traffic pass in on $ext_if proto tcp to ($ext_if) port ssh flags S\/SA keep state pass in on $ext_if proto tcp to ($ext_if) port http flags S\/SA keep state pass in on $ext_if proto udp to any port 1194 pass in inet proto icmp from ($int_if:network) icmp-type $icmp_types keep state pass in inet proto icmp from ($ext_if:network) icmp-type $icmp_types keep state<\/code><\/pre>\n<p>\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u0437\u0432\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e ssh, http \u0438 vpn (1194 \u043f\u043e\u0440\u0442). \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0441 tun0, \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0424\u043e\u0440\u0432\u0430\u0440\u0434\u0438\u043d\u0433 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044e\u0437\u0435\u0440\u0430 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e ssh \u043d\u0430 \u0431\u0435\u0441\u043f\u0430\u0440\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u043a\u043b\u044e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b scp \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f. \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0443\u0436\u0435\u043d \u0438 \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u041d\u0443 \u0438 \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u0430\u0440\u043a\u043e\u0437\u044f\u0431\u0440\u043e\u0432 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, <a href=\"https:\/\/unix1.jinr.ru\/~lavr\/vt\/vtcons.html\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c FreeBSD<\/a>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \/boot\/loader.conf:<\/p>\n<pre><code>hw.vga.textmode=1<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u0430\u0432\u0438\u043c lighttpd \u0438 openvpn \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u044e\u0437\u0435\u0440\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 www. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u043f\u0430\u043f\u043a\u0438 lighttpd. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044e\u0437\u0435\u0440\u0430 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c openvpn, \u043b\u0443\u0447\u0448\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 root. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0438 lighttpd \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u043c \u0432\u043e FreeBSD \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u043f\u043a\u0430\u043c. \u041f\u0440\u0430\u0432\u0438\u043c <code>\/usr\/local\/etc\/lighttpd\/lighttpd.conf<\/code><\/p>\n<pre><code class=\"bash\">var.log_root    = \"\/var\/log\/lighttpd\" var.server_root = \"\/usr\/local\/www\/lighttpd\" var.state_dir   = \"\/var\/run\" var.home_dir    = \"\/var\/run\/lighttpd\" var.conf_dir    = \"\/usr\/local\/etc\/lighttpd\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432 lighttpd.conf \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 URL \u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code class=\"bash\">$HTTP[\"host\"] =~ \"107.189.8.250\/*\" {     url.rewrite-once = (         \"^(www\\.)?\\\/upload\\.html$\" => \"\",         \"^(www\\.)?\\\/main\\.fcgi$\" => \"\",         \"^(www\\.)?(.*)?\\.fcgi\\?$\" => \"\",         \"^(www\\.)?\\\/images\\\/(.*)?$\" => \"\",         \"^\/(.*)?\" => \"\/upload.html\"   ) }<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c \u0442\u0430\u043c \u0436\u0435 modules.conf<\/p>\n<pre><code class=\"bash\">server.modules = (   \"mod_rewrite\",   \"mod_access\", #  \"mod_evasive\", #  \"mod_auth\", #  \"mod_authn_file\", #  \"mod_redirect\", #  \"mod_setenv\", #  \"mod_alias\", )<\/code><\/pre>\n<p>\u0438 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u043c \u0436\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>fastcgi<\/code><\/p>\n<pre><code class=\"bash\">## ## FastCGI (mod_fastcgi) ## include \"conf.d\/fastcgi.conf\"<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043c <code>fastcgi.conf<\/code>, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c<\/p>\n<pre><code class=\"bash\">server.modules += ( \"mod_fastcgi\" ) fastcgi.server    = (     \".fcgi\" => (         \"main\" => (             # Use host \/ port instead of socket for TCP fastcgi              \"host\" => \"192.168.0.66\",              \"port\" => 8888,              \"check-local\" => \"disable\",                  )                ) )<\/code><\/pre>\n<p>&#171;192.168.0.66&#187; \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043c\u0435\u0442\u0440\u043e\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043d\u0435\u043c \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u042d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u043c\u043e\u0436\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0430 \u044d\u0442\u043e\u0442 &#171;192.168.0.66&#187; \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 VPN \u0447\u0435\u0440\u0435\u0437 tun0. \u041d\u0443 \u0438 \u043f\u043e\u0440\u0442 8888 \u0432\u044b\u0431\u0440\u0430\u043d \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c jupyter notebook. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0421 \u0438 \u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 1024.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<pre><code class=\"bash\">mkdir \/usr\/local\/www\/data\/ mkdir \/usr\/local\/www\/data\/images chown &lt;user>:www \/usr\/local\/www\/data\/images\/ chmod 710 \/usr\/local\/www\/data\/images\/<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043d\u0430\u0448 &lt;user> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0447\u043b\u0435\u043d\u043e\u043c \u0433\u0440\u0443\u043f\u043f\u044b www \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/usr\/local\/www\/data\/images<\/code> \u0438 \u0443 \u0433\u0440\u0443\u043f\u043f\u044b www \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c OpenVPN, (<a href=\"https:\/\/www.site-motor.ru\/docs\/freebsd\/security_openvpn.html\" rel=\"noopener noreferrer nofollow\">\u0432\u043e\u0442 \u0442\u0443\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439<\/a>), \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f openvpn<\/p>\n<pre><code class=\"bash\">mkdir \/etc\/openvpn mkdir \/etc\/openvpn\/keys mkdir \/var\/log\/openvpn pw useradd -n _openvpn -s \/usr\/bin\/nologin <\/code><\/pre>\n<p><code>_openvpn<\/code> &#8212; \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u044e\u0437\u0435\u0440, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e openvpn \u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 <code>login\/shell\/home_dir<\/code> \u0435\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f nobody.<\/p>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043c <code>\/usr\/local\/etc\/openvpn\/server.conf<\/code><\/p>\n<pre><code class=\"bash\">proto udp port 1194 dev tun0 topology subnet  ca\/usr\/local\/etc\/openvpn\/keys\/ca.crt cert\/usr\/local\/etc\/openvpn\/keys\/server.crt key\/usr\/local\/etc\/openvpn\/keys\/server.key dh\/usr\/local\/etc\/openvpn\/keys\/dh2048.pem  server 10.0.1.0 255.255.255.0 route 192.168.0.0 255.255.255.0 push \"redirect-gateway def1\"  keepalive 10 120 comp-lzo user _openvpn group _openvpn daemon openvpn persist-key persist-tun  tls-server tls-auth \/usr\/local\/etc\/openvpn\/keys\/ta.key 0 verb 3 status \/var\/log\/openvpn\/openvpn-status.log log-append<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-390014","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390014","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=390014"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390014\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=390014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=390014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=390014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}