{"id":298,"date":"2024-12-07T11:43:44","date_gmt":"2024-12-07T03:43:44","guid":{"rendered":"https:\/\/zhzxs.asia\/?p=298"},"modified":"2024-12-07T13:16:45","modified_gmt":"2024-12-07T05:16:45","slug":"1733547815","status":"publish","type":"post","link":"https:\/\/www.zhzxs.site\/index.php\/2024\/12\/07\/1733547815\/","title":{"rendered":"X-ui\u914d\u7f6e\u5206\u6d41"},"content":{"rendered":"\n<p>\u4e4b\u524d\u4e00\u76f4\u60f3\u7528\u624b\u673a\u7684chatgpt\u8bed\u97f3\u670d\u52a1\uff0c\u5948\u4f55\u6211\u7684\u670d\u52a1\u5668\u53ea\u80fd\u89e3\u9501openai\u7f51\u9875\u7248\uff0c\u624b\u673a\u7248\u662f\u89e3\u9501\u4e0d\u4e86\u7684\uff0c\u6240\u4ee5\u5c31\u4e00\u76f4\u5728\u5bfb\u6c42\u65b9\u6cd5\uff0c\u65b9\u6cd5\u5c31\u662f\u4f7f\u7528\u5728\u670d\u52a1\u5668\u5b89\u88c5warp\uff0c\u5728\u4f7f\u7528Xui\u9762\u677f\u914d\u7f6e\u4e00\u4e0b\u5206\u6d41\u5c31\u53ef\u4ee5\u4e86\u3002(ps,\u540e\u9762\u53d1\u73b0\u7528Xray\u4e0d\u914d\u7f6e\u5206\u6d41\u4e5f\u662f\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u624b\u673a\u7248\uff0c\u4f46\u662fopenvpn\u5c31\u4e0d\u884c\uff0c\u6211\u4e5f\u4e0d\u6e05\u695a\u4ed6\u8fd9\u4e2aip\u5c01\u9501\u662f\u600e\u6837\u5224\u65ad\u7684\u4e86)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56<\/strong><\/h3>\n\n\n\n<p>\u66f4\u65b0\u7cfb\u7edf\u5e76\u5b89\u88c5\u5fc5\u8981\u7684\u5de5\u5177\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y<br>sudo apt install -y curl wget gnupg lsb-release<br><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u6dfb\u52a0 Cloudflare \u7684\u5b98\u65b9\u5b58\u50a8\u5e93<\/strong><\/h3>\n\n\n\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0 Cloudflare \u7684 GPG \u5bc6\u94a5\u548c\u8f6f\u4ef6\u6e90\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code># \u6dfb\u52a0 GPG \u5bc6\u94a5<br>curl https:\/\/pkg.cloudflareclient.com\/pubkey.gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/cloudflare-warp.gpg<br><br># \u6dfb\u52a0\u8f6f\u4ef6\u6e90<br>echo \"deb [signed-by=\/usr\/share\/keyrings\/cloudflare-warp.gpg] https:\/\/pkg.cloudflareclient.com\/ $(lsb_release -cs) main\" | sudo tee \/etc\/apt\/sources.list.d\/cloudflare-client.list<br><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>\u5b89\u88c5 Cloudflare Warp \u5ba2\u6237\u7aef<\/strong><\/h3>\n\n\n\n<p>\u66f4\u65b0\u5305\u5217\u8868\u5e76\u5b89\u88c5 Warp \u5ba2\u6237\u7aef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt update<br>sudo apt install -y cloudflare-warp<br><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>\u767b\u5f55\u5e76\u542f\u7528 Warp<\/strong><\/h3>\n\n\n\n<p>1.\u767b\u5f55 Cloudflare Warp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>warp-cli registration new<\/code><\/pre>\n\n\n\n<p>2.\u5c06Warp \u8bbe\u7f6e\u4e3a Proxy \u6a21\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>warp-cli mode proxy <\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff0c\u5982\u679c\u8fd9\u91cc\u63d0\u793a\u6ca1\u6709\u8fd9\u4e2a\u547d\u4ee4\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u8fd9\u4e2a\u547d\u4ee4\u5728\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u9700\u8981\u53bb\u67e5\u770b\u5e2e\u52a9\u6587\u6863\u67e5\u770b\u8bbe\u7f6e\u4ee3\u7406\u6a21\u5f0f\u7684\u65b0\u547d\u4ee4\uff0c\u5982\u679c\u8fd9\u6761\u547d\u4ee4\u6ca1\u6709\u6267\u884c\u6210\u529f\uff0c\u6700\u597d\u4e0d\u8981\u6267\u884c\u4e0b\u9762\u7684\u542f\u7528\u547d\u4ee4\uff0c\u56e0\u4e3awarp\u9ed8\u8ba4\u662f\u5168\u5c40\u6a21\u5f0f\uff0c\u5982\u679c\u4f60\u7528\u7684xshell\u7b49\u8f6f\u4ef6\u8fde\u63a5\u670d\u52a1\u5668\uff0c\u90a3\u4e48\u542f\u7528\u4e4b\u540e\u4f1a\u7acb\u5373\u65ad\u5f00\uff0c\u9700\u8981\u4f60\u5230\u4e91\u670d\u52a1\u5668\u5382\u5546\u8fdb\u884c\u8fde\u63a5\u5173\u95edwarp\u540e\u624d\u80fd\u4f7f\u7528xshell<\/p>\n\n\n\n<p>3.\u542f\u7528 Warp<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>warp-cli connect<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>\u914d\u7f6e Proxy<\/strong><\/h3>\n\n\n\n<p>Warp \u9ed8\u8ba4\u4f1a\u5728\u672c\u5730\u76d1\u542c <code>127.0.0.1:40000<\/code> \u7aef\u53e3\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u9a8c\u8bc1 Proxy \u662f\u5426\u6b63\u5e38\u5de5\u4f5c\uff1a<\/p>\n\n\n\n<p>1.<strong>\u67e5\u770b\u8fde\u63a5\u72b6\u6001\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>warp-cli status <\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u663e\u793a <code>Connected<\/code>\uff0c\u8bf4\u660e Warp \u5df2\u6210\u529f\u8fde\u63a5\u3002<\/p>\n\n\n\n<p>2.<strong>\u8bbe\u7f6e\u7cfb\u7edf\u4ee3\u7406\uff08\u53ef\u9009\uff09\uff1a<\/strong> \u5c06\u4ee3\u7406\u5730\u5740\u914d\u7f6e\u4e3a <code>SOCKS5 127.0.0.1:40000<\/code>\u3002<\/p>\n\n\n\n<p>3.<strong>\u901a\u8fc7\u4ee3\u7406\u8fdb\u884c\u6d4b\u8bd5\uff1a<\/strong> \u4f7f\u7528 <code>curl<\/code> \u6d4b\u8bd5\u4ee3\u7406\u8fde\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --socks5 127.0.0.1:40000 https:\/\/www.cloudflare.com\/cdn-cgi\/trace <\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u8fd4\u56de\u4e86 Cloudflare \u7684\u54cd\u5e94\u4fe1\u606f\uff08\u5982 IP \u5730\u5740\u548c\u4f4d\u7f6e\u4fe1\u606f\uff09\uff0c\u8bf4\u660e\u4ee3\u7406\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>\u5f00\u673a\u81ea\u542f\u52a8\uff08\u53ef\u9009\uff09<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u5e0c\u671b Warp \u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\uff0c\u53ef\u4ee5\u5c06\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0\u5230\u5f00\u673a\u542f\u52a8\u9879\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo systemctl enable warp-svc<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u6ce8\u610f\u4e8b\u9879<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Proxy \u6a21\u5f0f\u4f7f\u7528\u7684\u662f SOCKS5 \u534f\u8bae\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u652f\u6301 SOCKS5 \u4ee3\u7406\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u9700\u8981\u5168\u5c40\u6a21\u5f0f\uff0c\u53ef\u4ee5\u901a\u8fc7 <code>warp-cli mode warp<\/code> \u5c06\u5176\u5207\u6362\u4e3a\u5168\u5c40\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u6837\uff0cCloudflare Client \u5c31\u5728\u4f60\u7684 Ubuntu 22.04 \u4e0a\u6210\u529f\u914d\u7f6e\u4e3a Proxy \u6a21\u5f0f\u4e86\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8.\u5b89\u88c5x-ui\u9762\u677f<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>bash &lt;(curl -Ls https:\/\/raw.githubusercontent.com\/vaxilu\/x-ui\/master\/install.sh)<\/code><\/pre>\n\n\n\n<p>\u6839\u636e\u63d0\u793a\u5b89\u88c5\u6210\u529f\u540e\u767b\u5f55\u9762\u677f\u627e\u5230\u9762\u677f\u8bbe\u7f6e\uff0cxray\u76f8\u5173\u8bbe\u7f6e\u8bb2\u4e00\u4e0b\u4ee3\u7801\u7c98\u8d34\u8fdb\u53bb\u4ee3\u66ff\u539f\u6765\u7684<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"api\": {\n      \"services\": &#91;\n        \"HandlerService\",\n        \"LoggerService\",\n        \"StatsService\"\n      ],\n      \"tag\": \"api\"\n    },\n    \"inbounds\": &#91;\n      {\n        \"listen\": \"127.0.0.1\",\n        \"port\": 62789,\n        \"protocol\": \"dokodemo-door\",\n        \"settings\": {\n          \"address\": \"127.0.0.1\"\n        },\n        \"tag\": \"api\"\n      }\n    ],\n    \n    \"outbounds\":&#91;\n        {\n            \"protocol\":\"freedom\"\n        },\n        {\n            \"tag\":\"warp\",\n            \"protocol\":\"socks\",\n            \"settings\":{\n                \"servers\":&#91;\n                    {\n                        \"address\":\"127.0.0.1\",\n                        \"port\":40000 \n                    }\n                ]\n            }\n        },\n        {\n            \"tag\":\"WARP-socks5-v4\",\n            \"protocol\":\"freedom\",\n            \"settings\":{\n                \"domainStrategy\":\"UseIPv4\"\n            },\n            \"proxySettings\":{\n                \"tag\":\"warp\"\n            }\n        },\n        {\n            \"tag\":\"WARP-socks5-v6\",\n            \"protocol\":\"freedom\",\n            \"settings\":{\n                \"domainStrategy\":\"UseIPv6\"\n            },\n            \"proxySettings\":{\n                \"tag\":\"warp\"\n            }\n        }\n    ],\n    \"policy\": {\n      \"system\": {\n        \"statsInboundDownlink\": true,\n        \"statsInboundUplink\": true\n      }\n    },\n    \n    \n   \n    \"routing\":{\n        \"rules\":&#91;\n            {\n                \"type\":\"field\",\n                \"domain\":&#91;\n                    \"openai.com\",\n                    \"chatgpt.com\",\n                    \"whatismyipaddress.com\",\n                    \"ipaddress.my\",\n                    \"whatismyip.com\"\n                ],\n                \"outboundTag\":\"WARP-socks5-v4\"\n            },\n            {\n                \"type\":\"field\",\n                \"domain\":&#91;\n                    \"openai.com\",\n                    \"chatgpt.com\",\n                    \"whatismyipaddress.com\",\n                    \"ipaddress.my\",\n                    \"whatismyip.com\"\n                    \n                ],\n                \"outboundTag\":\"WARP-socks5-v6\"\n            }\n        ]\n    },\n    \"stats\": {}\n  }<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u91cd\u542f\u9762\u677f\u67e5\u770b\u9762\u677f\u72b6\u6001\u4e3arunning\u5c31\u5206\u6d41\u6210\u529f\u4e86\uff0c\u63a5\u4e0b\u6765\u53ea\u9700\u53bb\u5165\u7ad9\u5217\u8868\u7ed9\u81ea\u5df1\u751f\u6210\u914d\u7f6e\u6587\u4ef6\u5c31\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u4e86\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f:domain\u91cc\u9762\u7684\u57df\u540d\u662f\u53ef\u4ee5\u81ea\u5df1\u66ff\u6362\u7684\uff0c\u4f60\u60f3\u8981\u54ea\u4e2a\u57df\u540d\u8d70warp\u4f60\u5c31\u628a\u57df\u540d\u5199\u8fdbdomain\u91cc\u9762\u5c31\u53ef\u4ee5\u4e86\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u4e00\u76f4\u60f3\u7528\u624b\u673a\u7684chatgpt\u8bed\u97f3\u670d\u52a1\uff0c\u5948\u4f55\u6211\u7684\u670d\u52a1\u5668\u53ea\u80fd\u89e3\u9501openai\u7f51\u9875\u7248\uff0c\u624b\u673a\u7248\u662f\u89e3\u9501\u4e0d\u4e86\u7684\uff0c\u6240\u4ee5\u5c31 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":91,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[76,43,74,75,73],"class_list":["post-298","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2","tag-cloudflare","tag-warp","tag-x-ui","tag-xray","tag-73"],"_links":{"self":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":23,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/298\/revisions\/329"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media\/91"}],"wp:attachment":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}