{"id":53984,"date":"2025-02-18T09:48:16","date_gmt":"2025-02-18T01:48:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/53984\/"},"modified":"2025-02-18T09:48:16","modified_gmt":"2025-02-18T01:48:16","slug":"%e8%af%a6%e8%a7%a3v2rayng%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e8%ae%be%e7%bd%ae%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/53984\/","title":{"rendered":"\u8be6\u89e3v2rayng\u914d\u7f6e\u6587\u4ef6\u8bbe\u7f6e\u4e0e\u4f7f\u7528"},"content":{"rendered":"<p>v2rayng\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u79d1\u5b66\u4e0a\u7f51\u548c\u9690\u79c1\u4fdd\u62a4\u3002\u5176\u914d\u7f6e\u6587\u4ef6\u662f\u7528\u6237\u8bbe\u7f6e\u5176\u5de5\u4f5c\u53c2\u6570\u7684\u5173\u952e\u90e8\u5206\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u8bb2\u89e3v2rayng\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u7ed3\u6784\u3001\u53c2\u6570\u8bf4\u660e\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u3002<\/p>\n<h2>\u4ec0\u4e48\u662fv2rayng\u914d\u7f6e\u6587\u4ef6<\/h2>\n<p><em>v2rayng\u914d\u7f6e\u6587\u4ef6<\/em>\u662f\u7528\u4e8e\u914d\u7f6ev2rayng\u5e94\u7528\u7684JSON\u683c\u5f0f\u6587\u4ef6\u3002\u901a\u8fc7\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4ee3\u7406\u8bbe\u7f6e\u3001\u8def\u7531\u3001\u7528\u6237\u4fe1\u606f\u7b49\uff0c\u4ece\u800c\u5b9e\u73b0\u4e2a\u6027\u5316\u7684\u7f51\u7edc\u4ee3\u7406\u670d\u52a1\u3002<\/p>\n<h2>v2rayng\u914d\u7f6e\u6587\u4ef6\u7684\u57fa\u672c\u7ed3\u6784<\/h2>\n<p>v2rayng\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a<\/p>\n<ul>\n<li><strong>inbounds<\/strong>\uff1a\u8bbe\u7f6e\u8f93\u5165\u7684\u4ee3\u7406\u65b9\u5f0f\u3002<\/li>\n<li><strong>outbounds<\/strong>\uff1a\u8bbe\u7f6e\u8f93\u51fa\u7684\u4ee3\u7406\u76ee\u6807\u3002<\/li>\n<li><strong>routing<\/strong>\uff1a\u5b9a\u4e49\u8def\u7531\u89c4\u5219\u3002<\/li>\n<li><strong>settings<\/strong>\uff1a\u5176\u4ed6\u8bbe\u7f6e\u9009\u9879\u3002<\/li>\n<\/ul>\n<h3>1. inbounds<\/h3>\n<p><code>inbounds<\/code>\u90e8\u5206\u5b9a\u4e49\u4e86\u5ba2\u6237\u7aef\u5982\u4f55\u63a5\u6536\u8bf7\u6c42\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e\uff1a<br \/> \u201cinbounds\u201d: [<br \/> {<br \/> \u201cport\u201d: 1080,<br \/> \u201cprotocol\u201d: \u201csocks\u201d,<br \/> \u201csettings\u201d: {<br \/> \u201cauth\u201d: \u201cnoauth\u201d,<br \/> \u201cudp\u201d: true<br \/> }<br \/> }<br \/> ]<\/p>\n<p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0cv2rayng\u76d1\u542c1080\u7aef\u53e3\uff0c\u901a\u8fc7Socks5\u534f\u8bae\u63a5\u6536\u8bf7\u6c42\u3002<\/p>\n<h3>2. outbounds<\/h3>\n<p><code>outbounds<\/code>\u90e8\u5206\u5b9a\u4e49\u4e86\u6d41\u91cf\u8f6c\u53d1\u5230\u54ea\u91cc\u3002\u793a\u4f8b\u914d\u7f6e\u5982\u4e0b\uff1a<br \/> \u201coutbounds\u201d: [<br \/> {<br \/> \u201cprotocol\u201d: \u201cvmess\u201d,<br \/> \u201csettings\u201d: {<br \/> \u201cvnext\u201d: [<br \/> {<br \/> \u201caddress\u201d: \u201cserver.example.com\u201d,<br \/> \u201cport\u201d: 443,<br \/> \u201cusers\u201d: [<br \/> {<br \/> \u201cid\u201d: \u201cuuid\u201d,<br \/> \u201calterId\u201d: 64<br \/> }<br \/> ]<br \/> }<br \/> ]<br \/> }<br \/> }<br \/> ]<\/p>\n<p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6d41\u91cf\u5c06\u901a\u8fc7VMess\u534f\u8bae\u8f6c\u53d1\u5230\u6307\u5b9a\u7684\u670d\u52a1\u5668\u3002<\/p>\n<h3>3. routing<\/h3>\n<p><code>routing<\/code>\u90e8\u5206\u7528\u4e8e\u5b9a\u4e49\u6d41\u91cf\u8def\u7531\u89c4\u5219\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<br \/> \u201crouting\u201d: {<br \/> \u201crules\u201d: [<br \/> {<br \/> \u201ctype\u201d: \u201cfield\u201d,<br \/> \u201cip\u201d: [\u201cgeoip:cn\u201d],<br \/> \u201coutbound\u201d: \u201cblocked\u201d<br \/> }<br \/> ]<br \/> }<\/p>\n<p>\u8fd9\u4e2a\u793a\u4f8b\u914d\u7f6e\u4f1a\u963b\u6b62\u5230\u4e2d\u56fd\u7684\u6d41\u91cf\u3002<\/p>\n<h3>4. settings<\/h3>\n<p><code>settings<\/code>\u90e8\u5206\u7528\u4e8e\u5b9a\u4e49\u5176\u4ed6\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u5982DNS\u3001mux\u7b49\u3002\u4f8b\u5982\uff1a<br \/> \u201csettings\u201d: {<br \/> \u201cdns\u201d: {<br \/> \u201cservers\u201d: [\u201c8.8.8.8\u201d, \u201c8.8.4.4\u201d]<br \/> },<br \/> \u201cmux\u201d: {<br \/> \u201cenabled\u201d: true,<br \/> \u201cconcurrency\u201d: 8<br \/> }<br \/> }<\/p>\n<p>\u8fd9\u91cc\u914d\u7f6e\u4e86\u4f7f\u7528Google\u7684DNS\u670d\u52a1\u5668\uff0c\u5e76\u5f00\u542f\u4e86\u591a\u8def\u590d\u7528\u529f\u80fd\u3002<\/p>\n<h2>\u5982\u4f55\u521b\u5efa\u548c\u7f16\u8f91v2rayng\u914d\u7f6e\u6587\u4ef6<\/h2>\n<h3>\u6b65\u9aa41\uff1a\u521b\u5efa\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\uff08\u5982Notepad++\u6216VS Code\uff09\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u672c\u6587\u4ef6\uff0c\u5e76\u547d\u540d\u4e3a<code>config.json<\/code>\u3002<\/p>\n<h3>\u6b65\u9aa42\uff1a\u7f16\u5199\u914d\u7f6e\u5185\u5bb9<\/h3>\n<p>\u6839\u636e\u9700\u8981\uff0c\u586b\u5165\u4e0a\u8ff0\u5404\u90e8\u5206\u7684\u914d\u7f6e\u3002\u786e\u4fddJSON\u683c\u5f0f\u6b63\u786e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5728\u7ebf\u7684JSON\u6821\u9a8c\u5de5\u5177\u8fdb\u884c\u68c0\u67e5\u3002<\/p>\n<h3>\u6b65\u9aa43\uff1a\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u5728v2rayng\u5e94\u7528\u4e2d\uff0c\u901a\u8fc7\u8bbe\u7f6e\u83dc\u5355\u627e\u5230\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6\u7684\u9009\u9879\uff0c\u9009\u62e9\u521a\u624d\u521b\u5efa\u7684<code>config.json<\/code>\u6587\u4ef6\u8fdb\u884c\u5bfc\u5165\u3002<\/p>\n<h2>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h2>\n<h3>Q1\uff1a\u5982\u4f55\u786e\u8ba4\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u6548\uff1f<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528\u5728\u7ebf\u7684JSON\u6821\u9a8c\u5de5\u5177\u6765\u9a8c\u8bc1\u914d\u7f6e\u6587\u4ef6\u7684\u683c\u5f0f\u662f\u5426\u6b63\u786e\u3002\u5982\u679c\u683c\u5f0f\u65e0\u8bef\uff0c\u4f46\u8fde\u63a5\u4ecd\u7136\u5931\u8d25\uff0c\u53ef\u4ee5\u67e5\u770bv2rayng\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u5bfb\u627e\u5177\u4f53\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<h3>Q2\uff1a\u5982\u4f55\u89e3\u51b3\u8fde\u63a5\u5931\u8d25\u7684\u95ee\u9898\uff1f<\/h3>\n<p>\u8fde\u63a5\u5931\u8d25\u53ef\u80fd\u7531\u591a\u79cd\u56e0\u7d20\u9020\u6210\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a<\/p>\n<ul>\n<li>\u670d\u52a1\u5668\u5730\u5740\u6216\u7aef\u53e3\u9519\u8bef<\/li>\n<li>UUID\u6216alterId\u4e0d\u5339\u914d<\/li>\n<li>\u7f51\u7edc\u73af\u5883\u9650\u5236\uff08\u5982\u9632\u706b\u5899\uff09<br \/> \u89e3\u51b3\u65b9\u6848\uff1a<\/li>\n<li>\u786e\u8ba4\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u53c2\u6570<\/li>\n<li>\u5c1d\u8bd5\u66f4\u6362\u670d\u52a1\u5668<\/li>\n<li>\u68c0\u67e5\u7f51\u7edc\u73af\u5883<\/li>\n<\/ul>\n<h3>Q3\uff1a\u5982\u4f55\u5907\u4efd\u548c\u6062\u590d\u914d\u7f6e\u6587\u4ef6\uff1f<\/h3>\n<p>\u5728v2rayng\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u5c06\u5f53\u524d\u7684\u914d\u7f6e\u5bfc\u51fa\u4e3aJSON\u6587\u4ef6\u8fdb\u884c\u5907\u4efd\u3002\u6062\u590d\u65f6\uff0c\u53ea\u9700\u5bfc\u5165\u5907\u4efd\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n<h3>Q4\uff1av2rayng\u7684\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u652f\u6301\u81ea\u52a8\u66f4\u65b0\uff1f<\/h3>\n<p>\u76ee\u524dv2rayng\u4e0d\u652f\u6301\u914d\u7f6e\u6587\u4ef6\u7684\u81ea\u52a8\u66f4\u65b0\uff0c\u7528\u6237\u9700\u8981\u624b\u52a8\u66f4\u65b0\u914d\u7f6e\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p>v2rayng\u914d\u7f6e\u6587\u4ef6\u662f\u4f7f\u7528v2rayng\u7684\u57fa\u7840\uff0c\u5408\u7406\u7684\u914d\u7f6e\u53ef\u4ee5\u63d0\u9ad8\u7f51\u7edc\u8bbf\u95ee\u7684\u6548\u7387\u548c\u5b89\u5168\u6027\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u7bc7\u6587\u7ae0\u7684\u8be6\u7ec6\u89e3\u8bfb\uff0c\u80fd\u591f\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u548c\u4f7f\u7528v2rayng\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>v2rayng\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u79d1\u5b66\u4e0a\u7f51\u548c\u9690\u79c1\u4fdd\u62a4\u3002\u5176\u914d\u7f6e\u6587\u4ef6\u662f\u7528\u6237\u8bbe\u7f6e\u5176\u5de5\u4f5c\u53c2\u6570\u7684\u5173\u952e\u90e8\u5206\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u8bb2\u89e3v2rayng\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u7ed3\u6784\u3001\u53c2\u6570\u8bf4\u660e\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u3002 \u4ec0\u4e48\u662fv2rayng\u914d\u7f6e\u6587\u4ef6 v2rayng\u914d\u7f6e\u6587\u4ef6\u662f\u7528\u4e8e\u914d\u7f6ev2rayng\u5e94\u7528\u7684JSON\u683c\u5f0f\u6587\u4ef6\u3002\u901a\u8fc7\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4ee3\u7406\u8bbe\u7f6e\u3001\u8def\u7531\u3001\u7528\u6237\u4fe1\u606f\u7b49\uff0c\u4ece\u800c\u5b9e\u73b0\u4e2a\u6027\u5316\u7684\u7f51\u7edc\u4ee3\u7406\u670d\u52a1\u3002 v2rayng\u914d\u7f6e\u6587\u4ef6\u7684\u57fa\u672c\u7ed3\u6784 v2rayng\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a inbounds\uff1a\u8bbe\u7f6e\u8f93\u5165\u7684\u4ee3\u7406\u65b9\u5f0f\u3002 outbounds\uff1a\u8bbe\u7f6e\u8f93\u51fa\u7684\u4ee3\u7406\u76ee\u6807\u3002 routing\uff1a\u5b9a\u4e49\u8def\u7531\u89c4\u5219\u3002 settings\uff1a\u5176\u4ed6\u8bbe\u7f6e\u9009\u9879\u3002 1. inbounds inbounds\u90e8\u5206\u5b9a\u4e49\u4e86\u5ba2\u6237\u7aef\u5982\u4f55\u63a5\u6536\u8bf7\u6c42\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e\uff1a \u201cinbounds\u201d: [ { \u201cport\u201d: 1080, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true } } ] \u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0cv2rayng\u76d1\u542c1080\u7aef\u53e3\uff0c\u901a\u8fc7Socks5\u534f\u8bae\u63a5\u6536\u8bf7\u6c42\u3002 2. outbounds outbounds\u90e8\u5206\u5b9a\u4e49\u4e86\u6d41\u91cf\u8f6c\u53d1\u5230\u54ea\u91cc\u3002\u793a\u4f8b\u914d\u7f6e\u5982\u4e0b\uff1a \u201coutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\u201d: [ { \u201caddress\u201d: \u201cserver.example.com\u201d, \u201cport\u201d: 443, \u201cusers\u201d: [ { \u201cid\u201d: \u201cuuid\u201d, \u201calterId\u201d: 64 } ] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-53984","post","type-post","status-publish","format-standard","hentry","category-vpn"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=53984"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53984\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=53984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=53984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=53984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}