{"id":394233,"date":"2024-06-29T11:29:01","date_gmt":"2024-06-29T11:29:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394233"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394233","title":{"rendered":"<span>\u0422\u0451\u043c\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0438\u0437 Raspberry Pi<\/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>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u0437 Raspberry Pi \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0435\u0442\u0438, \u0434\u0430 \u0445\u043e\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 tor.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/954\/ddb\/595\/954ddb595824b284203d68863627b365.jpg\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/954\/ddb\/595\/954ddb595824b284203d68863627b365.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">github<\/a> \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<h2>\u042d\u0442\u0430\u043f \u043f\u0435\u0440\u0432\u044b\u0439: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 DPI<\/h2>\n<p>\u0426\u0435\u043d\u0442\u0440\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 DPI, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/users\/Evengard\/\" rel=\"noopener noreferrer nofollow\">@Evengard<\/a> (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e &#8212; <a href=\"https:\/\/habr.com\/ru\/post\/548110\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/548110\/<\/a>).<br \/>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0434\u0435\u043b\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c username \u043d\u0430 \u0438\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"bash\">mkdir build cd build wget https:\/\/openresty.org\/download\/openresty-1.19.9.1.tar.gz   # or latest release from https:\/\/openresty.org\/en\/download.html tar -xzvf openresty-1.19.9.1.tar.gz mv openresty-1.19.9.1 openresty git clone https:\/\/github.com\/fffonion\/lua-resty-openssl git clone https:\/\/github.com\/fffonion\/lua-resty-openssl-aux-module git clone https:\/\/github.com\/Evengard\/lua-resty-getorigdest-module git clone https:\/\/github.com\/iryont\/lua-struct git clone https:\/\/github.com\/Evengard\/lua-resty-socks5 cd openresty .\/configure --prefix=\/home\/username\/nginxdpi --with-cc=gcc --add-module=\/home\/username\/build\/lua-resty-openssl-aux-module --add-module=\/home\/username\/build\/lua-resty-openssl-aux-module\/stream --add-module=\/home\/username\/build\/lua-resty-getorigdest-module\/src make -j4 &amp;&amp; make install  cp -r \/home\/username\/build\/lua-resty-getorigdest-module\/lualib\/* \/home\/username\/nginxdpi\/lualib\/  cp -r \/home\/username\/build\/lua-resty-openssl\/lib\/resty\/* \/home\/username\/nginxdpi\/lualib\/resty\/ cp -r \/home\/username\/build\/lua-resty-openssl-aux-module\/lualib\/* \/home\/username\/nginxdpi\/lualib\/ cp \/home\/username\/build\/lua-resty-socks5\/socks5.lua \/home\/username\/nginxdpi\/lualib\/resty\/ cp \/home\/username\/build\/lua-struct\/src\/struct.lua \/home\/username\/nginxdpi\/lualib\/<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \/scripts\/startDpi.sh:<\/p>\n<ul>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 eth0 \u043d\u0430 \u0432\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \/opt\/nginxdpi\/bin\/openresty \u0438 \/opt\/nginxdpi\/cfg\/nginx.conf \u043d\u0430 \u0432\u0430\u0448 \u043f\u0443\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \/DPI\/nginx.conf:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 127.0.0.1 \u0438 9050 \u043d\u0430 \u0432\u0430\u0448 SOCKS5 server (\u0435\u0433\u043e \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435)<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e of the DNS \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435, \u043d\u0430\u043f\u0438\u043c\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c 1.1.1.1 \u0438\u043b\u0438 8.8.8.8)<\/p>\n<\/li>\n<\/ul>\n<h2>\u042d\u0442\u0430\u043f \u0432\u0442\u043e\u0440\u043e\u0439: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 TOR<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0442\u043e\u0440 \u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"bash\">sudo apt install tor sudo nano \/etc\/tor\/torrc<\/code><\/pre>\n<p>\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e raspberry pi:<\/p>\n<pre><code class=\"bash\">SocksPort 192.168.1.1:9050 SocksPort 127.0.0.1:9050 SocksPolicy accept 192.168.1.0\/24 RunAsDaemon 1 DataDirectory \/var\/lib\/tor  VirtualAddrNetwork 10.0.0.0\/10 AutomapHostsOnResolve 1 TransPort 9040 DNSPort 192.168.1.1:9053<\/code><\/pre>\n<h2>\u042d\u0442\u0430\u043f \u0442\u0440\u0435\u0442\u0438\u0439: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 golang<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c golang \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044f <a href=\"https:\/\/golang.org\/doc\/install\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0433\u0430\u0439\u0434\u0443<\/a><\/p>\n<h2>\u042d\u0442\u0430\u043f \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439: \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h2>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 scripts\/startDefaultDns.sh \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1:53 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 DNS<br \/>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 scripts\/startTorDns.sh \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1:9053 \u043d\u0430 DNS \u0432\u0430\u0448\u0435\u0433\u043e TOR<\/p>\n<h2>\u042d\u0442\u0430\u043f \u043f\u044f\u0442\u044b\u0439: \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code>go run server.go<\/code><\/pre>\n<p>\u041b\u0438\u0431\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<pre><code>go build server.go .\/server<\/code><\/pre>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 web \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ip_your_raspberrypi:8080<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/880\/03d\/4f3\/88003d4f3bb04dcf0c02ca6ecf31f452.png\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/880\/03d\/4f3\/88003d4f3bb04dcf0c02ca6ecf31f452.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 DPI: \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DNS \u043e\u0442 \u0442\u043e\u0440\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 .onion \u0441\u0430\u0439\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 &#8216;MASQURADE&#8217; \u0432 iptables \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NAT<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0430\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u0448 raspberry pi \u0448\u043b\u044e\u0437\u043e\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0435\u0442\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435! \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0443\u0447\u0430\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> &#8212; <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/yyasha\/raspberrypi_router<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/584558\/\"> https:\/\/habr.com\/ru\/articles\/584558\/<\/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>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u0437 Raspberry Pi \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0435\u0442\u0438, \u0434\u0430 \u0445\u043e\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 tor.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">github<\/a> \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<h2>\u042d\u0442\u0430\u043f \u043f\u0435\u0440\u0432\u044b\u0439: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 DPI<\/h2>\n<p>\u0426\u0435\u043d\u0442\u0440\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 DPI, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/users\/Evengard\/\" rel=\"noopener noreferrer nofollow\">@Evengard<\/a> (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e &#8212; <a href=\"https:\/\/habr.com\/ru\/post\/548110\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/548110\/<\/a>).<br \/>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0434\u0435\u043b\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c username \u043d\u0430 \u0438\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"bash\">mkdir build cd build wget https:\/\/openresty.org\/download\/openresty-1.19.9.1.tar.gz   # or latest release from https:\/\/openresty.org\/en\/download.html tar -xzvf openresty-1.19.9.1.tar.gz mv openresty-1.19.9.1 openresty git clone https:\/\/github.com\/fffonion\/lua-resty-openssl git clone https:\/\/github.com\/fffonion\/lua-resty-openssl-aux-module git clone https:\/\/github.com\/Evengard\/lua-resty-getorigdest-module git clone https:\/\/github.com\/iryont\/lua-struct git clone https:\/\/github.com\/Evengard\/lua-resty-socks5 cd openresty .\/configure --prefix=\/home\/username\/nginxdpi --with-cc=gcc --add-module=\/home\/username\/build\/lua-resty-openssl-aux-module --add-module=\/home\/username\/build\/lua-resty-openssl-aux-module\/stream --add-module=\/home\/username\/build\/lua-resty-getorigdest-module\/src make -j4 &amp;&amp; make install  cp -r \/home\/username\/build\/lua-resty-getorigdest-module\/lualib\/* \/home\/username\/nginxdpi\/lualib\/  cp -r \/home\/username\/build\/lua-resty-openssl\/lib\/resty\/* \/home\/username\/nginxdpi\/lualib\/resty\/ cp -r \/home\/username\/build\/lua-resty-openssl-aux-module\/lualib\/* \/home\/username\/nginxdpi\/lualib\/ cp \/home\/username\/build\/lua-resty-socks5\/socks5.lua \/home\/username\/nginxdpi\/lualib\/resty\/ cp \/home\/username\/build\/lua-struct\/src\/struct.lua \/home\/username\/nginxdpi\/lualib\/<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \/scripts\/startDpi.sh:<\/p>\n<ul>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 eth0 \u043d\u0430 \u0432\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \/opt\/nginxdpi\/bin\/openresty \u0438 \/opt\/nginxdpi\/cfg\/nginx.conf \u043d\u0430 \u0432\u0430\u0448 \u043f\u0443\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \/DPI\/nginx.conf:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 127.0.0.1 \u0438 9050 \u043d\u0430 \u0432\u0430\u0448 SOCKS5 server (\u0435\u0433\u043e \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435)<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e of the DNS \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435, \u043d\u0430\u043f\u0438\u043c\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c 1.1.1.1 \u0438\u043b\u0438 8.8.8.8)<\/p>\n<\/li>\n<\/ul>\n<h2>\u042d\u0442\u0430\u043f \u0432\u0442\u043e\u0440\u043e\u0439: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 TOR<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0442\u043e\u0440 \u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"bash\">sudo apt install tor sudo nano \/etc\/tor\/torrc<\/code><\/pre>\n<p>\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e raspberry pi:<\/p>\n<pre><code class=\"bash\">SocksPort 192.168.1.1:9050 SocksPort 127.0.0.1:9050 SocksPolicy accept 192.168.1.0\/24 RunAsDaemon 1 DataDirectory \/var\/lib\/tor  VirtualAddrNetwork 10.0.0.0\/10 AutomapHostsOnResolve 1 TransPort 9040 DNSPort 192.168.1.1:9053<\/code><\/pre>\n<h2>\u042d\u0442\u0430\u043f \u0442\u0440\u0435\u0442\u0438\u0439: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 golang<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c golang \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044f <a href=\"https:\/\/golang.org\/doc\/install\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0433\u0430\u0439\u0434\u0443<\/a><\/p>\n<h2>\u042d\u0442\u0430\u043f \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439: \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h2>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 scripts\/startDefaultDns.sh \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1:53 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 DNS<br \/>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 scripts\/startTorDns.sh \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 192.168.1.1:9053 \u043d\u0430 DNS \u0432\u0430\u0448\u0435\u0433\u043e TOR<\/p>\n<h2>\u042d\u0442\u0430\u043f \u043f\u044f\u0442\u044b\u0439: \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code>go run server.go<\/code><\/pre>\n<p>\u041b\u0438\u0431\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<pre><code>go build server.go .\/server<\/code><\/pre>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 web \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ip_your_raspberrypi:8080<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 DPI: \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DNS \u043e\u0442 \u0442\u043e\u0440\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 .onion \u0441\u0430\u0439\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 &#8216;MASQURADE&#8217; \u0432 iptables \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NAT<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0440<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0430\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u0448 raspberry pi \u0448\u043b\u044e\u0437\u043e\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0435\u0442\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435! \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0443\u0447\u0430\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> &#8212; <a href=\"https:\/\/github.com\/yyasha\/raspberrypi_router\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/yyasha\/raspberrypi_router<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/584558\/\"> https:\/\/habr.com\/ru\/articles\/584558\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-394233","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394233","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=394233"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394233\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}