id: 3eb5933e820f463aaec4a4cfac446920
parent_id: 
item_type: 1
item_id: 6e51f09dec514826b0ef9e521b51ba10
item_updated_time: 1764345470945
title_diff: "[{\"diffs\":[[1,\"Docker Clash 旁路由网关模式透明代理 – 小金鱼儿\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":31}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Docker Clash 旁路由网关模式透明代理 – 小金鱼儿</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"5251\\\"></a>\\\r\\\n<h1>Docker Clash 旁路由网关模式透明代理 – 小金鱼儿</h1>\\\r\\\n\\\r\\\n<div>\\\n<span>\\\n  <div style=\\\"--en-clipped-content:article; --en-clipped-source-url:https://haoyu.love/blog1412.html; --en-clipped-source-title:Docker Clash 旁路由网关模式透明代理 – 小金鱼儿;\\\">\\\n<div><br/></div><div style=\\\"min-height: 9243px; font-size: 16px; display: block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:rgb(255, 255, 255);color:rgb(0, 0, 0);font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;font-size:17.2288px;line-height:1.6;\\\"><div><span style=\\\"box-sizing:border-box;margin-block:0px;margin-block-start:72px;\\\"><div style=\\\"box-sizing:border-box;padding-right:32px;padding-left:32px;margin-block:0px;\\\"><h1 style=\\\"font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);box-sizing:border-box;word-break:break-word;margin-top:1.25rem;font-weight:400;margin-bottom:var(--wp--preset--spacing--40);line-height:1.2;margin-block:0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">Docker Clash 旁路由网关模式透明代理</h1></div><div style=\\\"padding-right:32px;padding-left:32px;margin-block:1.5rem 0px;\\\"><p style=\\\"margin-block:0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">这个功能，我晚用上了 5 年……只要设备接入 Wi-Fi，就能无感科学上网，还是蛮舒服的。</p><span style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"></span><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">首先说说我的想法：</p><ol style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"> <li>不想在路由器上直接跑 Clash：路由器这种东西，稳定性是首要的，然后由于我刷它的频率比较高，所以配置不能太复杂。官方 OpenWRT，里面啥都不带。如果直接装个 OpenClash，那么每次刷机都需要再配置一遍，比较麻烦；虽说路由器已经是一代传奇 K2P 和 NeWifi 了，但性能总是孱弱的，开启 Clash 之后假死是经常的事儿，会导致 All-In-Boom。所以路由器本身一定要负载轻一点，配置简单一点</li><li>目前用的是树莓派 3B+，过几天会新到一个 x86 的小主机做 HomeLab。那么我肯定不会直接在主机上跑 Clash。而且人家 Docker 都给你做好了，为啥还要装个 Debian，再自己在 Debian 里面搞 Clash 呀？直接用 Docker 不香么？</li><li>我真的看不懂 iptables……尝试了无数次了，只会把网络搞炸，所以能不用 iptables 就尽量不用</li></ol><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">于是就这样洁癖下来……嗯，搞出了这样一套方案。</p><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">Docker</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">我希望 Clash 有自己的 IP，这样会便于管理。这里另一个考虑是，我不想占用宿主机的端口（哦，说实话，是「记不住端口」）。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">那么怎么搞固定 IP 地址呢？这里有请强大的 macvlan 登场。使用 macvlan 可以给 docker 搞自定义 ip 地址，甚至可以搞到和宿主机相同网段的 ip 地址。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">这里我提前在树莓派上装了 portainer，所以各种操作都是在 portainer 上来完成的。当然命令行也可以完成一切，只是……我不会</p><h2 style=\\\"font-weight:400;font-size:clamp(2.625rem, 2.625rem + (1vw - 0.48rem) * 8.4135, 3.25rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">设置 macvlan 网络</h2><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">在「网络」里面新建一个网络，名字的话我叫做 <code>base_macvlan</code>。驱动选 <code>macvlan</code> ，然后设置选 <code>Configuration</code>。网卡的话，我去树莓派里面查了一下，网卡名称叫 <code>eth0</code>（有些 Debian 系统叫 <code>en0</code> 吧？）。 下面的网络选项里面，都填和宿主机相同的东西，例如子网是 <code>192.168.1.1/24</code> ，ip 范围是 <code>192.168.1.1/24</code> ，网关是 <code>192.168.1.1</code> 之类的。点击保存。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">然后，再添加一个网络，名字的话我叫做 <code>static_ip</code> ，驱动依旧是 <code>macvlan</code> ，不过这次下面要选成 <code>Creation</code> 了。下面还有个地方让选「从哪个配置创建网络」，就选择刚才创建的 <code>base_macvlan</code> 就好了。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">如果想直接在 <code>docker-compose.yaml</code> 里面写的话，也行：</p><pre style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;color:rgb(248, 248, 242);font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;overflow-wrap:normal;line-height:1.5;tab-size:4;hyphens:none;padding:1em;margin:0.5em auto;overflow:auto;border-radius:0.3em;background:rgb(43, 43, 43);max-width:650px;margin-left:auto;margin-right:auto;\\\"><code lang=\\\"python\\\" style=\\\"display:block;padding-left:0px;border:none;overflow-x:initial;background:none;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:4;hyphens:none;font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;overflow-wrap:normal;white-space:pre;color:rgb(248, 248, 242);\\\">networks<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n  magic<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    name<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> static_ip\\\n    driver<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> macvlan\\\n    driver_opts<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n      parent<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> eth0\\\n    ipam<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n      config<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n        <span style=\\\"color:rgb(0, 224, 224);\\\">-</span> subnet<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(171, 227, 56);\\\">&quot;192.168.1.0/24&quot;</span>\\\n          ip_range<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(171, 227, 56);\\\">&quot;192.168.1.0/24&quot;</span>\\\n          gateway<span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(171, 227, 56);\\\">&quot;192.168.1.1&quot;</span></code></pre><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">到这里，我们有给 Docker 分配固定 IP 的能力了。</p><h2 style=\\\"font-weight:400;font-size:clamp(2.625rem, 2.625rem + (1vw - 0.48rem) * 8.4135, 3.25rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">部署容器</h2><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">直接写个 Docker-compose 比较省心：</p><pre style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;color:rgb(248, 248, 242);font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;overflow-wrap:normal;line-height:1.5;tab-size:4;hyphens:none;padding:1em;margin:0.5em auto;overflow:auto;border-radius:0.3em;background:rgb(43, 43, 43);max-width:650px;margin-left:auto;margin-right:auto;\\\"><code lang=\\\"yaml\\\" style=\\\"display:block;padding-left:0px;border:none;overflow-x:initial;background:none;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:4;hyphens:none;font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;overflow-wrap:normal;white-space:pre;color:rgb(248, 248, 242);\\\"><span style=\\\"color:rgb(255, 215, 0);\\\">version</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(171, 227, 56);\\\">&quot;3&quot;</span>\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">services</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(255, 215, 0);\\\">clash</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">container_name</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> Clash\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">image</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> dreamacro/clash<span style=\\\"color:rgb(254, 254, 254);\\\">-</span>premium\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">restart</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> always\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">privileged</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">devices</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n            <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> /dev/net/tun\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">volumes</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n            <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> /path/to/config/dir/Clash<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>/root/.config/clash\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">networks</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n            <span style=\\\"color:rgb(255, 215, 0);\\\">magic</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n                <span style=\\\"color:rgb(255, 215, 0);\\\">ipv4_address</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> 192.168.1.2\\\n    <span style=\\\"color:rgb(255, 215, 0);\\\">adguard</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">container_name</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> Adguard\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">image</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> adguard/adguardhome\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">restart</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> always\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">volumes</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n            <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> /path/to/config/dir/Adguard/conf<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>/opt/adguardhome/conf\\\n            <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> /path/to/config/dir/Adguard/work<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>/opt/adguardhome/work\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">networks</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n            <span style=\\\"color:rgb(255, 215, 0);\\\">magic</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n                <span style=\\\"color:rgb(255, 215, 0);\\\">ipv4_address</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> 192.168.1.53\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">networks</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(255, 215, 0);\\\">magic</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">name</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> static_ip\\\n        <span style=\\\"color:rgb(255, 215, 0);\\\">external</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n</code></pre><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">可以看到，给 clash 了比较高的权限，或者只加 <code>NET_ADMIN</code> 好像也成，我没有自己试验。另外需要注意，如果不加 <code>/dev/net/tun</code> 的话，用 TUN 模式会报错，说开启 TUN 模式不成功。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">另外如果想直接在 <code>docker-compose.yaml</code> 里面创建网络的话，从上面抄过来替换掉就好了</p><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">AdGuard Home</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">哎？似乎有什么东西乱入了？</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">主要是想用 AdGuard 来去广告。但是网上几乎没有和 AdGuard 做集成的方案。那就自己捣鼓一下。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">分配了固定 ip，因为 53 比较好记。配置也很简单，就直接部署就好了，http 管理端口甚至选择成了 80，这样输入 ip 就能进管理界面了。</p><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">Clash</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">这里其实没啥好说的，照着文档写就是了。</p><pre style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;color:rgb(248, 248, 242);font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;overflow-wrap:normal;line-height:1.5;tab-size:4;hyphens:none;padding:1em;margin:0.5em auto;overflow:auto;border-radius:0.3em;background:rgb(43, 43, 43);max-width:650px;margin-left:auto;margin-right:auto;\\\"><code lang=\\\"yaml\\\" style=\\\"display:block;padding-left:0px;border:none;overflow-x:initial;background:none;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:4;hyphens:none;font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;overflow-wrap:normal;white-space:pre;color:rgb(248, 248, 242);\\\"><span style=\\\"color:rgb(212, 208, 171);\\\"># Outbound interface name</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\"># interface-name: eth0</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\"># fwmark on Linux only</span>\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">routing-mark</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(0, 224, 224);\\\">7777</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\"># DNS server settings</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\"># This section is optional. When not present, the DNS server will be disabled.</span>\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">dns</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">enable</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">listen</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(254, 254, 254);\\\">:</span><span style=\\\"color:rgb(0, 224, 224);\\\">53</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">ipv6</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span> <span style=\\\"color:rgb(212, 208, 171);\\\"># when the false, response to AAAA questions will be empty</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># These nameservers are used to resolve the DNS nameserver hostnames below.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># Specify IP addresses only</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">default-nameserver</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> 192.168.1.53\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># - 223.5.5.5</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># - 114.114.114.114</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># - 8.8.8.8</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">enhanced-mode</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> fake<span style=\\\"color:rgb(254, 254, 254);\\\">-</span>ip\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">fake-ip-range</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> 198.18.0.1/16 <span style=\\\"color:rgb(212, 208, 171);\\\"># Fake IP addresses pool CIDR</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># use-hosts: true # lookup hosts and return IP record</span>\\\n  \\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># Hostnames in this list will not be resolved with fake IPs</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># i.e. questions to these domain names will always be answered with their</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># real IP addresses</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">fake-ip-filter</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> <span style=\\\"color:rgb(171, 227, 56);\\\">'*.lan'</span>\\\n  \\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># Supports UDP, TCP, DoT, DoH. You can specify the port to connect to.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># All DNS questions are sent directly to the nameserver, without proxies</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># involved. Clash answers the DNS question with the first result gathered.</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">nameserver</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> 192.168.1.53\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># - tls://dns.rubyfish.cn:853 # DNS over TLS</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># - https://1.1.1.1/dns-query # DNS over HTTPS</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> dhcp<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//eth0 <span style=\\\"color:rgb(212, 208, 171);\\\"># dns from dhcp</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># When `fallback` is present, the DNS server will send concurrent requests</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># to the servers in this section along with servers in `nameservers`.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># The answers from fallback servers are used when the GEOIP country</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># is not `CN`.</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">fallback</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> tls<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//8.8.8.8<span style=\\\"color:rgb(254, 254, 254);\\\">:</span><span style=\\\"color:rgb(0, 224, 224);\\\">853</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> tls<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//8.8.4.4<span style=\\\"color:rgb(254, 254, 254);\\\">:</span><span style=\\\"color:rgb(0, 224, 224);\\\">853</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> https<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//1.1.1.1/dns<span style=\\\"color:rgb(254, 254, 254);\\\">-</span>query\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> https<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//dns.google/dns<span style=\\\"color:rgb(254, 254, 254);\\\">-</span>query\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># If IP addresses resolved with servers in `nameservers` are in the specified</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># subnets below, they are considered invalid and results from `fallback`</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># servers are used instead.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\">#</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># IP address resolved with servers in `nameserver` is used when</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># `fallback-filter.geoip` is true and when GEOIP of the IP address is `CN`.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\">#</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># If `fallback-filter.geoip` is false, results from `nameserver` nameservers</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># are always used if not match `fallback-filter.ipcidr`.</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\">#</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># This is a countermeasure against DNS pollution attacks.</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">fallback-filter</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(255, 215, 0);\\\">geoip</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n    <span style=\\\"color:rgb(255, 215, 0);\\\">geoip-code</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> CN\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># ipcidr:</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\">#   - 240.0.0.0/4</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\"># domain:</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\">#   - '+.google.com'</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\">#   - '+.facebook.com'</span>\\\n    <span style=\\\"color:rgb(212, 208, 171);\\\">#   - '+.youtube.com'</span>\\\n  \\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># Lookup domains via specific nameservers</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\"># nameserver-policy:</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\">#   'www.baidu.com': '114.114.114.114'</span>\\\n  <span style=\\\"color:rgb(212, 208, 171);\\\">#   '+.internal.crop.com': '10.0.0.1'</span>\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">tun</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">enable</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">stack</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> system \\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">auto-route</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">auto-detect-interface</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span> \\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">dns-hijack</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> any<span style=\\\"color:rgb(254, 254, 254);\\\">:</span><span style=\\\"color:rgb(0, 224, 224);\\\">53</span>\\\n    <span style=\\\"color:rgb(254, 254, 254);\\\">-</span> tcp<span style=\\\"color:rgb(254, 254, 254);\\\">:</span>//any<span style=\\\"color:rgb(254, 254, 254);\\\">:</span><span style=\\\"color:rgb(0, 224, 224);\\\">53</span>\\\n<span style=\\\"color:rgb(255, 215, 0);\\\">auto-redir</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">enable</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n  <span style=\\\"color:rgb(255, 215, 0);\\\">auto-route</span><span style=\\\"color:rgb(254, 254, 254);\\\">:</span> <span style=\\\"color:rgb(255, 215, 0);font-weight:bold;\\\">true</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\"># ebpf:</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\">#   redirect-to-tun:</span>\\\n<span style=\\\"color:rgb(212, 208, 171);\\\">#     - eth0</span>\\\n</code></pre><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">额，还是说两句吧。网上各种教程比较多，但还是建议直接看 <a href=\\\"https://github.com/Dreamacro/clash/wiki/Clash-Premium-Features\\\" rel=\\\"noreferrer noopener nofollow external\\\" style=\\\"text-decoration:underline;color:rgb(52, 92, 0);\\\" target=\\\"_blank\\\">Clash 的文档<i style=\\\"margin-left:0.2em;\\\"><span style=\\\"font-family:dashicons;display:inline-block;line-height:inherit;font-weight:400;font-style:normal;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;width:auto;height:20px;font-size:inherit;vertical-align:top;text-align:center;transition:color 0.1s ease-in 0s;\\\"></span></i></a>。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"><code>default-nameserver</code> 对应 AdGuardHome 里面的 <code>bootstrap name server<font face=\\\"-apple-system, system-ui, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif\\\"> </font></code> ，是用来将 <code>nameserver</code> 里面的各式各样的 DNS 服务器解析成 IP，这样 <code>nameserver</code> 里面的 DNS 服务器才能起作用。所以 <code>default-nameserver</code> 随便填一个 IP 形式的 DNS 服务器就好， <code>nameserver</code> 填常用的各种形式的服务器。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">因为我想用 AdGuard 嘛，所以 <code>default-nameserver</code> 和 nameserver 这里都填成了我的 AdGuard。如果你没有用 AdGuard 的话， <code>default-nameserver</code> 填几个 IP 形式的 DNS 服务器， nameserver 随便填一些公共 DNS 就好。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">然后看 <code>fallback-filter</code> ，在注释里写得比较明白了，但是有些是正逻辑有些是反逻辑，就比较绕：</p><ul style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"> <li>如果 DNS 解析出来的东西在某个 IP 范围内，那么认为结果不可信，所以再用 <code>fallback</code> DNS 再解析一次（正逻辑）</li><li>如果地理位置是 CN，那么直接认为是可信，不会再走 <code>fallback</code> DNS（反逻辑）</li><li>有些域名可以强制用 <code>fallback</code> DNS 进行解析（正逻辑）</li></ul><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">哦对了，这里解释一下为啥 DNS 设置会这么复杂和重要。由于我们直接获取到的 DNS 不可信，那么 Clash 拿到查来的 DNS 结果后会再进行校验，如果符合一定的规则就直接用，否则就再用 fallback DNS 去再请求一次，拿到干净的结果。其实吧，如果我们的 DNS 是非常干净的，那么也就没这么多麻烦事儿了，直接配上一个干净的 DNS（比如我们假设 AdGuardHome 里面能拿到某些网站的无干扰解析结果），然后流量从 Clash 里面走，也能用。所以 DNS 其实和流量路由是完全两个事情。只不过……Clash 说「都可以包在我身上」，那就……那就这样吧别纠结了。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">最后是 TUN 部分。打开 <code>auto-route</code> 其实就好了。然后如果使用 ebpf 的话，需要关掉 <code>auto-route</code> ，并开启 <code>ebpf</code> 那部份的配置。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">最后是 <code>auto-redir</code> ，有了这个就不用我们自己写 iptables 了。</p><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">OpenWRT</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">之前一直只用 AdGuard Home，所以知道 DHCP 可以直接下发 DNS 配置。那么这次我们也可以让 DHCP 直接下发网关配置。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">去「网络-接口-LAN」，找到「DHCP-高级设置」，在 DHCP 选项里面添加这两个东西：</p><pre style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;color:rgb(248, 248, 242);font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;overflow-wrap:normal;line-height:1.5;tab-size:4;hyphens:none;padding:1em;margin:0.5em auto;overflow:auto;border-radius:0.3em;background:rgb(43, 43, 43);max-width:650px;margin-left:auto;margin-right:auto;\\\"><code lang=\\\"adoc\\\" style=\\\"display:block;padding-left:0px;border:none;overflow-x:initial;background:none;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:4;hyphens:none;font-family:Hack, &quot;Fira Code&quot;, Consolas, Menlo, Monaco, &quot;Andale Mono&quot;, &quot;Lucida Console&quot;, &quot;Lucida Sans Typewriter&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Liberation Mono&quot;, &quot;Nimbus Mono L&quot;, &quot;Courier New&quot;, Courier, monospace;overflow-wrap:normal;white-space:pre;color:rgb(248, 248, 242);\\\">3,192.168.100.2\\\n6,192.168.100.2</code></pre><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">第一行，是下发网关配置的，第二行是下发 DNS 配置的。然后保存并应用。</p><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">开始使用吧</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">最后，让各种设备重新连接路由器。你会发现，新世界的大门已经打开。</p><hr style=\\\"border-top:1px solid;border-bottom:1px solid;border-image:initial;border-left:none;border-right:none;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"/><h1 style=\\\"font-weight:400;font-size:clamp(2.719rem, 2.719rem + (1vw - 0.48rem) * 1.742, 3.625rem);line-height:1.2;margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">遇到的坑</h1><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">给 Docker 设置和宿主机一样的网段，并设置固定 IP。这个事情之前在威联通上搞过，不过不太清楚原理。本来也不清楚 macvlan 需要配置两次，都是只配置了一次，导致部署 Docker 一直失败，说什么只读的配置啥啥的。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\">然后是 DNS。配置好后，发现手机和 Pad 都可以科学上网了，但是电脑死活都不行。那就在电脑上开着 Surge 排查问题。无意中发现，即使把 Surge 放到全局直连，Mac 也能科学上网，而且走的是 Clash，但是把 Surge 关掉，就各种哑巴了。于是去网络里面看了一下，DNS 默认为路由器，手动改成 Clash 就好了。那么这下子简单了：直接去 OpenWRT 里面改一下 DHCP 下发的配置，就不用挨个设备手动改了，可谓一劳永逸。</p><p style=\\\"margin-block:1.5rem 0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"></p><div style=\\\"margin-block:1.5rem 0px;clear:both;max-width:650px;margin-left:auto;margin-right:auto;\\\"><div style=\\\"margin-bottom:1em;\\\"><h3 style=\\\"display:inline-block;margin:0px 0px 1em;font-weight:700;line-height:1.2;font-size:9pt;\\\">分享到:</h3><div><ul style=\\\"box-sizing:border-box;list-style:none;margin:0px;padding:0px;\\\"><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=linkedin&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(0, 119, 181);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到 LinkedIn\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到 LinkedIn（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=facebook&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(24, 119, 242);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到 Facebook\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到 Facebook （在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=twitter&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(0, 172, 238);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Twitter\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Twitter（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=reddit&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(206, 227, 248);text-decoration:none;color:rgb(85, 85, 85);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Reddit\\\"><span style=\\\"color:rgb(85, 85, 85);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Reddit（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=tumblr&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(44, 71, 98);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Tumblr\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Tumblr（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=pinterest&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(202, 31, 39);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Pinterest\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Pinterest（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=pocket&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(238, 64, 86);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Pocket\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Pocket（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html?share=telegram&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(0, 136, 204);text-decoration:none;color:rgb(255, 255, 255);\\\" target=\\\"_blank\\\" title=\\\"点击分享到Telegram\\\"><span style=\\\"color:rgb(255, 255, 255);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击分享到Telegram（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"><a href=\\\"https://haoyu.love/blog1412.htmlmailto:?subject=%5B%E5%88%86%E4%BA%AB%E6%96%87%E7%AB%A0%5D%20Docker%20Clash%20%E6%97%81%E8%B7%AF%E7%94%B1%E7%BD%91%E5%85%B3%E6%A8%A1%E5%BC%8F%E9%80%8F%E6%98%8E%E4%BB%A3%E7%90%86&amp;body=https%3A%2F%2Fhaoyu.love%2Fblog1412.html&amp;share=email&amp;nb=1\\\" rel=\\\"nofollow noopener noreferrer\\\" style=\\\"display:inline-block;font-family:&quot;Open Sans&quot;, sans-serif;font-size:13px;font-weight:500;text-shadow:none;border:0px;height:auto;margin-bottom:0px;max-width:32px;position:relative;top:-2px;width:auto;border-radius:50%;box-shadow:none;line-height:1;padding:7px;margin-top:2px;text-indent:0px;background:rgb(233, 233, 233);color:rgb(44, 51, 56);text-decoration:none;\\\" target=\\\"_blank\\\" title=\\\"点击通过电子邮件将链接发送给朋友\\\"><span style=\\\"color:rgb(44, 51, 56);font-family:Open Sans, sans-serif;font-size:13px;font-weight:500;line-height:1;text-indent:0px;-webkit-font-smoothing:antialiased;display:inline-block;font:18px / 1 social-logos;text-align:center;vertical-align:top;position:relative;top:0px;\\\"></span><span style=\\\"margin-left:0px;line-height:1;\\\"></span><span style=\\\"clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;width:1px;margin-left:0px;line-height:1;position:absolute;\\\">点击通过电子邮件将链接发送给朋友（在新窗口中打开）</span></a></li><li style=\\\"display:inline-block;margin:0px 8px 12px 0px;padding:0px;\\\"></li></ul></div></div></div></div><div style=\\\"margin-block:1.5rem 0px;\\\"><div style=\\\"clear:both;height:0;\\\"></div><div style=\\\"box-sizing:border-box;padding-right:32px;padding-left:32px;margin-top:var(--wp--preset--spacing--70);\\\"><hr style=\\\"border-top:1px solid;border-bottom:1px solid;border-image:initial;border-left:none;border-right:none;margin-block:0px;max-width:1200px;margin-left:auto;margin-right:auto;\\\"/><div style=\\\"box-sizing:border-box;margin-bottom:1.75em;margin-block:1.5rem 0px;display:flex;gap:32px;max-width:1200px;align-items:normal;flex-wrap:nowrap;font-size:15.2288px;margin-left:auto;margin-right:auto;margin-top:var(--wp--preset--spacing--30);\\\"><div style=\\\"min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-basis:0px;flex-grow:1;\\\"><div style=\\\"box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:0.5ch;margin-block:0px;\\\"><p style=\\\"margin:0px;\\\"> 已发布</p><div style=\\\"box-sizing:border-box;font-size:15.2288px;font-weight:400;margin:0px;\\\"><span>2022年11月17日</span></div><p style=\\\"margin:0px;\\\"> 分类</p><div style=\\\"box-sizing:border-box;font-size:15.2288px;margin:0px;\\\"><a href=\\\"https://haoyu.love/blogcategory/notebook\\\" rel=\\\"tag\\\" style=\\\"color:rgb(0, 0, 0);text-decoration:underline;\\\">笔记本</a></div></div><div style=\\\"box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:0.5ch;margin-block:0px;\\\"><p style=\\\"margin:0px;\\\"> 作者：</p><div style=\\\"display:flex;flex-wrap:wrap;font-size:15.2288px;margin:0px;\\\"><div style=\\\"flex-basis:0px;flex-grow:1;\\\"><p style=\\\"margin:0px;\\\">小金鱼儿</p></div></div></div></div><div style=\\\"min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-basis:0px;flex-grow:1;\\\"><div style=\\\"box-sizing:border-box;display:flex;flex-wrap:wrap;flex-direction:column;gap:0.5ch;align-items:flex-start;margin-block:0px;\\\"><p style=\\\"margin:0px;\\\"> 标签</p></div></div></div></div></div><div style=\\\"margin-block:1.5rem 0px;\\\"><div style=\\\"box-sizing:border-box;padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40);padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);\\\"><div style=\\\"margin-block:0px;max-width:650px;margin-left:auto;margin-right:auto;\\\"><h2 style=\\\"font-weight:400;font-size:clamp(2.625rem, 2.625rem + (1vw - 0.48rem) * 8.4135, 3.25rem);line-height:1.2;\\\">评论</h2><h3 style=\\\"font-weight:400;line-height:1.4;margin-bottom:43.5712px;font-size:29.2288px;\\\">《“Docker Clash 旁路由网关模式透明代理”》 有 2 条评论</h3><ol style=\\\"list-style:none;margin-bottom:0px;max-width:100%;padding:0px;box-sizing:border-box;\\\"><li style=\\\"clear:both;\\\"><div style=\\\"box-sizing:border-box;display:flex;margin-bottom:var(--wp--preset--spacing--40);gap:24px;align-items:normal;flex-wrap:nowrap;\\\"><div style=\\\"flex-basis:40px;min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-grow:0;\\\"><div style=\\\"box-sizing:border-box;margin-block:0px;\\\"><img height=\\\"40\\\" src=\\\"https://secure.gravatar.com/avatar/2f043735a90f5e37459ac958297bab13?s=40&amp;is-pending-load=1#038;d=mm&amp;r=g\\\" style=\\\"border-radius:20px;\\\" width=\\\"40\\\"></img></div></div><div style=\\\"min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-basis:0px;flex-grow:1;\\\"><div style=\\\"margin-block:0px;\\\">qaq</div><div style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;gap:24px;display:flex;flex-wrap:wrap;align-items:center;margin-top:0px;margin-bottom:0px;\\\"><div style=\\\"font-size:15.2288px;margin:0px;\\\"><span><a href=\\\"https://haoyu.love/blog1412.html/comment-page-1#comment-7886\\\" style=\\\"color:rgb(0, 0, 0);text-decoration:none;\\\">2023年2月10日</a></span></div></div><div style=\\\"margin-block:1.5rem 0px;\\\"><p>设置完之后，去 dashboard 里，所有节点都 ping 不通怎么办。。国内网络都是通的，需要那啥的网都上不去</p></div><div style=\\\"font-size:15.2288px;margin-block:1.5rem 0px;\\\"><a href=\\\"https://haoyu.love/blog1412.html/comment-page-1?replytocom=7886#respond\\\" rel=\\\"nofollow\\\" style=\\\"color:rgb(0, 0, 0);text-decoration:underline;\\\">回复</a></div></div></div><ol style=\\\"box-sizing:border-box;list-style:none;margin-bottom:0px;max-width:100%;padding-left:32px;\\\"><li style=\\\"clear:both;\\\"><div style=\\\"box-sizing:border-box;display:flex;margin-bottom:var(--wp--preset--spacing--40);gap:24px;align-items:normal;flex-wrap:nowrap;\\\"><div style=\\\"flex-basis:40px;min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-grow:0;\\\"><div style=\\\"box-sizing:border-box;margin-block:0px;\\\"><img height=\\\"40\\\" src=\\\"https://secure.gravatar.com/avatar/d9d342adfc9e051971580b82ed63d93a?s=40&amp;is-pending-load=1#038;d=mm&amp;r=g\\\" style=\\\"border-radius:20px;\\\" width=\\\"40\\\"></img></div></div><div style=\\\"min-width:0px;overflow-wrap:break-word;word-break:break-word;margin:0px;flex-basis:0px;flex-grow:1;\\\"><div style=\\\"margin-block:0px;\\\">小金鱼儿</div><div style=\\\"box-sizing:border-box;margin-block:1.5rem 0px;gap:24px;display:flex;flex-wrap:wrap;align-items:center;margin-top:0px;margin-bottom:0px;\\\"><div style=\\\"font-size:15.2288px;margin:0px;\\\"><span><a href=\\\"https://haoyu.love/blog1412.html/comment-page-1#comment-7899\\\" style=\\\"color:rgb(0, 0, 0);text-decoration:none;\\\">2023年2月13日</a></span></div></div><div style=\\\"margin-block:1.5rem 0px;\\\"><p>看看是不是系统/镜像里面没开包转发？</p></div></div></div> </li></ol></li></ol><div style=\\\"box-sizing:border-box;\\\"><h3 style=\\\"font-weight:400;line-height:1.4;font-size:36px;margin-bottom:0px;\\\">发表回复 <small style=\\\"font-size:17.2288px;margin-left:0.5em;\\\"></small></h3><div><p><span>您的电子邮箱地址不会被公开。</span> <span>必填项已用<span>*</span>标注</span></p><p><span>评论 <span>*</span></span></p><p><span style=\\\"display:block;margin-bottom:0.25em;\\\">显示名称 <span>*</span></span> </p><p><span style=\\\"display:block;margin-bottom:0.25em;\\\">电子邮箱地址 <span>*</span></span> </p><p><span style=\\\"display:block;margin-bottom:0.25em;\\\">网站地址</span> </p><p style=\\\"margin-bottom:1em;\\\"> <span style=\\\"display:inline;\\\">通过邮件通知我后续评论</span></p><p style=\\\"margin-bottom:1em;\\\"> <span style=\\\"display:inline;\\\">通过邮件通知我有新文章</span></p><p>  </p></div></div></div></div></div></span></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45847}]"
metadata_diff: {"new":{"id":"6e51f09dec514826b0ef9e521b51ba10","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345716918,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:12:36.698Z
created_time: 2025-11-28T16:12:36.698Z
type_: 13