{"id":1411,"date":"2026-10-04T09:39:37","date_gmt":"2026-10-04T01:39:37","guid":{"rendered":"https:\/\/www.suannai.link\/blog\/android%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%aexray%e5%b7%a5%e5%85%b7\/"},"modified":"2026-10-04T09:39:37","modified_gmt":"2026-10-04T01:39:37","slug":"android%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%aexray%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/www.suannai.link\/blog\/android%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%aexray%e5%b7%a5%e5%85%b7\/","title":{"rendered":"Android\u600e\u4e48\u914d\u7f6eXray\u5de5\u5177"},"content":{"rendered":"<p>\u5728 Android \u5e73\u53f0\u4e0a\u4f7f\u7528 Xray \u6838\u5fc3\u901a\u5e38\u4f9d\u8d56\u7b2c\u4e09\u65b9\u5ba2\u6237\u7aef\u6765\u5b9e\u73b0\u56fe\u5f62\u5316\u914d\u7f6e\u3002\u7531\u4e8e Xray \u672c\u8eab\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5185\u6838\uff0c\u7528\u6237\u9700\u8981\u5b89\u88c5\u652f\u6301 Xray \u534f\u8bae\u7684\u5ba2\u6237\u7aef\u5e94\u7528\uff0c\u901a\u8fc7\u5bfc\u5165\u8ba2\u9605\u94fe\u63a5\u6216\u624b\u52a8\u586b\u5199\u8282\u70b9\u4fe1\u606f\u6765\u5b8c\u6210\u914d\u7f6e\u3002\u672c\u6587\u91cd\u70b9\u89e3\u51b3 Android \u73af\u5883\u4e0b\u4e3b\u6d41\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u6d41\u7a0b\u3001\u5173\u952e\u53c2\u6570\u8bbe\u7f6e\u4ee5\u53ca\u8fde\u63a5\u5931\u8d25\u7684\u6392\u67e5\u903b\u8f91\u3002<\/p>\n<h2>\u9009\u62e9\u5408\u9002\u7684\u5ba2\u6237\u7aef\u5e94\u7528<\/h2>\n<p>Android \u751f\u6001\u4e2d\u6709\u591a\u4e2a\u652f\u6301 Xray \u6838\u5fc3\u7684\u5ba2\u6237\u7aef\uff0c\u9009\u62e9\u7684\u6838\u5fc3\u6807\u51c6\u662f\u201c\u662f\u5426\u539f\u751f\u652f\u6301 Xray \u534f\u8bae\u201d\u4ee5\u53ca\u201cUI \u4ea4\u4e92\u662f\u5426\u7b26\u5408\u64cd\u4f5c\u4e60\u60ef\u201d\u3002<\/p>\n<p>\u76ee\u524d\u4e3b\u6d41\u7684\u9009\u62e9\u5305\u62ec <strong>Clash Meta for Android (CMFA)<\/strong>\u3001<strong>Mihomo Party<\/strong>\u3001<strong>NekoBox for Android<\/strong> \u4ee5\u53ca <strong>Hiddify<\/strong> \u7b49\u3002\u8fd9\u4e9b\u5e94\u7528\u5e95\u5c42\u5747\u96c6\u6210\u4e86 Xray \u6216\u517c\u5bb9\u7684\u6838\u5fc3\u3002<\/p>\n<p>* <strong>Clash Meta (CMFA)<\/strong>\uff1a\u9002\u5408\u4e60\u60ef Clash \u89c4\u5219\u96c6\u7684\u7528\u6237\uff0c\u914d\u7f6e\u754c\u9762\u6210\u719f\uff0c\u652f\u6301\u591a\u79cd\u534f\u8bae\u8f6c\u6362\u3002<br \/>* <strong>NekoBox<\/strong>\uff1a\u754c\u9762\u7b80\u6d01\uff0c\u5bf9 V2Ray\/Xray \u539f\u751f\u914d\u7f6e\u652f\u6301\u8f83\u597d\uff0c\u9002\u5408\u65b0\u624b\u3002<br \/>* <strong>Mihomo Party<\/strong>\uff1a\u529f\u80fd\u5f3a\u5927\uff0c\u652f\u6301\u590d\u6742\u7684\u89c4\u5219\u5f15\u64ce\uff0c\u9002\u5408\u9ad8\u7ea7\u7528\u6237\u3002<\/p>\n<p><strong>\u914d\u7f6e\u5efa\u8bae<\/strong>\uff1a<br \/>\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\uff0c\u5efa\u8bae\u4f18\u5148\u9009\u62e9 <strong>Clash Meta for Android<\/strong> \u6216 <strong>NekoBox<\/strong>\u3002\u524d\u8005\u89c4\u5219\u751f\u6001\u5b8c\u5584\uff0c\u540e\u8005\u914d\u7f6e\u903b\u8f91\u76f4\u89c2\u3002\u907f\u514d\u4f7f\u7528\u8fc7\u65f6\u7684\u65e7\u7248\u5ba2\u6237\u7aef\uff0c\u56e0\u4e3a\u65e7\u7248\u672c\u53ef\u80fd\u4e0d\u652f\u6301 Xray \u6700\u65b0\u7684\u534f\u8bae\u7279\u6027\uff08\u5982 XTLS \u6216 newer transport protocols\uff09\u3002<\/p>\n\n<h2>\u51c6\u5907\u914d\u7f6e\u6587\u4ef6\u4e0e\u8ba2\u9605\u6e90<\/h2>\n<p>\u914d\u7f6e Xray \u524d\uff0c\u5fc5\u987b\u62e5\u6709\u6709\u6548\u7684\u8282\u70b9\u8ba2\u9605\u6570\u636e\u3002\u8fd9\u4e9b\u6570\u636e\u901a\u5e38\u4ee5 YAML\u3001JSON \u6216 Base64 \u7f16\u7801\u7684\u6587\u672c\u5f62\u5f0f\u5b58\u5728\u3002<br \/>\u2022 <strong>\u8ba2\u9605\u94fe\u63a5<\/strong>\uff1a\u4ece\u670d\u52a1\u5546\u5904\u83b7\u53d6\u7684 URL\uff0c\u901a\u5e38\u4ee5 ` \u5f00\u5934\uff0c\u5305\u542b\u957f\u4e32\u52a0\u5bc6\u5b57\u7b26\u3002<br \/>\u2022 <strong>\u624b\u52a8\u914d\u7f6e\u6570\u636e<\/strong>\uff1a\u90e8\u5206\u670d\u52a1\u63d0\u4f9b JSON \u683c\u5f0f\u7684\u8282\u70b9\u4fe1\u606f\uff0c\u9700\u624b\u52a8\u590d\u5236\u5230\u5ba2\u6237\u7aef\u3002<\/p>\n<p><strong>\u5173\u952e\u68c0\u67e5\u70b9<\/strong>\uff1a<br \/>* \u786e\u4fdd\u8ba2\u9605\u94fe\u63a5\u6709\u6548\u4e14\u672a\u8fc7\u671f\u3002<br \/>* \u786e\u8ba4\u8ba2\u9605\u5185\u5bb9\u5305\u542b Xray \u652f\u6301\u7684\u534f\u8bae\uff08\u5982 VMess, VLESS, Trojan, Shadowsocks \u7b49\uff09\u3002<br \/>* \u82e5\u4f7f\u7528\u624b\u52a8\u914d\u7f6e\uff0c\u9700\u4ed4\u7ec6\u6838\u5bf9 `server`\uff08\u670d\u52a1\u5668\u5730\u5740\uff09\u3001`port`\uff08\u7aef\u53e3\uff09\u3001`id`\uff08UUID\uff09\u7b49\u5b57\u6bb5\u662f\u5426\u51c6\u786e\u3002<\/p>\n<h2>Android \u5ba2\u6237\u7aef\u5bfc\u5165\u4e0e\u914d\u7f6e\u6d41\u7a0b<\/h2>\n<p>\u4ee5 <strong>Clash Meta for Android (CMFA)<\/strong> \u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u901a\u7528\u7684\u914d\u7f6e\u5bfc\u5165\u6b65\u9aa4\u3002\u5176\u4ed6\u5ba2\u6237\u7aef\u903b\u8f91\u7c7b\u4f3c\uff0c\u901a\u5e38\u4f4d\u4e8e\u201c\u8ba2\u9605\u201d\u6216\u201c\u914d\u7f6e\u201d\u83dc\u5355\u4e2d\u3002<\/p>\n<h3>\u6b65\u9aa4 1\uff1a\u5bfc\u5165\u8ba2\u9605<\/h3>\n<p>\u2022 \u6253\u5f00\u5ba2\u6237\u7aef\uff0c\u8fdb\u5165 <strong>\u201c\u8ba2\u9605\u201d (Subscriptions)<\/strong> \u9875\u9762\u3002<br \/>\u2022 \u70b9\u51fb <strong>\u201c+\u201d<\/strong> \u6216 <strong>\u201c\u6dfb\u52a0\u8ba2\u9605\u201d<\/strong>\u3002<br \/>\u2022 \u9009\u62e9 <strong>\u201cURL\u201d<\/strong> \u7c7b\u578b\uff0c\u7c98\u8d34\u8ba2\u9605\u94fe\u63a5\u3002<br \/>\u2022 \u8bbe\u7f6e\u8ba2\u9605\u540d\u79f0\uff08\u5982\u201c\u5de5\u4f5c\u8282\u70b9\u201d\u3001\u201c\u5907\u7528\u8282\u70b9\u201d\uff09\u3002<br \/>\u2022 \u70b9\u51fb <strong>\u201c\u786e\u5b9a\u201d<\/strong> \u6216 <strong>\u201c\u4e0b\u8f7d\u201d<\/strong>\u3002<\/p>\n<p><strong>\u6ce8\u610f<\/strong>\uff1a<br \/>* \u90e8\u5206\u5ba2\u6237\u7aef\u8981\u6c42\u624b\u52a8\u66f4\u65b0\u8ba2\u9605\u3002\u82e5\u8282\u70b9\u4e0d\u66f4\u65b0\uff0c\u9700\u624b\u52a8\u70b9\u51fb\u201c\u66f4\u65b0\u201d\u6309\u94ae\u3002<br \/>* \u82e5\u5bfc\u5165\u5931\u8d25\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u662f\u5426\u6b63\u5e38\uff0c\u6216\u8ba2\u9605\u94fe\u63a5\u662f\u5426\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u5bfc\u81f4\u89e3\u6790\u9519\u8bef\u3002<\/p>\n<h3>\u6b65\u9aa4 2\uff1a\u9009\u62e9\u8282\u70b9<\/h3>\n<p>\u2022 \u5bfc\u5165\u6210\u529f\u540e\uff0c\u8fd4\u56de <strong>\u201c\u4e3b\u9875\u201d<\/strong> \u6216 <strong>\u201c\u8282\u70b9\u201d<\/strong> \u9875\u9762\u3002<br \/>\u2022 \u5ba2\u6237\u7aef\u4f1a\u81ea\u52a8\u89e3\u6790\u8ba2\u9605\u4e2d\u7684\u8282\u70b9\u5217\u8868\u3002<br \/>\u2022 \u70b9\u51fb <strong>\u201c\u81ea\u52a8\u9009\u62e9\u201d (Auto Select)<\/strong> \u6216 <strong>\u201c\u5ef6\u8fdf\u6d4b\u8bd5\u201d<\/strong>\uff0c\u5ba2\u6237\u7aef\u4f1a\u626b\u63cf\u6240\u6709\u8282\u70b9\u5e76\u63a8\u8350\u5ef6\u8fdf\u6700\u4f4e\u7684\u3002<br \/>\u2022 \u4e5f\u53ef\u624b\u52a8\u9009\u62e9\u7279\u5b9a\u534f\u8bae\u6216\u5730\u533a\u7684\u8282\u70b9\u3002<\/p>\n<p><strong>\u5173\u952e\u8bbe\u7f6e<\/strong>\uff1a<br \/>* \u786e\u4fdd\u9009\u62e9\u7684\u8282\u70b9\u534f\u8bae\u4e0e\u5ba2\u6237\u7aef\u652f\u6301\u7684\u6838\u5fc3\u4e00\u81f4\u3002\u4f8b\u5982\uff0c\u82e5\u4f7f\u7528 Xray \u6838\u5fc3\uff0c\u786e\u4fdd\u8282\u70b9\u7c7b\u578b\u4e3a `vmess` \u6216 `vless`\u3002<br \/>* \u907f\u514d\u9009\u62e9\u6807\u6709\u201c\u4e0d\u53ef\u7528\u201d\u6216\u201c\u8d85\u65f6\u201d\u7684\u8282\u70b9\uff0c\u4ee5\u514d\u914d\u7f6e\u51b2\u7a81\u3002<\/p>\n<h3>\u6b65\u9aa4 3\uff1a\u542f\u52a8\u670d\u52a1<\/h3>\n<p>\u2022 \u5728\u4e3b\u754c\u9762\u70b9\u51fb <strong>\u201c\u542f\u52a8\u201d<\/strong> \u6309\u94ae\u3002<br \/>\u2022 \u7cfb\u7edf\u4f1a\u5f39\u51fa <strong>\u201cVPN \u6743\u9650\u201d<\/strong> \u8bf7\u6c42\uff0c\u70b9\u51fb <strong>\u201c\u5141\u8bb8\u201d<\/strong>\u3002<br \/>\u2022 \u72b6\u6001\u680f\u4f1a\u51fa\u73b0 VPN \u56fe\u6807\uff0c\u8868\u793a\u96a7\u9053\u5df2\u5efa\u7acb\u3002<\/p>\n<p><strong>\u5e38\u89c1\u9519\u8bef<\/strong>\uff1a<br \/>* <strong>\u6743\u9650\u88ab\u62d2<\/strong>\uff1a\u82e5\u6743\u9650\u88ab\u62d2\u7edd\uff0c\u8fdb\u5165\u624b\u673a\u8bbe\u7f6e -> \u5e94\u7528\u7ba1\u7406 -> \u627e\u5230\u5ba2\u6237\u7aef -> \u6743\u9650 -> \u5f00\u542f\u201cVPN \u548c\u540e\u53f0\u6570\u636e\u201d\u6743\u9650\u3002<br \/>* <strong>\u542f\u52a8\u5931\u8d25<\/strong>\uff1a\u901a\u5e38\u56e0\u8ba2\u9605\u6570\u636e\u683c\u5f0f\u9519\u8bef\u6216\u7f3a\u5c11\u5fc5\u8981\u5b57\u6bb5\uff08\u5982 `alterId` \u6216 `security`\uff09\u5bfc\u81f4\u3002\u9700\u68c0\u67e5\u8ba2\u9605\u6e90\u6216\u8054\u7cfb\u63d0\u4f9b\u65b9\u3002<\/p>\n<h2>\u5173\u952e\u53c2\u6570\u914d\u7f6e\u4e0e\u4f18\u5316<\/h2>\n<p>Xray \u7684\u914d\u7f6e\u7075\u6d3b\u6027\u6781\u9ad8\uff0c\u6b63\u786e\u8bbe\u7f6e\u5173\u952e\u53c2\u6570\u53ef\u663e\u8457\u63d0\u5347\u8fde\u63a5\u7a33\u5b9a\u6027\u3002<\/p>\n<h3>1. \u4f20\u8f93\u534f\u8bae (Transport) \u9009\u62e9<\/h3>\n<p>Xray \u652f\u6301\u591a\u79cd\u4f20\u8f93\u5c42\u534f\u8bae\uff0c\u4e0d\u540c\u7f51\u7edc\u73af\u5883\u9002\u7528\u4e0d\u540c\u534f\u8bae\uff1a<\/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;\">\u4f20\u8f93\u534f\u8bae<\/th>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u7279\u70b9<\/th>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u9002\u7528\u573a\u666f<\/th>\n<th style=\"border:1px solid #ddd;padding:10px;background:#f7f7f7;text-align:left;\">\u914d\u7f6e\u5efa\u8bae<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\"><strong>TCP<\/strong><\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u517c\u5bb9\u6027\u597d\uff0c\u6613\u88ab\u68c0\u6d4b<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u57fa\u7840\u7f51\u7edc\u73af\u5883<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9ed8\u8ba4\u9009\u62e9\uff0c\u82e5\u88ab\u5e72\u6270\u53ef\u5c1d\u8bd5\u4f2a\u88c5<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\"><strong>WebSocket (WS)<\/strong><\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u4f2a\u88c5\u4e3a HTTP \u6d41\u91cf\uff0c\u7a7f\u900f\u529b\u5f3a<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u516c\u53f8\/\u5b66\u6821\u7f51\u7edc<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u63a8\u8350\uff0c\u8def\u5f84 (Path) \u9700\u4e0e\u670d\u52a1\u7aef\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\"><strong>HTTP\/2<\/strong><\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u901f\u5ea6\u5feb\uff0c\u5ef6\u8fdf\u4f4e<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9ad8\u5e26\u5bbd\u9700\u6c42<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9700\u670d\u52a1\u7aef\u652f\u6301 HTTP\/2 \u63a8\u9001<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\"><strong>QUIC<\/strong><\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u57fa\u4e8e UDP\uff0c\u6297\u5e72\u6270\u5f3a<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u79fb\u52a8\u7f51\u7edc<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9700\u670d\u52a1\u7aef\u542f\u7528 QUIC \u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\"><strong>gRPC<\/strong><\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u73b0\u4ee3\u534f\u8bae\uff0c\u6027\u80fd\u4f18\u5f02<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9ad8\u7ea7\u7528\u6237<\/td>\n<td style=\"border:1px solid #ddd;padding:10px;vertical-align:top;\">\u9700\u914d\u7f6e Service Name \u548c Mode<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u914d\u7f6e\u903b\u8f91<\/strong>\uff1a<br \/>\u82e5\u4f7f\u7528 WebSocket\uff0c\u9700\u5728\u5ba2\u6237\u7aef\u914d\u7f6e\u4e2d\u586b\u5199\u6b63\u786e\u7684 `Host`\uff08\u57df\u540d\uff09\u548c `Path`\uff08\u8def\u5f84\uff09\u3002\u8fd9\u4e9b\u503c\u5fc5\u987b\u4e0e\u670d\u52a1\u7aef\u914d\u7f6e\u5b8c\u5168\u4e00\u81f4\uff0c\u5426\u5219\u63e1\u624b\u5931\u8d25\u3002<\/p>\n<h3>2. \u5b89\u5168\u6027\u8bbe\u7f6e (Security)<\/h3>\n<p>\u5bf9\u4e8e VMess \u6216 VLESS \u534f\u8bae\uff0c`security` \u5b57\u6bb5\u51b3\u5b9a\u52a0\u5bc6\u65b9\u5f0f\uff1a<\/p>\n<p>* <strong>auto<\/strong>\uff1a\u81ea\u52a8\u9009\u62e9\uff0c\u901a\u5e38\u63a8\u8350\u3002<br \/>* <strong>aes-128-gcm<\/strong>\uff1a\u4f20\u7edf\u52a0\u5bc6\uff0c\u517c\u5bb9\u6027\u597d\u3002<br \/>* <strong>chacha20-poly1305<\/strong>\uff1a\u8f7b\u91cf\u7ea7\u52a0\u5bc6\uff0c\u9002\u5408\u4f4e\u7aef\u8bbe\u5907\u3002<br \/>* <strong>none<\/strong>\uff1a\u65e0\u52a0\u5bc6\uff0c\u4ec5\u7528\u4e8e\u7279\u5b9a\u6d4b\u8bd5\uff0c<strong>\u4e0d\u5efa\u8bae\u751f\u4ea7\u73af\u5883\u4f7f\u7528<\/strong>\u3002<\/p>\n<p><strong>\u5efa\u8bae<\/strong>\uff1a<br \/>\u9664\u975e\u670d\u52a1\u5546\u660e\u786e\u8981\u6c42\uff0c\u5426\u5219\u4fdd\u6301 `security` \u4e3a `auto` \u6216 `aes-128-gcm`\u3002<\/p>\n<h3>3. \u8def\u7531\u89c4\u5219 (Routing)<\/h3>\n<p>Android \u5ba2\u6237\u7aef\u901a\u5e38\u5185\u7f6e\u8def\u7531\u89c4\u5219\uff0c\u4f46\u53ef\u81ea\u5b9a\u4e49\u4ee5\u4f18\u5316\u6027\u80fd\uff1a<\/p>\n<p>* <strong>\u76f4\u8fde (Direct)<\/strong>\uff1a\u56fd\u5185 IP \u76f4\u63a5\u8fde\u63a5\uff0c\u4e0d\u7ecf\u8fc7\u4ee3\u7406\u3002<br \/>* <strong>\u4ee3\u7406 (Proxy)<\/strong>\uff1a\u6240\u6709\u6d41\u91cf\u7ecf\u8fc7\u4ee3\u7406\u3002<br \/>* <strong>\u5206\u6d41 (GeoIP\/GEOCN)<\/strong>\uff1a\u6839\u636e IP \u5730\u7406\u4f4d\u7f6e\u5206\u6d41\u3002<\/p>\n<p><strong>\u914d\u7f6e\u5efa\u8bae<\/strong>\uff1a<br \/>* \u542f\u7528 <strong>GeoIP \u76f4\u8fde<\/strong>\uff0c\u907f\u514d\u56fd\u5185\u6d41\u91cf\u8d70\u4ee3\u7406\u5bfc\u81f4\u5ef6\u8fdf\u589e\u52a0\u3002<br \/>* \u82e5\u4f7f\u7528 Clash Meta\uff0c\u53ef\u52a0\u8f7d\u81ea\u5b9a\u4e49\u89c4\u5219\u96c6\uff08Rule Set\uff09\uff0c\u5b9e\u73b0\u66f4\u7cbe\u7ec6\u7684\u5206\u6d41\u3002<\/p>\n<h2>\u8fde\u63a5\u5931\u8d25\u6392\u67e5\u4e0e\u9a8c\u8bc1<\/h2>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\u82e5\u65e0\u6cd5\u4e0a\u7f51\uff0c\u6309\u4ee5\u4e0b\u987a\u5e8f\u6392\u67e5\uff1a<\/p>\n<h3>1. \u68c0\u67e5\u8ba2\u9605\u72b6\u6001<\/h3>\n<p>* <strong>\u73b0\u8c61<\/strong>\uff1a\u8282\u70b9\u5217\u8868\u4e3a\u7a7a\u6216\u663e\u793a\u201c\u8fc7\u671f\u201d\u3002<br \/>* <strong>\u89e3\u51b3<\/strong>\uff1a\u624b\u52a8\u66f4\u65b0\u8ba2\u9605\uff0c\u786e\u8ba4\u94fe\u63a5\u6709\u6548\u3002\u82e5\u4ecd\u65e0\u6548\uff0c\u8054\u7cfb\u670d\u52a1\u5546\u786e\u8ba4\u8282\u70b9\u72b6\u6001\u3002<\/p>\n<h3>2. \u68c0\u67e5\u4f20\u8f93\u5c42\u914d\u7f6e<\/h3>\n<p>* <strong>\u73b0\u8c61<\/strong>\uff1a\u8fde\u63a5\u663e\u793a\u201c\u5df2\u8fde\u63a5\u201d\u4f46\u65e0\u6cd5\u8bbf\u95ee\u5916\u7f51\u3002<br \/>* <strong>\u53ef\u80fd\u539f\u56e0<\/strong>\uff1a<br \/> * WebSocket \u7684 `Host` \u6216 `Path` \u9519\u8bef\u3002<br \/> * TLS \u8bc1\u4e66\u9a8c\u8bc1\u5931\u8d25\uff08\u9700\u5173\u95ed `Insecure` \u6216\u66f4\u65b0 CA \u8bc1\u4e66\uff09\u3002<br \/> * \u7aef\u53e3\u88ab\u9632\u706b\u5899\u62e6\u622a\u3002<br \/>* <strong>\u89e3\u51b3<\/strong>\uff1a<br \/> * \u6838\u5bf9\u670d\u52a1\u7aef\u63d0\u4f9b\u7684 `host` \u548c `path`\u3002<br \/> * \u82e5\u670d\u52a1\u7aef\u4f7f\u7528\u81ea\u7b7e\u540d\u8bc1\u4e66\uff0c\u5728\u5ba2\u6237\u7aef\u8bbe\u7f6e\u4e2d\u5f00\u542f <strong>\u201c\u5ffd\u7565\u8bc1\u4e66\u9a8c\u8bc1\u201d (Insecure)<\/strong>\uff08\u6ce8\u610f\u5b89\u5168\u98ce\u9669\uff09\u3002<br \/> * \u5c1d\u8bd5\u5207\u6362\u4f20\u8f93\u534f\u8bae\uff08\u5982\u4ece TCP \u6539\u4e3a WS\uff09\u3002<\/p>\n<h3>3. \u68c0\u67e5 DNS \u8bbe\u7f6e<\/h3>\n<p>* <strong>\u73b0\u8c61<\/strong>\uff1a\u80fd Ping \u901a IP \u4f46\u65e0\u6cd5\u6253\u5f00\u7f51\u9875\u3002<br \/>* <strong>\u539f\u56e0<\/strong>\uff1aDNS \u89e3\u6790\u5931\u8d25\u6216\u6c61\u67d3\u3002<br \/>* <strong>\u89e3\u51b3<\/strong>\uff1a<br \/> * \u5728\u5ba2\u6237\u7aef DNS \u8bbe\u7f6e\u4e2d\uff0c\u4f7f\u7528\u516c\u5171 DNS\uff08\u5982 `8.8.8.8`, `1.1.1.1`, `223.5.5.5`\uff09\u3002<br \/> * \u542f\u7528 <strong>\u201cFakeDNS\u201d<\/strong>\uff08\u82e5\u5ba2\u6237\u7aef\u652f\u6301\uff09\u4ee5\u52a0\u901f\u89e3\u6790\u3002<\/p>\n<h3>4. \u68c0\u67e5 Android \u7cfb\u7edf\u6743\u9650<\/h3>\n<p>* <strong>\u73b0\u8c61<\/strong>\uff1a\u5ba2\u6237\u7aef\u663e\u793a\u8fde\u63a5\u4f46\u65e0\u6d41\u91cf\u3002<br \/>* <strong>\u539f\u56e0<\/strong>\uff1a\u7cfb\u7edf\u9650\u5236\u540e\u53f0\u6570\u636e\u6216\u7535\u6c60\u4f18\u5316\u3002<br \/>* <strong>\u89e3\u51b3<\/strong>\uff1a<br \/> * \u8fdb\u5165\u624b\u673a\u8bbe\u7f6e -> \u7535\u6c60 -> \u5e94\u7528\u542f\u52a8\u7ba1\u7406\uff0c\u5141\u8bb8\u5ba2\u6237\u7aef\u81ea\u542f\u52a8\u548c\u540e\u53f0\u6d3b\u52a8\u3002<br \/> * \u5173\u95ed <strong>\u201c\u7701\u7535\u6a21\u5f0f\u201d<\/strong>\u3002<br \/> * \u786e\u4fdd\u5ba2\u6237\u7aef\u62e5\u6709 <strong>\u201c\u540e\u53f0\u6570\u636e\u201d<\/strong> \u6743\u9650\u3002<\/p>\n<h2>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h2>\n<h3>Q1: Android \u5ba2\u6237\u7aef\u66f4\u65b0\u540e\u914d\u7f6e\u4e22\u5931\u600e\u4e48\u529e\uff1f<\/h3>\n<p><strong>\u539f\u56e0<\/strong>\uff1a\u90e8\u5206\u5ba2\u6237\u7aef\u5728\u66f4\u65b0\u6216\u5378\u8f7d\u91cd\u88c5\u65f6\u4f1a\u6e05\u9664\u672c\u5730\u6570\u636e\u3002<br \/><strong>\u89e3\u51b3<\/strong>\uff1a<br \/>* \u5b9a\u671f\u5907\u4efd\u8ba2\u9605\u914d\u7f6e\uff08\u5bfc\u51fa\u4e3a\u6587\u4ef6\uff09\u3002<br \/>* \u4f7f\u7528\u4e91\u7aef\u540c\u6b65\u529f\u80fd\uff08\u82e5\u5ba2\u6237\u7aef\u652f\u6301\uff09\u3002<br \/>* \u91cd\u65b0\u5bfc\u5165\u8ba2\u9605\u94fe\u63a5\uff0c\u8282\u70b9\u5217\u8868\u901a\u5e38\u4f1a\u81ea\u52a8\u6062\u590d\u3002<\/p>\n<h3>Q2: \u4e3a\u4ec0\u4e48\u4f7f\u7528 Xray \u540e\u901f\u5ea6\u53d8\u6162\uff1f<\/h3>\n<p><strong>\u539f\u56e0<\/strong>\uff1a<br \/>* \u8282\u70b9\u8ddd\u79bb\u8fc7\u8fdc\u3002<br \/>* \u4f20\u8f93\u534f\u8bae\u9009\u62e9\u4e0d\u5f53\uff08\u5982 TCP \u5728\u7279\u5b9a\u7f51\u7edc\u4e0b\u6548\u7387\u4f4e\uff09\u3002<br \/>* \u670d\u52a1\u5668\u8d1f\u8f7d\u8fc7\u9ad8\u3002<br \/>* \u672c\u5730 DNS \u89e3\u6790\u6162\u3002<br \/><strong>\u89e3\u51b3<\/strong>\uff1a<br \/>* \u9009\u62e9\u5ef6\u8fdf\u8f83\u4f4e\u7684\u8282\u70b9\uff08\u4f7f\u7528\u201c\u5ef6\u8fdf\u6d4b\u8bd5\u201d\u529f\u80fd\uff09\u3002<br \/>* \u5c1d\u8bd5\u5207\u6362\u4f20\u8f93\u534f\u8bae\uff08\u5982\u6539\u4e3a WebSocket + TLS\uff09\u3002<br \/>* \u68c0\u67e5\u672c\u5730\u7f51\u7edc\u73af\u5883\uff0c\u5207\u6362 Wi-Fi\/\u79fb\u52a8\u6570\u636e\u6d4b\u8bd5\u3002<\/p>\n<h3>Q3: \u5982\u4f55\u5224\u65ad Xray \u914d\u7f6e\u662f\u5426\u6210\u529f\uff1f<\/h3>\n<p><strong>\u9a8c\u8bc1\u65b9\u6cd5<\/strong>\uff1a<br \/>\u2022 \u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee `\uff0c\u67e5\u770b `colo` \u5b57\u6bb5\u662f\u5426\u663e\u793a\u56fd\u5916\u8282\u70b9\u57ce\u5e02\u3002<br \/>\u2022 \u8bbf\u95ee `\uff0c\u67e5\u770b IP \u5730\u5740\u662f\u5426\u4e3a\u4ee3\u7406\u670d\u52a1\u5668 IP\u3002<br \/>\u2022 \u5728\u5ba2\u6237\u7aef\u754c\u9762\u67e5\u770b\u5b9e\u65f6\u6d41\u91cf\u7edf\u8ba1\uff0c\u82e5\u6709\u4e0a\u884c\/\u4e0b\u884c\u6d41\u91cf\uff0c\u5219\u914d\u7f6e\u751f\u6548\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u5728 Android \u4e0a\u914d\u7f6e Xray \u5de5\u5177\u7684\u6838\u5fc3\u5728\u4e8e\uff1a<strong>\u9009\u62e9\u517c\u5bb9\u7684\u5ba2\u6237\u7aef -> \u6b63\u786e\u5bfc\u5165\u8ba2\u9605 -> \u914d\u7f6e\u4f20\u8f93\u5c42\u7ec6\u8282 -> \u9a8c\u8bc1\u8fde\u63a5<\/strong>\u3002<\/p>\n<p>* <strong>\u5ba2\u6237\u7aef\u9009\u62e9<\/strong>\uff1a\u63a8\u8350 Clash Meta for Android \u6216 NekoBox\uff0c\u786e\u4fdd\u652f\u6301 Xray \u6838\u5fc3\u3002<br \/>* <strong>\u914d\u7f6e\u91cd\u70b9<\/strong>\uff1a\u4ed4\u7ec6\u6838\u5bf9 WebSocket \u7684 Host\/Path\uff0c\u9009\u62e9\u9002\u5408\u7684\u4f20\u8f93\u534f\u8bae\u3002<br \/>* <strong>\u6545\u969c\u6392\u67e5<\/strong>\uff1a\u4ece\u8ba2\u9605\u72b6\u6001\u3001\u4f20\u8f93\u914d\u7f6e\u3001DNS \u8bbe\u7f6e\u3001\u7cfb\u7edf\u6743\u9650\u56db\u4e2a\u7ef4\u5ea6\u9010\u6b65\u6392\u67e5\u3002<\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u5b9a\u671f\u66f4\u65b0\u8ba2\u9605\u548c\u5ba2\u6237\u7aef\u7248\u672c\uff0c\u4ee5\u83b7\u53d6\u6700\u65b0\u7684\u5b89\u5168\u8865\u4e01\u548c\u534f\u8bae\u652f\u6301\u3002\u907f\u514d\u4f7f\u7528\u6765\u6e90\u4e0d\u660e\u7684\u514d\u8d39\u914d\u7f6e\uff0c\u4ee5\u964d\u4f4e\u5b89\u5168\u98ce\u9669\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Android \u5e73\u53f0\u4e0a\u4f7f\u7528 Xray \u6838\u5fc3\u901a\u5e38\u4f9d\u8d56\u7b2c\u4e09\u65b9\u5ba2\u6237\u7aef\u6765\u5b9e\u73b0\u56fe\u5f62\u5316\u914d\u7f6e\u3002\u7531\u4e8e Xray \u672c\u8eab\u662f\u4e00\u4e2a [&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-1411","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/posts\/1411","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=1411"}],"version-history":[{"count":0,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/posts\/1411\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/media?parent=1411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/categories?post=1411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suannai.link\/blog\/wp-json\/wp\/v2\/tags?post=1411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}