{"id":357508,"date":"2024-05-20T23:52:20","date_gmt":"2024-05-20T23:52:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=357508"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=357508","title":{"rendered":"<span>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0430 OpenWrt \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u043e\u043a\u0441\u0438 VLESS, Shadowsocks, Shadowsocks2022. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 sing-box \u0438 tun2socks<\/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>\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u043a\u0430\u043a \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 Shadowsocks, VMess, VLESS, Trojan \u0438 \u0434\u0430\u0436\u0435 SOCKS5 proxy \u0438 \u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>\u0422\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u0442\u044c Wireguard \u0438 OpenVPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. C \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SOCKS5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0432\u044b\u0442\u0435\u043a\u0448\u0438\u0439 \u0438\u0437 \u043d\u0435\u0433\u043e Shadowsocks, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f \u0438\u0445 \u043c\u044b <a href=\"https:\/\/github.com\/openwrt\/packages\/blob\/master\/net\/shadowsocks-libev\/README.md#recipes\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442<\/a>, \u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u043d\u0435\u0433\u043e \u0432\u043e \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<p>Sing-box \u0443\u043c\u0435\u0435\u0442 \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u0443\u043c\u0435\u0435\u0442 tun2socks \u0438 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435. \u041d\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c (\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430) \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 sing-box, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f tun2socks.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439. \u041e\u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u043e\u043d\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 WG \u0438 OpenVPN, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>\u0412\u0441\u0451 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0434\u043b\u044f tun2socks \u0438 sing-box \u043d\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 LuCi.<\/p>\n<h2>tun2socks<\/h2>\n<p><a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/xjasonlyu\/tun2socks<\/a><\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<ul>\n<li>\n<p>HTTP<\/p>\n<\/li>\n<li>\n<p>SOCKS4\/SOCKS5<\/p>\n<\/li>\n<li>\n<p>Shadowsocks (&#171;\u0441\u0442\u0430\u0440\u0430\u044f&#187; \u0432\u0435\u0440\u0441\u0438\u044f)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u0435\u043c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 8.8M.<\/p>\n<p>\u041e\u043d \u0446\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 tun \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043f\u0440\u043e\u043a\u0441\u0438. \u0427\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0448\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 firewall.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442\u0430 tun2socks \u043d\u0435\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 OpenWrt, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441 <a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\/releases\" rel=\"noopener noreferrer nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>. \u0411\u043b\u0430\u0433\u043e \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 MIPS \u0438 ARM.<\/p>\n<p>\u0413\u043b\u044f\u043d\u0443\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u0435<\/p>\n<pre><code>opkg print-architecture <\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 Xioami mi3g v1 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code>arch all 1 arch noarch 1 arch mipsel_24kc 10 <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 mipsle. \u041d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0431\u043e mips, \u043b\u0438\u0431\u043e mipsle.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440 \u0432 \/tmp.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f mipsle:<\/p>\n<pre><code>wget https:\/\/github.com\/xjasonlyu\/tun2socks\/releases\/download\/v2.5.1\/tun2socks-linux-mipsle-softfloat.zip unzip tun2socks-linux-mipsle-softfloat.zip scp tun2socks-linux-mipsle-softfloat root@192.168.1.1:\/tmp\/ <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a<\/p>\n<pre><code>root@OpenWrt:~# \/tmp\/tun2socks-linux-mipsle-softfloat --help Usage of .\/tun2socks-linux-mipsle-softfloat:   -config string <\/code><\/pre>\n<p>Help \u0432\u044b\u0432\u0435\u043b\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0451 \u043e\u043a. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430<\/p>\n<pre><code>\/tmp\/tun2socks-linux-mips-softfloat: line 1: syntax error: unexpected \"(\" <\/code><\/pre>\n<p>\u0437\u043d\u0430\u0447\u0438\u0442, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0432 <code>\/usr\/bin\/<\/code> \u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/p>\n<pre><code>mv tun2socks-linux-mipsle-softfloat \/usr\/bin\/tun2socks <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 kmod-tun<\/p>\n<pre><code>opkg update &amp;&amp; opkg install kmod-tun <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 firewall<\/p>\n<p>tun2socks \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u043c\u0443 ip.<br \/> \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 <code>\/etc\/config\/network<\/code><\/p>\n<pre><code>config interface 'tun0'         option device 'tun0'         option proto 'static'         option ipaddr '172.16.250.1'         option netmask '255.255.255.0' <\/code><\/pre>\n<p>\u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e <code>ip a<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 tun2socks.<\/p>\n<p>\u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c VPN, \u0442\u043e tun0 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043d\u044f\u0442. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 tun1 \u0442\u0443\u0442 \u0438 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0437\u043e\u043d\u0443 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \/etc\/config\/firewall<\/p>\n<pre><code>config zone         option name 'tun'         option forward 'REJECT'         option output 'ACCEPT'         option input 'REJECT'         option masq '1'         option mtu_fix '1'         option device 'tun0'         option family 'ipv4'  config forwarding         option name 'lan-tun'         option dest 'tun'         option src 'lan'         option family 'ipv4' <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>device<\/code>, \u0430 \u043d\u0435 <code>network<\/code>.<\/p>\n<p>\u0420\u0435\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0442\u044c<\/p>\n<pre><code>service network restart <\/code><\/pre>\n<h3>\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a<\/h3>\n<p>\u041d\u0430\u043a\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043a\u043b\u0430\u0434\u0451\u043c \u0435\u0433\u043e \u0432 <code>\/etc\/init.d\/tun2socks<\/code><\/p>\n<pre><code>#!\/bin\/sh \/etc\/rc.common  USE_PROCD=1  # starts after network starts START=40 # stops before networking stops STOP=89  PROG=\/usr\/bin\/tun2socks IF=\"tun0\" PROTO=\"$PROTO\" METHOD_USER=\"$METHOD\/USER\" PASS=\"$PASS\" HOST=\"$HOST\" PORT=\"$PORT\"  start_service() {         procd_open_instance         procd_set_param command \"$PROG\" -device \"$IF\" -proxy \"$PROTO\":\/\/\"$METHOD_USER\":\"$PASS\"@\"$HOST\":\"$PORT\"         procd_set_param stdout 1         procd_set_param stderr 1         procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}         procd_close_instance } <\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p>Shadowsocks<\/p>\n<pre><code>METHOD_USER=\"aes-256-gcm\" PASS=\"ochslozniyparol\" HOST=\"domain.com\" PORT=\"8388\" <\/code><\/pre>\n<p>Socks5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f<\/p>\n<pre><code>PROTO=\"socks5\" #METHOD_USER=\"aes-256-gcm\" #PASS=\"ochslozniyparol\" HOST=\"domain.com\" PORT=\"46202\" <\/code><\/pre>\n<p>Socks5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c<\/p>\n<pre><code>PROTO=\"socks5\" METHOD_USER=\"user\" PASS=\"ochslozniyparol\" HOST=\"domain.com PORT=\"1080\" <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e METHOD_USER \u043d\u0430\u0437\u0432\u0430\u043b \u0442\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f SS &#8212; \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0432 socks5 &#8212; \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u043d.<\/p>\n<p>\u0414\u043b\u044f HTTP \u0438 SOCKS4 \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0430 \u0436\u0435.<\/p>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u0436\u0435 \u0447\u0430\u0441\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u043e\u043f\u0430\u0441\u043d\u043e.<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c, \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c<\/p>\n<pre><code>chmod +x \/etc\/init.d\/tun2socks ln -s ..\/init.d\/tun2socks \/etc\/rc.d\/S40tun2socks service tun2socks start <\/code><\/pre>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>\u0413\u043b\u044f\u043d\u0443\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code>logread -f -e tun2socks <\/code><\/pre>\n<p>\u041f\u043e\u0442\u0435\u0441\u0442\u0438\u0442\u044c \u0431\u0435\u0437 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a<\/p>\n<pre><code>tun2socks -device tun0 -proxy ss:\/\/aes-256-gcm:ochslozniyparol@domain.com:8388 -loglevel debug <\/code><\/pre>\n<p>\u041f\u0440\u0438 <code>-loglevel debug<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 tun2socks. \u041d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e TCP \u0438 UDP. loglevel \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u0443\u0448\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\/wiki\/Memory-Optimization\" rel=\"noopener noreferrer nofollow\">\u0446\u0435\u043b\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/a> \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c.<\/p>\n<p><code>ping -I<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442 \u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u041f\u0430\u043a\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 &#171;\u0445\u043e\u0434\u0438\u0442\u044c&#187; (\u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u0434\u043e \u0445\u043e\u0441\u0442\u0430 \u043e\u043d\u0438 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u044f\u0442) \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c curl \u0438 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>Curl \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<pre><code>curl --interface tun0 ifconfig.me <\/code><\/pre>\n<p>Curl \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0434\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h2>Sing-box<\/h2>\n<p>\u0412 OpenWrt 23.05 <a href=\"https:\/\/github.com\/openwrt\/packages\/pull\/20069\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d<\/a> \u043f\u0430\u043a\u0435\u0442 sing-box. \u041e\u043d \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>SOCKS5 proxy<\/p>\n<\/li>\n<li>\n<p>HTTP proxy<\/p>\n<\/li>\n<li>\n<p>Shadowsocks \u0432\u0435\u0440\u0441\u0438\u0438 2022-* \u0438 \u0441\u0442\u0430\u0440\u044b\u0435 aes-*<\/p>\n<\/li>\n<li>\n<p>VMess \u0438 VLESS<\/p>\n<\/li>\n<li>\n<p>Trojan \u0418 <a href=\"https:\/\/sing-box.sagernet.org\/configuration\/outbound\/#fields\" rel=\"noopener noreferrer nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u0435\u043c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 21.5MB.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0414\u043b\u044f OpenWrt 23.05 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e<\/p>\n<pre><code>opkg update &amp;&amp; opkg install sing-box <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 22.03 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 <code>opkg print-architecture<\/code><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0439\u0442\u0438 \u0435\u0451 \u0432 <a href=\"https:\/\/downloads.openwrt.org\/releases\/23.05.0\/packages\/\" rel=\"noopener noreferrer nofollow\">https:\/\/downloads.openwrt.org\/releases\/23.05.0\/packages\/<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 packages, \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u043a\u0435\u0442 sing-box<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0432 \/tmp<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>opkg install sing-box_1.3.0-1_mips_24kc.ipk<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 21.02 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u0430\u043a\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0434\u0440\u0430 <code>kmod-netlink-diag<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 21.02 \u043d\u0435\u0442.<\/p>\n<pre><code> * pkg_hash_check_unresolved: cannot find dependency kmod-inet-diag for sing-box <\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun0 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, OpenVPN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 tun), \u0442\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 tun1 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441 sing-box \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u044e\u0437\u0435\u0440\u0430 sing-box. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/openwrt\/packages\/issues\/21408\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0442 \u043f\u0440\u0430\u0432<\/a> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>\/dev\/net\/tun<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c sing-box \u043d\u0430\u0434\u043e \u043e\u0442 root.<\/p>\n<p>\u0411\u0435\u0437 root \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<pre><code>Fri Jun  9 06:43:41 2023 daemon.err sing-box[9272]: FATAL[0000] start service: initialize inbound\/tun[0]: configure tun interface: permission denied <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 <code>\/etc\/config\/sing-box<\/code>. \u0422\u0430\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430\u0434\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0432 1 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <code>enabled<\/code>. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432 <code>..\/init.d\/sing-box<\/code>, \u043f\u0440\u0438 0 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code>config sing-box 'main' option enabled '1' option user 'root' option conffile '\/etc\/sing-box\/config.json' option workdir '\/usr\/share\/sing-box' <\/code><\/pre>\n<p>\u0421\u0430\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>\/etc\/sing-box\/config.json<\/code>. \u041d\u0430\u043c \u043e\u0442 sing-box \u043d\u0443\u0436\u0435\u043d tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 shadowsocks:<\/p>\n<pre><code>{   \"log\": {     \"level\": \"debug\"   },   \"inbounds\": [     {       \"type\": \"tun\",       \"interface_name\": \"tun0\",       \"domain_strategy\": \"ipv4_only\",       \"inet4_address\": \"172.16.250.1\/30\",       \"auto_route\": false,       \"strict_route\": false,       \"sniff\": true     }   ],   \"outbounds\": [     {       \"type\": \"shadowsocks\",       \"server\": \"$HOST\",       \"server_port\": $PORT,       \"method\": \"2022-blake3-aes-128-gcm\",       \"password\": \"$PASS\"     }   ],   \"route\": {     \"auto_detect_interface\": true   } } <\/code><\/pre>\n<p>VLESS (xtls-rprx-vision, reality)<\/p>\n<pre><code>{     \"log\": {       \"level\": \"debug\"     },     \"inbounds\": [       {         \"type\": \"tun\",         \"interface_name\": \"tun0\",         \"domain_strategy\": \"ipv4_only\",         \"inet4_address\": \"172.16.250.1\/30\",         \"auto_route\": false,         \"strict_route\": false,         \"sniff\": true       }     ],       \"outbounds\": [         {           \"type\": \"vless\",           \"server\": \"$HOST\",           \"server_port\": $PORT,           \"uuid\": \"$UUID\",           \"flow\": \"xtls-rprx-vision\",           \"network\": \"tcp\",           \"tls\": {             \"enabled\": true,             \"insecure\": false,             \"server_name\": \"$FAKE_SERVER\",             \"utls\": {               \"enabled\": true,               \"fingerprint\": \"chrome\"             },             \"reality\": {               \"enabled\": true,               \"public_key\": \"$PUBLIC_KEY\",               \"short_id\": \"$SHORT_ID\"             }           }         }       ],     \"route\": {       \"auto_detect_interface\": true     }   } <\/code><\/pre>\n<p>&#171;\u041e\u0431\u044b\u0447\u043d\u044b\u0439&#187; Shadowsocks, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<pre><code>{   \"log\": {     \"level\": \"debug\"   },   \"inbounds\": [     {       \"type\": \"tun\",       \"interface_name\": \"tun0\",       \"domain_strategy\": \"ipv4_only\",       \"inet4_address\": \"172.16.250.1\/30\",       \"auto_route\": false,       \"strict_route\": false,       \"sniff\": true     }   ],   \"outbounds\": [     {       \"type\": \"shadowsocks\",       \"server\": \"$HOST\",       \"server_port\": $PORT,       \"method\": \"aes-256-gcm\",       \"password\": \"$PASS\"     }   ],   \"route\": {     \"auto_detect_interface\": true   } } <\/code><\/pre>\n<p><strong>inbounds<\/strong> &#8212; \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u043e \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 &#171;\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439&#187; \u0442\u0440\u0430\u0444\u0438\u043a. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 SS, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. \u041d\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u043e\u0443\u0442\u0435\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u043e\u0443\u0442\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0447\u0430\u0441\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <strong>tun<\/strong>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e\u0435 \u043f\u0440\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>auto_route<\/code>, \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 tun. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u043b\u044e\u0441 \u0430\u0432\u0442\u043e\u0440 sing-box <a href=\"https:\/\/github.com\/SagerNet\/sing-box\/issues\/100\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0443\u0434\u0435\u0442<\/a> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u0445, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <code>false<\/code>. \u041a\u0430\u043a \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0447\u0435\u0440\u0435\u0437 tun \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>Sing-box \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 TLS DNS, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c auto_route.<br \/> \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c DNS \u0442\u0440\u0430\u0444\u0438\u043a, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 dnscrypt-proxy2 \u0438\u043b\u0438 stubby.<\/p>\n<p><strong>outbounds<\/strong> &#8212; \u044d\u0442\u043e &#171;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439&#187; \u0442\u0440\u0430\u0444\u0438\u043a. \u0417\u0434\u0435\u0441\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438\u043b\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044f. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e shadowsocks2022. \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043c\u0435\u0442\u043e\u0434 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u0441\u0451 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c <a href=\"https:\/\/sing-box.sagernet.org\/configuration\/outbound\/shadowsocks\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438<\/a>.<br \/> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 <a href=\"https:\/\/sing-box.sagernet.org\/configuration\/outbound\/\" rel=\"noopener noreferrer nofollow\">Outbound \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0442\u0440\u0430\u0444\u0438\u043a \u0445\u043e\u0434\u0438\u043b, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c firewall. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0437\u043e\u043d\u0443 \u0438 forwading \u0434\u043b\u044f \u043d\u0435\u0451 \u0432 <code>\/etc\/config\/firewall<\/code><\/p>\n<pre><code>config zone         option name 'tun'         option forward 'ACCEPT'         option output 'ACCEPT'         option input 'ACCEPT'         option masq '1'         option mtu_fix '1'         option device 'tun0'         option family 'ipv4'  config forwarding         option name 'lan-tun'         option dest 'tun'         option src 'lan'         option family 'ipv4' <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e output \u0442\u0440\u0430\u0444\u0438\u043a, \u043a\u0430\u043a \u0443 \u0432\u0441\u0435\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439, \u043d\u043e \u0438 \u0432\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439. \u0411\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430\u043d\u0443\u0442\u044c firewall \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c sing-box<\/p>\n<pre><code>service firewall restart service sing-box start <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438: \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u043b\u0438\u043d\u043a \u0432 <code>\/etc\/rc.d\/<\/code>.<\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>\u0413\u043b\u044f\u043d\u0443\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code>logread -f -e sing-box <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435<\/p>\n<pre><code>service sing-box restart <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0433\u0440\u0443\u0431\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0442\u043e sing-box \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0447\u0435\u0440\u0435\u0437 <code>ip a<\/code> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e. \u041e\u0448\u0438\u0431\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u0432 \u043b\u043e\u0433\u0435.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0434\u043b\u044f tun2socks.<\/p>\n<p><code>ping -I<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442 \u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u041f\u0430\u043a\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 &#171;\u0445\u043e\u0434\u0438\u0442\u044c&#187; (\u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u0434\u043e \u0445\u043e\u0441\u0442\u0430 \u043e\u043d\u0438 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u044f\u0442) \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c curl \u0438 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>Curl \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<pre><code>curl --interface tun0 ifconfig.me <\/code><\/pre>\n<p>Curl \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0434\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u0445<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0430\u043c\u044b\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/767464\/\" rel=\"noopener noreferrer nofollow\">\u0422\u043e\u0447\u0435\u0447\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0430\u043c<\/a>. \u0412\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0442\u0430\u043c, \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>tun0<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a (\u0438 \u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0440\u043e\u0443\u0442\u0435\u0440\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0451\u0442 \u043a \u043f\u043e\u0434\u0441\u0435\u0442\u0438 <code>172.64.195.0\/24<\/code>, \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0442\u0443\u043d\u043d\u0435\u043b\u044c.<br \/> \u041c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044f, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0435\u0442<\/p>\n<\/li>\n<\/ol>\n<pre><code>ip route add 172.64.195.0\/24 via 172.16.250.1 dev tun0 <\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c <strong>\u0432\u0435\u0441\u044c<\/strong> \u0442\u0440\u0430\u0444\u0438\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 (\u0412\u0430\u0448\u0435\u0439 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0435 \u0438\u043b\u0438 \u0445\u043e\u043b\u043e\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0443 \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u0442\u044c\u0441\u044f \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0446\u0435\u043c)<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043a\u0435\u0442 pbr.<\/p>\n<h3>Pbr<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/docs.openwrt.melmac.net\/pbr\/\" rel=\"noopener noreferrer nofollow\">pbr<\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0430\u043c. \u0423 \u043d\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f LuCi.<\/p>\n<pre><code>opkg update &amp;&amp; opkg install pbr luci-app-pbr <\/code><\/pre>\n<p>\u042f \u043b\u0438\u0447\u043d\u043e \u043f\u0430\u043a\u0435\u0442 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u043d\u043e \u0432\u0438\u0434\u0435\u043b \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0435\u0433\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0435\u0433\u043e \u0441\u0447\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<h3>\u0420\u0443\u0447\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h3>\n<p>\u041d\u0443 \u0430 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0441\u0451 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u0441\u0451 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a <a href=\"https:\/\/habr.com\/ru\/articles\/440030\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u043d\u044c\u0448\u0435<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/articles\/767464\/\" rel=\"noopener noreferrer nofollow\">\u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/a>, \u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c firewall.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 <code>\/etc\/iproute2\/rt_tables<\/code><\/p>\n<pre><code>99 vpn <\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0432 <code>\/etc\/config\/network<\/code>. \u0412\u0441\u0435 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u043b\u0430\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 VPN<\/p>\n<pre><code>config rule         option priority '100'         option lookup 'vpn'         option mark '0x1' <\/code><\/pre>\n<p>\u0422\u0430\u043c \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442: \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 vpn, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun0.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <code>\/etc\/hotplug.d\/iface\/30-vpnroute<\/code> \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438:<\/p>\n<pre><code>#!\/bin\/sh  sleep 5 ip route add table vpn default dev tun0 <\/code><\/pre>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0441\u0442\u0430\u0440\u0442 \u0441\u0435\u0442\u0438<\/p>\n<pre><code>service network restart <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 firewall. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c <code>set_mark '0x1'<\/code>.<\/p>\n<p>\u041f\u0430\u0440\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0412\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0441 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c 192.168.56.242 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ol>\n<pre><code>config rule         option name 'From IP through tun'         option src 'lan'         option dest '*'         option proto 'all'         option set_mark '0x1'         option target 'MARK'         option family 'ipv4'         option src_ip '192.168.56.242' <\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0422\u0440\u0430\u0444\u0438\u043a \u043e\u0442 <strong>\u0432\u0441\u0435\u0445<\/strong> \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ol>\n<pre><code>config rule         option name 'All lan through tun'         option src 'lan'         option dest '*'         option proto 'all'         option set_mark '0x1'         option target 'MARK'         option family 'ipv4' <\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0412\u0441\u0451, \u0447\u0442\u043e \u0438\u0434\u0451\u0442 \u043a IP-\u0430\u0434\u0440\u0435\u0441\u0443 1.1.1.1, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0442\u0443\u043d\u043d\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ol>\n<pre><code>config rule         option name 'To IP through tun'         option src 'lan'         option dest '*'         option proto 'all'         option set_mark '0x1'         option target 'MARK'         option family 'ipv4'         option dest_ip '1.1.1.1' <\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0443\u0436\u0435 \u0437\u0430\u0433\u043e\u043d\u044f\u0435\u043c \u0446\u0435\u043b\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 <code>dest_ip<\/code><\/p>\n<\/li>\n<\/ol>\n<pre><code>config rule         option name 'To subnet through tun'         option src 'lan'         option dest '*'         option proto 'all'         option set_mark '0x1'         option target 'MARK'         option family 'ipv4'         option dest_ip '172.64.194.0\/24' <\/code><\/pre>\n<hr\/>\n<p>\u0412\u0441\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u0432\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u0432 <a href=\"https:\/\/t.me\/+8Y3IsnlRjIoxNTFi\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0451\u043c\u00a0\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b\u0435<\/a>.<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u0438 \u043e\u0442 <a class=\"mention\" href=\"\/users\/Andrevich\">@Andrevich<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d \u0438\u0434\u0451\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/755934\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0445\u043e\u0434 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u043d\u0430 OpenWRT \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Passwall (v2ray, xray, trojan) \u0438 tun2socks<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/756178\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0445\u043e\u0434 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u043d\u0430 OpenWRT \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Sing-box (vless, vmess, trojan, ss)<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f tun2socks \u0432 RAM. <a href=\"https:\/\/habr.com\/ru\/articles\/759638\/\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 Outline \u043d\u0430 OpenWRT \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tun2socks<\/a><\/p>\n<\/li>\n<\/ul>\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\/767458\/\"> https:\/\/habr.com\/ru\/articles\/767458\/<\/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>\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u043a\u0430\u043a \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 Shadowsocks, VMess, VLESS, Trojan \u0438 \u0434\u0430\u0436\u0435 SOCKS5 proxy \u0438 \u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>\u0422\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u0442\u044c Wireguard \u0438 OpenVPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. C \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SOCKS5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0432\u044b\u0442\u0435\u043a\u0448\u0438\u0439 \u0438\u0437 \u043d\u0435\u0433\u043e Shadowsocks, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f \u0438\u0445 \u043c\u044b <a href=\"https:\/\/github.com\/openwrt\/packages\/blob\/master\/net\/shadowsocks-libev\/README.md#recipes\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0440\u0442<\/a>, \u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u043d\u0435\u0433\u043e \u0432\u043e \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<p>Sing-box \u0443\u043c\u0435\u0435\u0442 \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u0443\u043c\u0435\u0435\u0442 tun2socks \u0438 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435. \u041d\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c (\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430) \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 sing-box, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f tun2socks.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439. \u041e\u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u043e\u043d\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 WG \u0438 OpenVPN, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>\u0412\u0441\u0451 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0434\u043b\u044f tun2socks \u0438 sing-box \u043d\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 LuCi.<\/p>\n<h2>tun2socks<\/h2>\n<p><a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/xjasonlyu\/tun2socks<\/a><\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<ul>\n<li>\n<p>HTTP<\/p>\n<\/li>\n<li>\n<p>SOCKS4\/SOCKS5<\/p>\n<\/li>\n<li>\n<p>Shadowsocks (&#171;\u0441\u0442\u0430\u0440\u0430\u044f&#187; \u0432\u0435\u0440\u0441\u0438\u044f)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u0435\u043c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 8.8M.<\/p>\n<p>\u041e\u043d \u0446\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 tun \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043f\u0440\u043e\u043a\u0441\u0438. \u0427\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0448\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 firewall.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442\u0430 tun2socks \u043d\u0435\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 OpenWrt, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441 <a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\/releases\" rel=\"noopener noreferrer nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>. \u0411\u043b\u0430\u0433\u043e \u043e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 MIPS \u0438 ARM.<\/p>\n<p>\u0413\u043b\u044f\u043d\u0443\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u0435<\/p>\n<pre><code>opkg print-architecture <\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 Xioami mi3g v1 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code>arch all 1 arch noarch 1 arch mipsel_24kc 10 <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 mipsle. \u041d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0431\u043e mips, \u043b\u0438\u0431\u043e mipsle.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440 \u0432 \/tmp.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f mipsle:<\/p>\n<pre><code>wget https:\/\/github.com\/xjasonlyu\/tun2socks\/releases\/download\/v2.5.1\/tun2socks-linux-mipsle-softfloat.zip unzip tun2socks-linux-mipsle-softfloat.zip scp tun2socks-linux-mipsle-softfloat root@192.168.1.1:\/tmp\/ <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a<\/p>\n<pre><code>root@OpenWrt:~# \/tmp\/tun2socks-linux-mipsle-softfloat --help Usage of .\/tun2socks-linux-mipsle-softfloat:   -config string <\/code><\/pre>\n<p>Help \u0432\u044b\u0432\u0435\u043b\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0451 \u043e\u043a. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430<\/p>\n<pre><code>\/tmp\/tun2socks-linux-mips-softfloat: line 1: syntax error: unexpected \"(\" <\/code><\/pre>\n<p>\u0437\u043d\u0430\u0447\u0438\u0442, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u041f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0432 <code>\/usr\/bin\/<\/code> \u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/p>\n<pre><code>mv tun2socks-linux-mipsle-softfloat \/usr\/bin\/tun2socks <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 kmod-tun<\/p>\n<pre><code>opkg update &amp;&amp; opkg install kmod-tun <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 firewall<\/p>\n<p>tun2socks \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u043c\u0443 ip.<br \/> \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 <code>\/etc\/config\/network<\/code><\/p>\n<pre><code>config interface 'tun0'         option device 'tun0'         option proto 'static'         option ipaddr '172.16.250.1'         option netmask '255.255.255.0' <\/code><\/pre>\n<p>\u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e <code>ip a<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 tun2socks.<\/p>\n<p>\u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c VPN, \u0442\u043e tun0 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043d\u044f\u0442. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 tun1 \u0442\u0443\u0442 \u0438 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0437\u043e\u043d\u0443 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \/etc\/config\/firewall<\/p>\n<pre><code>config zone         option name 'tun'         option forward 'REJECT'         option output 'ACCEPT'         option input 'REJECT'         option masq '1'         option mtu_fix '1'         option device 'tun0'         option family 'ipv4'  config forwarding         option name 'lan-tun'         option dest 'tun'         option src 'lan'         option family 'ipv4' <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>device<\/code>, \u0430 \u043d\u0435 <code>network<\/code>.<\/p>\n<p>\u0420\u0435\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0442\u044c<\/p>\n<pre><code>service network restart <\/code><\/pre>\n<h3>\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a<\/h3>\n<p>\u041d\u0430\u043a\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043a\u043b\u0430\u0434\u0451\u043c \u0435\u0433\u043e \u0432 <code>\/etc\/init.d\/tun2socks<\/code><\/p>\n<pre><code>#!\/bin\/sh \/etc\/rc.common  USE_PROCD=1  # starts after network starts START=40 # stops before networking stops STOP=89  PROG=\/usr\/bin\/tun2socks IF=\"tun0\" PROTO=\"$PROTO\" METHOD_USER=\"$METHOD\/USER\" PASS=\"$PASS\" HOST=\"$HOST\" PORT=\"$PORT\"  start_service() {         procd_open_instance         procd_set_param command \"$PROG\" -device \"$IF\" -proxy \"$PROTO\":\/\/\"$METHOD_USER\":\"$PASS\"@\"$HOST\":\"$PORT\"         procd_set_param stdout 1         procd_set_param stderr 1         procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}         procd_close_instance } <\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p>Shadowsocks<\/p>\n<pre><code>METHOD_USER=\"aes-256-gcm\" PASS=\"ochslozniyparol\" HOST=\"domain.com\" PORT=\"8388\" <\/code><\/pre>\n<p>Socks5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f<\/p>\n<pre><code>PROTO=\"socks5\" #METHOD_USER=\"aes-256-gcm\" #PASS=\"ochslozniyparol\" HOST=\"domain.com\" PORT=\"46202\" <\/code><\/pre>\n<p>Socks5 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c<\/p>\n<pre><code>PROTO=\"socks5\" METHOD_USER=\"user\" PASS=\"ochslozniyparol\" HOST=\"domain.com PORT=\"1080\" <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e METHOD_USER \u043d\u0430\u0437\u0432\u0430\u043b \u0442\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f SS &#8212; \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0432 socks5 &#8212; \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u043d.<\/p>\n<p>\u0414\u043b\u044f HTTP \u0438 SOCKS4 \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0430 \u0436\u0435.<\/p>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u0436\u0435 \u0447\u0430\u0441\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u043e\u043f\u0430\u0441\u043d\u043e.<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c, \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c<\/p>\n<pre><code>chmod +x \/etc\/init.d\/tun2socks ln -s ..\/init.d\/tun2socks \/etc\/rc.d\/S40tun2socks service tun2socks start <\/code><\/pre>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>\u0413\u043b\u044f\u043d\u0443\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code>logread -f -e tun2socks <\/code><\/pre>\n<p>\u041f\u043e\u0442\u0435\u0441\u0442\u0438\u0442\u044c \u0431\u0435\u0437 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a<\/p>\n<pre><code>tun2socks -device tun0 -proxy ss:\/\/aes-256-gcm:ochslozniyparol@domain.com:8388 -loglevel debug <\/code><\/pre>\n<p>\u041f\u0440\u0438 <code>-loglevel debug<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 tun2socks. \u041d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e TCP \u0438 UDP. loglevel \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u0443\u0448\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/xjasonlyu\/tun2socks\/wiki\/Memory-Optimization\" rel=\"noopener noreferrer nofollow\">\u0446\u0435\u043b\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/a> \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c.<\/p>\n<p><code>ping -I<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442 \u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u041f\u0430\u043a\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 &#171;\u0445\u043e\u0434\u0438\u0442\u044c&#187; (\u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u0434\u043e \u0445\u043e\u0441\u0442\u0430 \u043e\u043d\u0438 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u044f\u0442) \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c curl \u0438 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>Curl \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<pre><code>curl --interface tun0 ifconfig.me <\/code><\/pre>\n<p>Curl \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0434\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h2>Sing-box<\/h2>\n<p>\u0412 OpenWrt 23.05 <a href=\"https:\/\/github.com\/openwrt\/packages\/pull\/20069\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d<\/a> \u043f\u0430\u043a\u0435\u0442 sing-box. \u041e\u043d \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>SOCKS5 proxy<\/p>\n<\/li>\n<li>\n<p>HTTP proxy<\/p>\n<\/li>\n<li>\n<p>Shadowsocks \u0432\u0435\u0440\u0441\u0438\u0438 2022-* \u0438 \u0441\u0442\u0430\u0440\u044b\u0435 aes-*<\/p>\n<\/li>\n<li>\n<p>VMess \u0438 VLESS<\/p>\n<\/li>\n<li>\n<p>Trojan \u0418 <a href=\"https:\/\/sing-box.sagernet.org\/configuration\/outbound\/#fields\" rel=\"noopener noreferrer nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044a\u0435\u043c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 21.5MB.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0414\u043b\u044f OpenWrt 23.05 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e<\/p>\n<pre><code>opkg update &amp;&amp; opkg install sing-box <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 22.03 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 <code>opkg print-architecture<\/code><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0439\u0442\u0438 \u0435\u0451 \u0432 <a href=\"https:\/\/downloads.openwrt.org\/releases\/23.05.0\/packages\/\" rel=\"noopener noreferrer nofollow\">https:\/\/downloads.openwrt.org\/releases\/23.05.0\/packages\/<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 packages, \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u043a\u0435\u0442 sing-box<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0432 \/tmp<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>opkg install sing-box_1.3.0-1_mips_24kc.ipk<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 21.02 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u0430\u043a\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0434\u0440\u0430 <code>kmod-netlink-diag<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 21.02 \u043d\u0435\u0442.<\/p>\n<pre><code> * pkg_hash_check_unresolved: cannot find dependency kmod-inet-diag for sing-box <\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun0 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, OpenVPN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 tun), \u0442\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 tun1 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441 sing-box \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u044e\u0437\u0435\u0440\u0430 sing-box. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/openwrt\/packages\/issues\/21408\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0442 \u043f\u0440\u0430\u0432<\/a> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>\/dev\/net\/tun<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c sing-box \u043d\u0430\u0434\u043e \u043e\u0442 root.<\/p>\n<p>\u0411\u0435\u0437 root \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<pre><code>Fri Jun  9 06:43:41 2023 daemon.err sing-box[9272]: FATAL[0000] start service: initialize inbound\/tun[0]: configure tun interface: permission denied <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 <code>\/etc\/config\/sing-box<\/code>. \u0422\u0430\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430\u0434\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0432 1 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <code>enabled<\/code>. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432 <code>..\/init.d\/sing-box<\/code>, \u043f\u0440\u0438 0 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code>config sing-box 'main' option enabled '1' option user 'root' option conffile '\/etc\/sing-box\/config.json' option workdir '\/usr\/share\/sing-box' <\/code><\/pre>\n<p>\u0421\u0430\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>\/etc\/sing-box\/config.json<\/code>. \u041d\u0430\u043c \u043e\u0442 sing-box \u043d\u0443\u0436\u0435\u043d tun \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 shadowsocks:<\/p>\n<pre><code>{   \"log\": {     \"level\": \"debug\"   },   \"inbounds\": [     {       \"type\": \"tun\",       \"interface_name\": \"tun0\",       \"domain_strategy\": \"ipv4_only\",       \"inet4_address\": \"172.16.250.1\/30\",       \"auto_route\": false,       \"strict_route\": false,       \"sniff\": true     }   ],   \"outbounds\": [     {       \"type\": \"shadowsocks\",       \"server\": \"$HOST\",       \"server_port\": $PORT,       \"method\": \"2022-blake3-aes-128-gcm\",       \"password\": \"$PASS\"     }   ],   \"route\": {     \"auto_detect_interface\": true   } } <\/code><\/pre>\n<p>VLESS (xtls-rprx-vision, reality)<\/p>\n<pre><code>{     \"log\": {       \"level\": \"debug\"     },     \"inbounds\": [       {         \"type\": \"tun\",         \"interface_name\": \"tun0\",         \"domain_strategy\": \"ipv4_only\",         \"inet4_address\": \"172.16.250.1\/30\",         \"auto_route\": false,         \"strict_route\": false,         \"sniff\": true       }     ],       \"outbounds\": [         {           \"type\": \"vless\",           \"server\": \"$HOST\",           \"server_port\": $PORT,           \"uuid\": \"$UUID\",           \"flow\": \"xtls-rprx-vision\",           \"network\": \"tcp\",           \"tls\": {             \"enabled\": true,             \"insecure\": false,             \"server_name\": \"$FAKE_SERVER\",             \"utls\": {               \"enabled\": true,               \"fingerprint\": \"chrome\"             },             \"reality\": {               \"enabled\": true,               \"public_key\": \"$PUBLIC_KEY\",               \"short_id\": \"$SHORT_ID\"             }           }         }       ],     \"route\": {       \"auto_detect_interface\": true     }   } <\/code><\/pre>\n<p>&#171;\u041e\u0431\u044b\u0447\u043d\u044b\u0439&#187; Shadowsocks, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<pre><code>{   \"log\": {     \"level\": \"debug\"   },   \"inbounds\": [     {       \"type\": \"tun\",       \"interface_name\": \"tun0\",       \"domain_strategy\": \"ipv4_only\",       \"inet4_address\": \"172.16.250.1\/30\",       \"auto_route\": false,       \"strict_route\": false,       \"sniff\": true     }   ],   \"outbounds\": [     {       \"type\": \"shadowsocks\",       \"server\": \"$HOST\",       \"server_port\": $PORT,       \"method\": \"aes-256-gcm\",       \"password\": \"$PASS\"     }   ],   \"route\": {     \"auto_detect_interface\": true   } } <\/code><\/pre>\n<p><strong>inbounds<\/strong> &#8212;<\/p>\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-357508","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357508","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=357508"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357508\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}