{"id":775,"date":"2026-05-26T12:17:52","date_gmt":"2026-05-26T04:17:52","guid":{"rendered":"https:\/\/www.suannai.link\/blog\/linux%e7%b3%bb%e7%bb%9f%e4%b8%8bclash%e8%8a%82%e7%82%b9%e8%ae%a2%e9%98%85%e9%85%8d%e7%bd%ae%e6%95%99%e7%a8%8b\/"},"modified":"2026-05-26T12:17:52","modified_gmt":"2026-05-26T04:17:52","slug":"linux%e7%b3%bb%e7%bb%9f%e4%b8%8bclash%e8%8a%82%e7%82%b9%e8%ae%a2%e9%98%85%e9%85%8d%e7%bd%ae%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.suannai.link\/blog\/linux%e7%b3%bb%e7%bb%9f%e4%b8%8bclash%e8%8a%82%e7%82%b9%e8%ae%a2%e9%98%85%e9%85%8d%e7%bd%ae%e6%95%99%e7%a8%8b\/","title":{"rendered":"Linux\u7cfb\u7edf\u4e0bClash\u8282\u70b9\u8ba2\u9605\u914d\u7f6e\u6559\u7a0b"},"content":{"rendered":"<p>\u5728 Linux \u73af\u5883\u4e2d\u4f7f\u7528 Clash \u7c7b\u4ee3\u7406\u5de5\u5177\uff0c\u6838\u5fc3\u5728\u4e8e\u6b63\u786e\u89e3\u6790\u8ba2\u9605\u94fe\u63a5\u5e76\u751f\u6210\u5bf9\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8bb8\u591a\u7528\u6237\u5728\u521d\u6b21\u914d\u7f6e\u65f6\uff0c\u5e38\u56e0\u6587\u4ef6\u683c\u5f0f\u9519\u8bef\u3001\u6743\u9650\u4e0d\u8db3\u6216\u4f9d\u8d56\u5e93\u7f3a\u5931\u5bfc\u81f4\u5ba2\u6237\u7aef\u65e0\u6cd5\u542f\u52a8\u6216\u8282\u70b9\u5217\u8868\u4e3a\u7a7a\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u8bf4\u660e\u5728 Linux \u7ec8\u7aef\u73af\u5883\u4e0b\uff0c\u5982\u4f55\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177\u83b7\u53d6\u8ba2\u9605\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a Clash \u5ba2\u6237\u7aef\u53ef\u8bc6\u522b\u7684 YAML \u683c\u5f0f\u914d\u7f6e\u6587\u4ef6\uff0c\u6700\u540e\u5b8c\u6210\u57fa\u672c\u8fde\u63a5\u9a8c\u8bc1\u3002<\/p>\n<h2>\u73af\u5883\u51c6\u5907\u4e0e\u4f9d\u8d56\u5b89\u88c5<\/h2>\n<p>Clash \u7684\u6838\u5fc3\u662f\u4e00\u4e2a Go \u8bed\u8a00\u7f16\u5199\u7684\u4e8c\u8fdb\u5236\u7a0b\u5e8f\uff0c\u4f46\u5728 Linux \u4e0a\u7ba1\u7406\u8ba2\u9605\u901a\u5e38\u4f9d\u8d56\u4e8e\u8f85\u52a9\u811a\u672c\u6216\u5ba2\u6237\u7aef\u672c\u8eab\u7684\u529f\u80fd\u3002\u4e3a\u4e86\u5728\u7ec8\u7aef\u4e2d\u987a\u5229\u62c9\u53d6\u548c\u89e3\u6790\u8ba2\u9605\u6570\u636e\uff0c\u7cfb\u7edf\u9700\u8981\u5177\u5907\u57fa\u672c\u7684\u7f51\u7edc\u8bf7\u6c42\u80fd\u529b\u548c\u6587\u672c\u5904\u7406\u5de5\u5177\u3002<\/p>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u7cfb\u7edf\u5df2\u5b89\u88c5 `curl` \u6216 `wget`\uff0c\u7528\u4e8e\u4ece\u8ba2\u9605\u670d\u52a1\u5668\u4e0b\u8f7d\u6570\u636e\u3002\u5927\u591a\u6570 Linux \u53d1\u884c\u7248\u9ed8\u8ba4\u5df2\u5305\u542b\u8fd9\u4e9b\u5de5\u5177\u3002\u82e5\u672a\u5b89\u88c5\uff0c\u53ef\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u83b7\u53d6\u3002\u4f8b\u5982\uff0c\u5728\u57fa\u4e8e Debian \u7684\u7cfb\u7edf\u4e0a\u6267\u884c `sudo apt install curl`\uff0c\u5728\u57fa\u4e8e RPM \u7684\u7cfb\u7edf\u4e0a\u6267\u884c `sudo dnf install curl`\u3002<\/p>\n<p>\u5176\u6b21\uff0cClash \u914d\u7f6e\u6587\u4ef6\u7684\u6807\u51c6\u683c\u5f0f\u4e3a YAML\u3002\u867d\u7136 Clash \u5ba2\u6237\u7aef\u53ef\u4ee5\u81ea\u52a8\u89e3\u6790\uff0c\u4f46\u624b\u52a8\u68c0\u67e5\u6216\u4fee\u6539\u914d\u7f6e\u65f6\uff0c\u4e86\u89e3 YAML \u7684\u57fa\u672c\u8bed\u6cd5\u81f3\u5173\u91cd\u8981\u3002YAML \u5bf9\u7f29\u8fdb\u654f\u611f\uff0c\u901a\u5e38\u4f7f\u7528\u4e24\u4e2a\u7a7a\u683c\u4f5c\u4e3a\u4e00\u7ea7\u7f29\u8fdb\uff0c\u4e25\u7981\u4f7f\u7528 Tab \u952e\u3002<\/p>\n<p>\u5bf9\u4e8e\u4f7f\u7528 GUI \u5ba2\u6237\u7aef\uff08\u5982 Clash Verge\u3001FlClash \u7b49\uff09\u7684\u7528\u6237\uff0c\u901a\u5e38\u65e0\u9700\u5728\u7ec8\u7aef\u624b\u52a8\u64cd\u4f5c\u8ba2\u9605\u6587\u4ef6\uff0c\u53ea\u9700\u5728\u5ba2\u6237\u7aef\u8bbe\u7f6e\u4e2d\u586b\u5165\u8ba2\u9605\u94fe\u63a5\u5373\u53ef\u3002\u4f46\u4e86\u89e3\u5e95\u5c42\u539f\u7406\u6709\u52a9\u4e8e\u6392\u67e5\u5ba2\u6237\u7aef\u65e0\u6cd5\u52a0\u8f7d\u8282\u70b9\u7684\u95ee\u9898\u3002\u82e5\u4f7f\u7528\u7eaf\u547d\u4ee4\u884c\u7248 Clash\uff08\u5982 `clash` \u6216 `clash-premium`\uff09\uff0c\u5219\u5fc5\u987b\u624b\u52a8\u7ba1\u7406\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n\n<h2>\u8ba2\u9605\u94fe\u63a5\u89e3\u6790\u4e0e\u914d\u7f6e\u6587\u4ef6\u751f\u6210<\/h2>\n<p>\u8ba2\u9605\u94fe\u63a5\u901a\u5e38\u4ee5 `clash:\/\/install-config?url=` \u6216 ` \u5f00\u5934\uff0c\u5185\u5bb9\u7ecf\u8fc7 Base64 \u7f16\u7801\u6216 YAML \u6587\u672c\u683c\u5f0f\u3002\u5728 Linux \u4e2d\uff0c\u83b7\u53d6\u6700\u65b0\u8282\u70b9\u5217\u8868\u7684\u5173\u952e\u6b65\u9aa4\u662f\u5c06\u8fdc\u7a0b\u8ba2\u9605\u5185\u5bb9\u5199\u5165\u672c\u5730\u6587\u4ef6\u3002<\/p>\n<p>\u5047\u8bbe\u4f60\u5df2\u62e5\u6709\u8ba2\u9605\u94fe\u63a5\uff0c\u53ef\u4ee5\u901a\u8fc7 `curl` \u547d\u4ee4\u5c06\u5176\u4fdd\u5b58\u4e3a `config.yaml`\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`bash<br \/>curl -L -o config.yaml &#8220;\u4f60\u7684\u8ba2\u9605\u94fe\u63a5&#8221;<br \/>&#8220;`<\/p>\n<p>\u53c2\u6570 `-L` \u7528\u4e8e\u8ddf\u968f\u91cd\u5b9a\u5411\uff0c\u56e0\u4e3a\u90e8\u5206\u8ba2\u9605\u670d\u52a1\u4f1a\u8df3\u8f6c\u3002`-o config.yaml` \u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u540d\u4e3a `config.yaml`\u3002<\/p>\n<p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u52a1\u5fc5\u68c0\u67e5\u6587\u4ef6\u5185\u5bb9\u662f\u5426\u6b63\u5e38\u3002\u6267\u884c `cat config.yaml` \u67e5\u770b\u524d\u51e0\u884c\u3002\u6b63\u5e38\u7684\u8ba2\u9605\u6587\u4ef6\u5e94\u4ee5 `proxies:` \u6216 `proxy-groups:` \u5f00\u5934\uff0c\u4e14\u5305\u542b\u5927\u91cf\u8282\u70b9\u4fe1\u606f\u3002\u5982\u679c\u8fd4\u56de\u7684\u662f HTML \u9875\u9762\u5185\u5bb9\uff08\u5982\u767b\u5f55\u9875\u3001\u5e7f\u544a\u9875\uff09\uff0c\u8bf4\u660e\u8ba2\u9605\u94fe\u63a5\u53ef\u80fd\u5931\u6548\u3001\u9700\u8981 Cookie \u9a8c\u8bc1\u6216\u8ba2\u9605\u5df2\u8fc7\u671f\u3002<\/p>\n<p>\u5bf9\u4e8e\u9700\u8981\u81ea\u52a8\u66f4\u65b0\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684 Shell \u811a\u672c\u6216\u4f7f\u7528 `cron` \u5b9a\u65f6\u4efb\u52a1\uff0c\u5b9a\u671f\u6267\u884c\u4e0a\u8ff0 `curl` \u547d\u4ee4\uff0c\u4ee5\u786e\u4fdd\u8282\u70b9\u5217\u8868\u59cb\u7ec8\u4e3a\u6700\u65b0\u72b6\u6001\u3002\u90e8\u5206\u9ad8\u7ea7\u7528\u6237\u4f1a\u4f7f\u7528 `subconverter` \u7b49\u5f00\u6e90\u5de5\u5177\u5728\u672c\u5730\u8f6c\u6362\u8ba2\u9605\u683c\u5f0f\uff0c\u4ee5\u9002\u914d\u4e0d\u540c\u5ba2\u6237\u7aef\u7684\u9700\u6c42\uff0c\u4f46\u8fd9\u9700\u8981\u989d\u5916\u7684\u7f16\u8bd1\u6216\u4e0b\u8f7d\u6b65\u9aa4\u3002<\/p>\n<h2>\u914d\u7f6e\u6587\u4ef6\u5173\u952e\u8bbe\u7f6e\u9879\u89e3\u6790<\/h2>\n<p>\u751f\u6210\u7684 `config.yaml` \u6587\u4ef6\u4e2d\uff0c\u6709\u51e0\u4e2a\u5173\u952e\u5b57\u6bb5\u76f4\u63a5\u5f71\u54cd\u4ee3\u7406\u529f\u80fd\u7684\u6b63\u5e38\u4f7f\u7528\u3002\u7406\u89e3\u8fd9\u4e9b\u5b57\u6bb5\u6709\u52a9\u4e8e\u5feb\u901f\u5b9a\u4f4d\u914d\u7f6e\u9519\u8bef\u3002<\/p>\n<h3>\u7aef\u53e3\u8bbe\u7f6e<\/h3>\n<p>`port` \u5b57\u6bb5\u5b9a\u4e49 HTTP \u4ee3\u7406\u7aef\u53e3\uff0c`socks-port` \u5b9a\u4e49 SOCKS5 \u4ee3\u7406\u7aef\u53e3\uff0c`redir-port` \u5b9a\u4e49\u900f\u660e\u4ee3\u7406\u7aef\u53e3\uff08\u9700 root \u6743\u9650\uff09\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cHTTP \u7aef\u53e3\u4e3a 7890\uff0cSOCKS5 \u7aef\u53e3\u4e3a 7891\u3002<\/p>\n<p>\u82e5\u4f60\u8ba1\u5212\u901a\u8fc7\u7ec8\u7aef\u4ee3\u7406\u5de5\u5177\uff08\u5982 `wget` \u6216 `curl`\uff09\u4f7f\u7528\u4ee3\u7406\uff0c\u9700\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf `http_proxy` \u548c `https_proxy` \u6307\u5411\u8fd9\u4e9b\u7aef\u53e3\u3002\u4f8b\u5982\uff1a<\/p>\n<p>&#8220;`bash<br \/>export http_proxy=<br \/>export https_proxy=<br \/>&#8220;`<\/p>\n<p>\u82e5\u9700\u5168\u5c40\u4ee3\u7406\uff0c\u53ef\u8003\u8651\u4f7f\u7528 `proxychains` \u7b49\u5de5\u5177\uff0c\u4f46\u9700\u6ce8\u610f\u90e8\u5206\u5e94\u7528\u53ef\u80fd\u4e0d\u9075\u5faa\u7cfb\u7edf\u4ee3\u7406\u8bbe\u7f6e\u3002<\/p>\n<h3>\u7b56\u7565\u7ec4\u4e0e\u89c4\u5219<\/h3>\n<p>`proxy-groups` \u5b9a\u4e49\u4e86\u8282\u70b9\u7684\u5206\u7ec4\u7b56\u7565\uff0c\u5982 `PROXY`\u3001`DIRECT`\u3001`REJECT` \u7b49\u3002`rules` \u5b57\u6bb5\u5219\u6839\u636e\u57df\u540d\u6216 IP \u51b3\u5b9a\u6d41\u91cf\u8d70\u54ea\u4e2a\u7b56\u7565\u7ec4\u3002<\/p>\n<p>\u9ed8\u8ba4\u914d\u7f6e\u4e2d\uff0c\u901a\u5e38\u5305\u542b `GEOIP,CN,DIRECT` \u548c `MATCH,PROXY` \u7b49\u89c4\u5219\u3002\u8fd9\u610f\u5473\u7740\u8bbf\u95ee\u4e2d\u56fd IP \u7684\u5730\u5740\u76f4\u63a5\u8fde\u63a5\uff0c\u5176\u4f59\u6d41\u91cf\u8d70\u4ee3\u7406\u3002\u82e5\u4f60\u53d1\u73b0\u67d0\u4e9b\u56fd\u5185\u7f51\u7ad9\u8bbf\u95ee\u7f13\u6162\uff0c\u53ef\u80fd\u662f\u89c4\u5219\u5339\u914d\u4e0d\u51c6\u786e\uff0c\u9700\u68c0\u67e5 `rules` \u90e8\u5206\u662f\u5426\u5305\u542b\u6b63\u786e\u7684\u56fd\u5185\u57df\u540d\u76f4\u8fde\u89c4\u5219\u3002<\/p>\n<h3>\u65e5\u5fd7\u7ea7\u522b<\/h3>\n<p>`log-level` \u63a7\u5236\u8f93\u51fa\u65e5\u5fd7\u7684\u8be6\u7ec6\u7a0b\u5ea6\u3002\u53ef\u9009\u503c\u5305\u62ec `silent`\u3001`error`\u3001`warning`\u3001`info`\u3001`debug`\u3002\u9ed8\u8ba4\u901a\u5e38\u4e3a `info`\u3002<\/p>\n<p>\u5728\u6392\u67e5\u8fde\u63a5\u95ee\u9898\u65f6\uff0c\u53ef\u5c06 `log-level` \u4e34\u65f6\u6539\u4e3a `debug`\uff0c\u4ee5\u4fbf\u67e5\u770b\u8be6\u7ec6\u7684 DNS \u89e3\u6790\u548c\u8fde\u63a5\u5c1d\u8bd5\u8fc7\u7a0b\u3002\u4f46\u8c03\u8bd5\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u6539\u56de `info` \u6216 `warning`\uff0c\u4ee5\u51cf\u5c11\u65e5\u5fd7\u6587\u4ef6\u4f53\u79ef\u548c\u63d0\u5347\u6027\u80fd\u3002<\/p>\n<h2>\u542f\u52a8\u5ba2\u6237\u7aef\u4e0e\u6743\u9650\u95ee\u9898<\/h2>\n<p>\u5728 Linux \u4e2d\u542f\u52a8 Clash \u65f6\uff0c\u6743\u9650\u548c\u540e\u53f0\u8fd0\u884c\u662f\u5e38\u89c1\u75db\u70b9\u3002<\/p>\n<h3>\u900f\u660e\u4ee3\u7406\u6743\u9650<\/h3>\n<p>\u82e5\u4f7f\u7528 `redir-port` \u5b9e\u73b0\u7cfb\u7edf\u7ea7\u900f\u660e\u4ee3\u7406\uff0cClash \u9700\u8981 root \u6743\u9650\u4ee5\u914d\u7f6e iptables \u89c4\u5219\u3002\u6b64\u65f6\uff0c\u9700\u4f7f\u7528 `sudo` \u542f\u52a8\uff1a<\/p>\n<p>&#8220;`bash<br \/>sudo clash -d .<br \/>&#8220;`<\/p>\n<p>\u5176\u4e2d `-d .` \u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u4e3a\u5f53\u524d\u76ee\u5f55\u3002\u82e5\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e\u5176\u4ed6\u8def\u5f84\uff0c\u9700\u76f8\u5e94\u4fee\u6539 `-d` \u53c2\u6570\u3002<\/p>\n<h3>\u975e\u7279\u6743\u6a21\u5f0f<\/h3>\n<p>\u82e5\u4ec5\u4f7f\u7528 HTTP\/SOCKS \u4ee3\u7406\uff0c\u65e0\u9700 root \u6743\u9650\u3002\u76f4\u63a5\u8fd0\u884c `clash -d .` \u5373\u53ef\u3002\u4f46\u9700\u6ce8\u610f\uff0c\u975e\u7279\u6743\u6a21\u5f0f\u4e0b\u65e0\u6cd5\u5b9e\u73b0\u900f\u660e\u4ee3\u7406\uff0c\u5176\u4ed6\u5e94\u7528\u9700\u624b\u52a8\u914d\u7f6e\u4ee3\u7406\u5730\u5740\u624d\u80fd\u4f7f\u7528 Clash\u3002<\/p>\n<h3>\u540e\u53f0\u8fd0\u884c<\/h3>\n<p>\u4e3a\u4fdd\u6301 Clash \u5728\u540e\u53f0\u6301\u7eed\u8fd0\u884c\uff0c\u53ef\u4f7f\u7528 `systemd` \u521b\u5efa\u670d\u52a1\u3002\u521b\u5efa `\/etc\/systemd\/system\/clash.service` \u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>&#8220;`ini<br \/>[Unit]<br \/>Description=Clash Proxy<br \/>After=network.target<\/p>\n<p>[Service]<br \/>Type=simple<br \/>User=root<br \/>ExecStart=\/usr\/bin\/clash -d \/etc\/clash<br \/>Restart=on-failure<\/p>\n<p>[Install]<br \/>WantedBy=multi-user.target<br \/>&#8220;`<\/p>\n<p>\u4fdd\u5b58\u540e\uff0c\u6267\u884c `sudo systemctl daemon-reload` \u91cd\u8f7d\u914d\u7f6e\uff0c`sudo systemctl enable &#8211;now clash` \u542f\u7528\u5e76\u542f\u52a8\u670d\u52a1\u3002\u6b64\u65b9\u5f0f\u786e\u4fdd Clash \u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\uff0c\u5e76\u5728\u5d29\u6e83\u540e\u81ea\u52a8\u91cd\u542f\u3002<\/p>\n<h2>\u5e38\u89c1\u914d\u7f6e\u9519\u8bef\u4e0e\u6392\u67e5\u65b9\u6cd5<\/h2>\n<p>\u5728\u914d\u7f6e\u8fc7\u7a0b\u4e2d\uff0c\u7528\u6237\u5e38\u9047\u5230\u5ba2\u6237\u7aef\u65e0\u6cd5\u542f\u52a8\u6216\u8282\u70b9\u5217\u8868\u4e3a\u7a7a\u7684\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u5e38\u89c1\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;\">\n<thead>\n<tr>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u95ee\u9898\u8868\u73b0<\/th>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u53ef\u80fd\u539f\u56e0<\/th>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6cd5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u5ba2\u6237\u7aef\u542f\u52a8\u62a5\u9519<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u914d\u7f6e\u6587\u4ef6\u683c\u5f0f\u9519\u8bef\uff08\u5982 YAML \u7f29\u8fdb\u9519\u8bef\u3001\u7279\u6b8a\u5b57\u7b26\u672a\u8f6c\u4e49\uff09<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u4f7f\u7528\u5728\u7ebf YAML \u6821\u9a8c\u5de5\u5177\u68c0\u67e5 `config.yaml` \u8bed\u6cd5\uff1b\u91cd\u70b9\u68c0\u67e5 `proxies` \u548c `proxy-groups` \u90e8\u5206\u7684\u7f29\u8fdb\u662f\u5426\u4e00\u81f4\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u8282\u70b9\u5217\u8868\u4e3a\u7a7a<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u8ba2\u9605\u94fe\u63a5\u5931\u6548\u3001\u9700\u8981 Cookie \u9a8c\u8bc1\u3001\u6216\u8ba2\u9605\u5185\u5bb9\u975e\u6807\u51c6 YAML<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u8ba2\u9605\u94fe\u63a5\uff0c\u67e5\u770b\u662f\u5426\u8fd4\u56de\u6b63\u5e38\u8282\u70b9\u6570\u636e\uff1b\u82e5\u8fd4\u56de HTML\uff0c\u8bf4\u660e\u94fe\u63a5\u9700\u66f4\u65b0\u6216\u9a8c\u8bc1\u65b9\u5f0f\u6539\u53d8\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u8fde\u63a5\u8d85\u65f6<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">DNS \u89e3\u6790\u5931\u8d25\u3001\u8282\u70b9\u7aef\u53e3\u88ab\u5c01\u3001\u6216\u672c\u5730\u9632\u706b\u5899\u62e6\u622a<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u68c0\u67e5 `config.yaml` \u4e2d\u7684 `dns` \u90e8\u5206\u662f\u5426\u914d\u7f6e\u4e86\u53ef\u9760\u7684 DNS \u670d\u52a1\u5668\uff1b\u5c1d\u8bd5\u5207\u6362\u8282\u70b9\u7ec4\u7b56\u7565\uff1b\u68c0\u67e5\u7cfb\u7edf\u9632\u706b\u5899\u662f\u5426\u653e\u884c 7890\/7891 \u7aef\u53e3\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u56fd\u5185\u7f51\u7ad9\u6162<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u89c4\u5219\u5339\u914d\u4e0d\u51c6\u786e\uff0c\u5bfc\u81f4\u56fd\u5185\u6d41\u91cf\u8bef\u8d70\u4ee3\u7406<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u68c0\u67e5 `rules` \u90e8\u5206\u662f\u5426\u5305\u542b `GEOIP,CN,DIRECT`\uff1b\u786e\u4fdd `proxy-groups` \u4e2d `DIRECT` \u7b56\u7565\u7ec4\u5b58\u5728\u4e14\u672a\u88ab\u9519\u8bef\u8986\u76d6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u65e5\u5fd7\u62a5\u9519 &#8220;bind address already in use&#8221;<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u7aef\u53e3\u88ab\u5176\u4ed6\u8fdb\u7a0b\u5360\u7528<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u4f7f\u7528 `netstat -tlnp<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">grep 7890` \u67e5\u627e\u5360\u7528\u7aef\u53e3\u7684\u8fdb\u7a0b\uff1b\u4fee\u6539 `config.yaml` \u4e2d\u7684 `port` \u4e3a\u5176\u4ed6\u672a\u5360\u7528\u7aef\u53e3\uff08\u5982 7892\uff09\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<h2>\u9a8c\u8bc1\u914d\u7f6e\u662f\u5426\u751f\u6548<\/h2>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u9700\u9a8c\u8bc1\u4ee3\u7406\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<h3>\u547d\u4ee4\u884c\u9a8c\u8bc1<\/h3>\n<p>\u5728\u7ec8\u7aef\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u82e5\u8fd4\u56de\u7684 IP \u5730\u5740\u975e\u672c\u673a IP\uff0c\u4e14\u4f4d\u4e8e\u4ee3\u7406\u8282\u70b9\u6240\u5728\u5730\uff0c\u5219\u8bf4\u660e\u4ee3\u7406\u751f\u6548\uff1a<\/p>\n<p>&#8220;`bash<br \/>curl -x <br \/>&#8220;`<\/p>\n<p>\u82e5\u4f7f\u7528 SOCKS5 \u4ee3\u7406\uff0c\u53ef\u4f7f\u7528 `proxychains`\uff1a<\/p>\n<p>&#8220;`bash<br \/>proxychains curl <br \/>&#8220;`<\/p>\n<h3>\u5ba2\u6237\u7aef\u754c\u9762\u9a8c\u8bc1<\/h3>\n<p>\u82e5\u4f7f\u7528 GUI \u5ba2\u6237\u7aef\uff0c\u89c2\u5bdf\u754c\u9762\u4e2d\u7684\u201c\u8fde\u63a5\u72b6\u6001\u201d\u6216\u201c\u5b9e\u65f6\u6d41\u91cf\u201d\u56fe\u8868\u3002\u6b63\u5e38\u8fde\u63a5\u65f6\uff0c\u5e94\u6709\u6301\u7eed\u7684\u6d41\u91cf\u6ce2\u52a8\u3002\u70b9\u51fb\u201c\u6d4b\u8bd5\u5ef6\u8fdf\u201d\uff0c\u82e5\u8282\u70b9\u8fd4\u56de\u6b63\u5e38\u5ef6\u8fdf\u503c\uff08\u5982 50-200ms\uff09\uff0c\u8bf4\u660e\u8282\u70b9\u53ef\u7528\u3002<\/p>\n<h3>\u5e94\u7528\u9a8c\u8bc1<\/h3>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbe\u7f6e\u7cfb\u7edf\u4ee3\u7406\u4e3a 127.0.0.1:7890\uff0c\u8bbf\u95ee\u9700\u8981\u7279\u5b9a\u5730\u533a IP \u7684\u7f51\u7ad9\uff0c\u786e\u8ba4\u5185\u5bb9\u6b63\u5e38\u52a0\u8f7d\u3002\u82e5\u4f7f\u7528\u900f\u660e\u4ee3\u7406\uff0c\u5219\u65e0\u9700\u624b\u52a8\u8bbe\u7f6e\uff0c\u76f4\u63a5\u8bbf\u95ee\u5373\u53ef\u3002<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u5728 Linux \u7cfb\u7edf\u4e2d\u5b8c\u6210 Clash \u8282\u70b9\u8ba2\u9605\u7684\u914d\u7f6e\u4e0e\u9a8c\u8bc1\u3002\u91cd\u70b9\u5728\u4e8e\u786e\u4fdd\u914d\u7f6e\u6587\u4ef6\u683c\u5f0f\u6b63\u786e\u3001\u8ba2\u9605\u94fe\u63a5\u6709\u6548\u3001\u7aef\u53e3\u672a\u88ab\u5360\u7528\uff0c\u4ee5\u53ca\u89c4\u5219\u8bbe\u7f6e\u7b26\u5408\u5b9e\u9645\u9700\u6c42\u3002\u5b9a\u671f\u66f4\u65b0\u8ba2\u9605\u6587\u4ef6\u662f\u7ef4\u6301\u8282\u70b9\u53ef\u7528\u6027\u7684\u5173\u952e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Linux \u73af\u5883\u4e2d\u4f7f\u7528 Clash \u7c7b\u4ee3\u7406\u5de5\u5177\uff0c\u6838\u5fc3\u5728\u4e8e\u6b63\u786e\u89e3\u6790\u8ba2\u9605\u94fe\u63a5\u5e76\u751f\u6210\u5bf9\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8bb8\u591a\u7528\u6237\u5728\u521d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":0,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}