{"id":1793,"date":"2023-09-09T15:21:02","date_gmt":"2023-09-09T07:21:02","guid":{"rendered":"http:\/\/blog.xtaa.cn\/?p=1793"},"modified":"2023-09-18T23:21:54","modified_gmt":"2023-09-18T15:21:54","slug":"%e6%9c%ba%e9%a1%b6%e7%9b%92%e5%88%b0ubuntu-nas","status":"publish","type":"post","link":"http:\/\/blog.xtaa.cn\/index.php\/2023\/09\/09\/%e6%9c%ba%e9%a1%b6%e7%9b%92%e5%88%b0ubuntu-nas\/","title":{"rendered":"\u673a\u9876\u76d2\u5230ubuntu-nas"},"content":{"rendered":"\n<p>\u8bba\u575bhttps:\/\/bbs.histb.com\/\u5b98\u7f51https:\/\/www.ecoo.top\/<\/p>\n\n\n\n<p>\u652f\u6301\u7684\u673a\u9876\u76d2\u5217\u8868https:\/\/www.ecoo.top\/histb.html<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u88c5socket5\uff1a<\/strong>    \u9700\u8981\u81ea\u884c\u51c6\u5907\u8282\u70b9\uff01\u6ca1\u6709\u6b63\u786e\u7684\u8282\u70b9\u914d\u7f6e\u6587\u4ef6\u662f\u65e0\u6cd5\u8054\u901a\u7684\u3002<br>\u5b89\u88c5\u4e0b\u9762\u7684\u811a\u672c\u540e\u76d2\u5b50\u6253\u5f00\u4e86 Socks5 \u7684\u4ee3\u7406\u670d\u52a1\u529f\u80fd, \u7aef\u53e3\u53f710808<br>\u4f60\u5728\u6d4f\u89c8\u5668\u6216\u8005\u7cfb\u7edf\u81ea\u884c\u8bbe\u7f6e\u901a\u8fc7\u76d2\u5b50\u7684IP192.168.12.106\u4ee3\u7406 Socks5 \u4e0a\u7f51\u5373\u53ef<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1234567<\/td><td><code>install-v2ray.sh --version v5.1.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # \u7ec8\u7aef\u8f93\u5165\u8fd9\u53e5\u547d\u4ee4\u81ea\u884c\u5b89\u88c5<\/code><code>systemctl status v2ray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # \u67e5\u770b\u8fd0\u884c\u72b6\u6001\u662f\u5426\u6b63\u5e38<\/code><code>curl --socks5 127.0.0.1:10808 google.com&nbsp; # \u8fd4\u56de 301 \u5b57\u6837\u5219\u6210\u529f<\/code><code>install-v2ray.sh --remove&nbsp;&nbsp; # \u7ec8\u7aef\u8f93\u5165\u547d\u4ee4\u5373\u53ef\u5378\u8f7d v2ray<\/code><code># \u8282\u70b9\u914d\u7f6e\u6587\u4ef6\u5728 \/usr\/local\/etc\/v2ray\/config.json<\/code><code># \u6ce8\u610f\uff1a\u9700\u8981\u81ea\u884c\u51c6\u5907\u8282\u70b9\uff01\u6ca1\u6709\u6b63\u786e\u7684\u8282\u70b9\u914d\u7f6e\u6587\u4ef6\u662f\u65e0\u6cd5\u8054\u901a\u7684\u3002<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u88c5\u597d\u7cfb\u7edf\u540e\u91cc\u9762\u6709alist\u7b49<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u88c5docker\u90e8\u7f72OpenWRT<\/strong>-(\u88c5\u4e0a\u540e\u65c1\u8def\u7531\u5b9e\u6d4b\u65e0\u6cd5\u79d1\u5b66\u4e0a\u7f51)<\/p>\n\n\n\n<p>hi3798mv100\u578b\u53f7\uff0c\u5176\u5b83\u578b\u53f7\u81ea\u884c\u6d4b\u8bd5\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bbe\u7f6e\u7f51\u7edc<br>\u628a\u7f51\u5361\u6df7\u6742\u6a21\u5f0f\u6253\u5f00<\/li>\n\n\n\n<li>sudo ip link set \u4f60\u81ea\u5df1\u7684\u7f51\u5361\u540d\u79f0 promisc on<br><code>ifconfig<\/code><br>##\u4ee5\u4e0b\u662f\u6211\u7684\u7f51\u5361\u540d\u79f0\uff0c\u6bcf\u53f0\u8bbe\u5907\u53ef\u80fd\u4e0d\u4e00\u6837\uff0c\u8981\u6ce8\u610f\uff01\uff01\uff01\uff01<br><code>sudo ip link set eth0 promisc on<\/code><br>\u6253\u5f00\u540e\u4e3aeth0: flags=4419&lt;UP,BROADCAST,RUNNING,PROMISC,MULTICAST&gt; mtu 1500<\/li>\n\n\n\n<li>\u521b\u5efa docker \u7f51\u5361<br>IP\u5730\u5740\u548c\u7f51\u5173\u6839\u636e\u81ea\u5df1\u7684\u60c5\u51b5\u8bbe\u7f6e<br><code>docker network create -d macvlan --subnet=192.168.1.67\/24 --gateway=192.168.1.1 -o parent=eth0 macnet<\/code><\/li>\n<\/ul>\n\n\n\n<p>-OpenWrt \u6807\u51c6\u955c\u50cf<br>\u539f\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/SuLingGG\/OpenWrt-Docker\">https:\/\/github.com\/SuLingGG\/OpenWrt-Docker<\/a><br>\u4e00\u822c\u60c5\u51b5\u4e0b\u963f\u91cc\u4e91\u955c\u50cf\u4ed3\u5e93\u6bd4\u8f83\u5feb<br><strong>armv7<\/strong><br>DockerHub&#8212;&#8212;&#8212;sulinggg\/openwrt:rpi1<br>\u963f\u91cc\u4e91\u955c\u50cf\u4ed3\u5e93&#8212;&#8211;registry.cn-shanghai.aliyuncs.com\/suling\/openwrt:rpi1<\/p>\n\n\n\n<p><strong>arm8\/aarch64<\/strong><br>DockerHub&#8212;&#8212;&#8212;sulinggg\/openwrt:armv8<br>\u963f\u91cc\u4e91\u955c\u50cf\u4ed3\u5e93&#8212;&#8211;registry.cn-shanghai.aliyuncs.com\/suling\/openwrt:armv8<\/p>\n\n\n\n<p><strong>x86_64\/amd64<\/strong><br>DockerHub&#8212;&#8212;&#8212;sulinggg\/openwrt:x86_64<br>\u963f\u91cc\u4e91\u955c\u50cf\u4ed3\u5e93&#8212;&#8211;registry.cn-shanghai.aliyuncs.com\/suling\/openwrt:x86_64<\/p>\n\n\n\n<p>\u67e5\u770b\u7cfb\u7edf\u67b6\u6784&nbsp;<code>uname -a<\/code><\/p>\n\n\n\n<p>##\u4ee5\u4e0b\u662fhi3798mv100\u7cfb\u7edf\u67b6\u6784\u662farmv7<\/p>\n\n\n\n<p><strong>\u521b\u5efa\u5e76\u542f\u52a8docker \u955c\u50cf<\/strong><br><code>docker run --restart always --name openwrt -d --network macnet --privileged registry.cn-shanghai.aliyuncs.com\/suling\/openwrt:armv7 \/sbin\/init<\/code><br>\u5176\u5b83\u7cfb\u7edf\u67b6\u6784\u53ea\u9700\u66f4\u6539<em>registry.cn-shanghai.aliyuncs.com\/suling\/openwrt:rpi1<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bbe\u7f6eOpenwrt\u5bb9\u5668 ip<\/li>\n<\/ul>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2022\/png\/1667948\/1651567997574-cc694968-eb47-4863-9dda-d27ef43a559f.png?x-oss-process=image%2Fresize%2Cw_937%2Climit_0\" alt=\"\"><br>\u70b9\u51fb\u8fdb\u5165bash\u547d\u4ee4\u63a7\u5236\u53f0<br>\u8f93\u5165&nbsp;<code>vim \/etc\/config\/network<\/code><br>\u5176\u5b83\u8bbe\u7f6e\u4e0d\u7528\u6539\uff0c\u81ea\u884c\u8bbe\u7f6econfig interface &#8216;lan&#8217;\u4e0b\u8fb9 option ipaddr\u4e3aOpenWRT\u7684IP\uff0cgeteway\u662f\u4e3b\u8def\u7531IP\uff08\u7f51\u5173\uff09<br>\u5982\u679c\u62a5\u9519\u91cd\u542f\u5bb9\u5668\u518d\u8bd5\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u91cd\u542f\u7f51\u7edc<br><code>\/etc\/init.d\/network restart<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u91cd\u542f\u7f51\u7edc, \u91cd\u542f\u5b8c\u6210\u540e\u4fbf\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u4e86<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u7f51\u5fc3\u4e91<\/strong><br>docker run -d \\<br>&#8211;name=wxedge \\<br>&#8211;restart=always \\<br>&#8211;privileged \\<br>&#8211;net=host \\<br>&#8211;tmpfs \/run \\<br>&#8211;tmpfs \/tmp \\<br>-v \/mnt\/sda1:\/storage:rw \\<br>onething1\/wxedge<br>1.-v \u5192\u53f7\u524d\u534a\u90e8\u5206\u6539\u6210\u81ea\u5df1\u672c\u5730\u8def\u5f84\uff0c\u8be5\u8def\u5f84\u91cd\u88c5\u65f6\u4fdd\u6301\u4e0d\u53d8\uff0c\u5219\u8282\u70b9\u4e0d\u53d8<br>2.\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f7f\u7528IP\uff1a18888\uff0c\u767b\u5f55\u540e\u7ba1\u754c\u9762\uff0c\u4f7f\u7528\u7f51\u5fc3\u4e91APP\u626b\u63cf\u9875\u9762\u4e0b\u65b9\u7684\u4e8c\u7ef4\u7801\u7ed1\u5b9a<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u4e0b\u9762\u662f\u5728\u6d77\u7eb3\u65af\u4e0a\u9762\u88c5\u4e0atailscale<\/strong><\/p>\n\n\n\n<p>#\u505c\u6b62\u56fa\u4ef6\u81ea\u5e26\u7684tailscale<br>systemctl stop tailscaled<br>#\u5173\u95ed\u56fa\u4ef6\u81ea\u5e26\u7684tailscale\u7684\u5f00\u673a\u81ea\u542f<br>systemctl disable tailscaled<br>#\u5220\u9664\u6267\u884c\u6587\u4ef6\u548c\u670d\u52a1\u6587\u4ef6<br>rm -rf \/usr\/bin\/tailscaled<br>rm -rf \/etc\/systemd\/system\/tailscaled.service<br>#\u6267\u884c\u5b98\u65b9\u7684\u5b89\u88c5\u811a\u672c<br>curl -fsSL&nbsp;<a href=\"https:\/\/tailscale.com\/install.sh\">https:\/\/tailscale.com\/install.sh<\/a>&nbsp;| sh<br>#\u542f\u52a8\u8f6f\u4ef6\u5e76\u8bbe\u4e3a\u81ea\u542f<br>systemctl start tailscaled<br>systemctl enable tailscaled<br>#\u542f\u52a8\u8f6f\u4ef6\uff0c\u5e76\u5728\u94fe\u63a5\u4e2d\u767b\u5f55\u8d26\u53f7<br>tailscale up<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u53e6\u5916\u8bf4\u4e0b\u670d\u52a1\u5668\u505a\u6d41\u91cf\u51fa\u53e3\u8282\u70b9\u8bbe\u7f6e<\/p>\n\n\n\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u6253\u5f00forword<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> echo 'net.ipv4.ip_forward = 1' | sudo tee -a \/etc\/sysctl.d\/99-tailscale.conf\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a \/etc\/sysctl.d\/99-tailscale.conf\nsudo sysctl -p \/etc\/sysctl.d\/99-tailscale.conf<\/code><\/pre>\n\n\n\n<p>\u518d\u8bbe\u7f6e\u53ef\u4ee5\u505a\u51fa\u53e3\u8282\u70b9sudo tailscale up -advertise-exit-node<\/p>\n\n\n\n<p>\u6700\u540e\u5728https:\/\/login.tailscale.com\/admin\/machines\u7684\u8282\u70b9\u6700\u53f3\u8fb9\u7f16\u8f91\u8def\u7531\u8bbe\u7f6e\u91cc\u6253\u5f00Use as exit node\uff0c<\/p>\n\n\n\n<p>\u5176\u5b83\u7684\u8282\u70b9\u8bbe\u7f6eexit node\u4e3a\u8fd9\u4e2a\u670d\u52a1\u5668\uff0c\u5c31\u53ef\u4ee5\u8fd9\u4e2a\u670d\u52a1\u5668\u4e3a\u51fa\u53e3\u4ee3\u7406\u6765\u4e0a\u7f51\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bba\u575bhttps:\/\/bbs.histb.com\/\u5b98\u7f51https:\/\/www.ecoo.top\/ \u652f\u6301\u7684\u673a\u9876\u76d2\u5217 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1793","post","type-post","status-publish","format-standard","hentry","category-22"],"_links":{"self":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1793"}],"version-history":[{"count":5,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1793\/revisions"}],"predecessor-version":[{"id":1819,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/posts\/1793\/revisions\/1819"}],"wp:attachment":[{"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1793"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xtaa.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}