{"id":58435,"date":"2025-03-08T14:54:51","date_gmt":"2025-03-08T06:54:51","guid":{"rendered":"https:\/\/fwq.ai\/blog\/58435\/"},"modified":"2025-03-08T14:54:51","modified_gmt":"2025-03-08T06:54:51","slug":"%e5%85%a8%e9%9d%a2%e8%a7%a3%e6%9e%90v2ray-config-json%e8%ae%be%e7%bd%ae-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/58435\/","title":{"rendered":"\u5168\u9762\u89e3\u6790v2ray config.json\u8bbe\u7f6e"},"content":{"rendered":"<h2>\u5f15\u8a00<\/h2>\n<p>\u5728\u73b0\u4ee3\u7f51\u7edc\u73af\u5883\u4e2d\uff0c<em>v2ray<\/em>\u4f5c\u4e3a\u4e00\u79cd\u5f3a\u5927\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u8d8a\u6765\u8d8a\u53d7\u5230\u7528\u6237\u7684\u9752\u7750\u3002\u5176\u7075\u6d3b\u7684\u914d\u7f6e\u548c\u5f3a\u5927\u7684\u529f\u80fd\u4f7f\u5f97\u5b83\u5728\u3001\u9690\u79c1\u4fdd\u62a4\u7b49\u65b9\u9762\u8868\u73b0\u51fa\u8272\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8v2ray\u7684<code>config.json<\/code>\u6587\u4ef6\u7684\u8bbe\u7f6e\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u548c\u4f7f\u7528\u8fd9\u4e00\u5de5\u5177\u3002<\/p>\n<h2>\u4ec0\u4e48\u662fv2ray\uff1f<\/h2>\n<p><em>v2ray<\/em>\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u65e8\u5728\u5e2e\u52a9\u7528\u6237\u7a81\u7834\u7f51\u7edc\u9650\u5236\uff0c\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u3002\u5b83\u652f\u6301\u591a\u79cd\u534f\u8bae\u548c\u4f20\u8f93\u65b9\u5f0f\uff0c\u80fd\u591f\u6709\u6548\u5730\u9690\u85cf\u7528\u6237\u7684\u771f\u5b9eIP\u5730\u5740\u3002<\/p>\n<h2>config.json\u6587\u4ef6\u6982\u8ff0<\/h2>\n<p><code>config.json<\/code>\u662fv2ray\u7684\u6838\u5fc3\u914d\u7f6e\u6587\u4ef6\uff0c\u6240\u6709\u7684\u8bbe\u7f6e\u548c\u53c2\u6570\u90fd\u5728\u6b64\u6587\u4ef6\u4e2d\u5b9a\u4e49\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u6b64\u6587\u4ef6\u6765\u8c03\u6574v2ray\u7684\u884c\u4e3a\u548c\u529f\u80fd\u3002<\/p>\n<h2>config.json\u7684\u57fa\u672c\u7ed3\u6784<\/h2>\n<p><code>config.json<\/code>\u6587\u4ef6\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a<\/p>\n<ul>\n<li><strong>inbounds<\/strong>: \u5b9a\u4e49\u5165\u7ad9\u8fde\u63a5\u7684\u914d\u7f6e\u3002<\/li>\n<li><strong>outbounds<\/strong>: \u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5\u7684\u914d\u7f6e\u3002<\/li>\n<li><strong>routing<\/strong>: \u5b9a\u4e49\u8def\u7531\u89c4\u5219\u3002<\/li>\n<li><strong>settings<\/strong>: \u5176\u4ed6\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<h2>inbounds\u8bbe\u7f6e<\/h2>\n<h3>1. \u5b9a\u4e49\u5165\u7ad9\u8fde\u63a5<\/h3>\n<p>\u5728<code>inbounds<\/code>\u90e8\u5206\uff0c\u7528\u6237\u53ef\u4ee5\u5b9a\u4e49\u4e0d\u540c\u7684\u5165\u7ad9\u8fde\u63a5\u65b9\u5f0f\uff0c\u4f8b\u5982\uff1a\u201dinbounds\u201d: [ { \u201cport\u201d: 1080, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true } } ]<\/p>\n<ul>\n<li><strong>port<\/strong>: \u6307\u5b9a\u76d1\u542c\u7684\u7aef\u53e3\u3002<\/li>\n<li><strong>protocol<\/strong>: \u5b9a\u4e49\u4f7f\u7528\u7684\u534f\u8bae\uff0c\u5982<code>socks<\/code>\u6216<code>http<\/code>\u3002<\/li>\n<li><strong>settings<\/strong>: \u5176\u4ed6\u8bbe\u7f6e\uff0c\u5982\u8ba4\u8bc1\u65b9\u5f0f\u548cUDP\u652f\u6301\u3002<\/li>\n<\/ul>\n<h2>outbounds\u8bbe\u7f6e<\/h2>\n<h3>2. \u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5<\/h3>\n<p>\u5728<code>outbounds<\/code>\u90e8\u5206\uff0c\u7528\u6237\u53ef\u4ee5\u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5\u7684\u65b9\u5f0f\uff1a\u201doutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\u201d: [ { \u201caddress\u201d: \u201cexample.com\u201d, \u201cport\u201d: 10086, \u201cusers\u201d: [ { \u201cid\u201d: \u201cuuid\u201d, \u201calterId\u201d: 64 } ] } ] } } ]<\/p>\n<ul>\n<li><strong>protocol<\/strong>: \u5b9a\u4e49\u51fa\u7ad9\u4f7f\u7528\u7684\u534f\u8bae\u3002<\/li>\n<li><strong>vnext<\/strong>: \u5305\u542b\u670d\u52a1\u5668\u5730\u5740\u3001\u7aef\u53e3\u548c\u7528\u6237\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<h2>routing\u8bbe\u7f6e<\/h2>\n<h3>3. \u5b9a\u4e49\u8def\u7531\u89c4\u5219<\/h3>\n<p>\u8def\u7531\u89c4\u5219\u7528\u4e8e\u63a7\u5236\u6d41\u91cf\u7684\u8d70\u5411\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u914d\u7f6e\uff1a\u201drouting\u201d: { \u201crules\u201d: [ { \u201ctype\u201d: \u201cfield\u201d, \u201coutboundTag\u201d: \u201cblocked\u201d, \u201cip\u201d: [\u201cgeoip:cn\u201d] } ]}<\/p>\n<ul>\n<li><strong>type<\/strong>: \u5b9a\u4e49\u89c4\u5219\u7c7b\u578b\u3002<\/li>\n<li><strong>outboundTag<\/strong>: \u6307\u5b9a\u5339\u914d\u5230\u8be5\u89c4\u5219\u540e\u7684\u51fa\u7ad9\u8fde\u63a5\u3002<\/li>\n<li><strong>ip<\/strong>: \u53ef\u4ee5\u4f7f\u7528\u5730\u7406IP\u5e93\u8fdb\u884c\u5339\u914d\u3002<\/li>\n<\/ul>\n<h2>\u5e38\u89c1\u914d\u7f6e\u793a\u4f8b<\/h2>\n<h3>4. \u5b8c\u6574\u7684config.json\u793a\u4f8b<\/h3>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684<code>config.json<\/code>\u793a\u4f8b\uff1a<\/p>\n<p>{ \u201cinbounds\u201d: [ { \u201cport\u201d: 1080, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true } } ], \u201coutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\u201d: [ { \u201caddress\u201d: \u201cexample.com\u201d, \u201cport\u201d: 10086, \u201cusers\u201d: [ { \u201cid\u201d: \u201cuuid\u201d, \u201calterId\u201d: 64 }<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00 \u5728\u73b0\u4ee3\u7f51\u7edc\u73af\u5883\u4e2d\uff0cv2ray\u4f5c\u4e3a\u4e00\u79cd\u5f3a\u5927\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u8d8a\u6765\u8d8a\u53d7\u5230\u7528\u6237\u7684\u9752\u7750\u3002\u5176\u7075\u6d3b\u7684\u914d\u7f6e\u548c\u5f3a\u5927\u7684\u529f\u80fd\u4f7f\u5f97\u5b83\u5728\u3001\u9690\u79c1\u4fdd\u62a4\u7b49\u65b9\u9762\u8868\u73b0\u51fa\u8272\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8v2ray\u7684config.json\u6587\u4ef6\u7684\u8bbe\u7f6e\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u548c\u4f7f\u7528\u8fd9\u4e00\u5de5\u5177\u3002 \u4ec0\u4e48\u662fv2ray\uff1f v2ray\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7f51\u7edc\u4ee3\u7406\u5de5\u5177\uff0c\u65e8\u5728\u5e2e\u52a9\u7528\u6237\u7a81\u7834\u7f51\u7edc\u9650\u5236\uff0c\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u3002\u5b83\u652f\u6301\u591a\u79cd\u534f\u8bae\u548c\u4f20\u8f93\u65b9\u5f0f\uff0c\u80fd\u591f\u6709\u6548\u5730\u9690\u85cf\u7528\u6237\u7684\u771f\u5b9eIP\u5730\u5740\u3002 config.json\u6587\u4ef6\u6982\u8ff0 config.json\u662fv2ray\u7684\u6838\u5fc3\u914d\u7f6e\u6587\u4ef6\uff0c\u6240\u6709\u7684\u8bbe\u7f6e\u548c\u53c2\u6570\u90fd\u5728\u6b64\u6587\u4ef6\u4e2d\u5b9a\u4e49\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u6b64\u6587\u4ef6\u6765\u8c03\u6574v2ray\u7684\u884c\u4e3a\u548c\u529f\u80fd\u3002 config.json\u7684\u57fa\u672c\u7ed3\u6784 config.json\u6587\u4ef6\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a inbounds: \u5b9a\u4e49\u5165\u7ad9\u8fde\u63a5\u7684\u914d\u7f6e\u3002 outbounds: \u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5\u7684\u914d\u7f6e\u3002 routing: \u5b9a\u4e49\u8def\u7531\u89c4\u5219\u3002 settings: \u5176\u4ed6\u8bbe\u7f6e\u3002 inbounds\u8bbe\u7f6e 1. \u5b9a\u4e49\u5165\u7ad9\u8fde\u63a5 \u5728inbounds\u90e8\u5206\uff0c\u7528\u6237\u53ef\u4ee5\u5b9a\u4e49\u4e0d\u540c\u7684\u5165\u7ad9\u8fde\u63a5\u65b9\u5f0f\uff0c\u4f8b\u5982\uff1a\u201dinbounds\u201d: [ { \u201cport\u201d: 1080, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true } } ] port: \u6307\u5b9a\u76d1\u542c\u7684\u7aef\u53e3\u3002 protocol: \u5b9a\u4e49\u4f7f\u7528\u7684\u534f\u8bae\uff0c\u5982socks\u6216http\u3002 settings: \u5176\u4ed6\u8bbe\u7f6e\uff0c\u5982\u8ba4\u8bc1\u65b9\u5f0f\u548cUDP\u652f\u6301\u3002 outbounds\u8bbe\u7f6e 2. \u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5 \u5728outbounds\u90e8\u5206\uff0c\u7528\u6237\u53ef\u4ee5\u5b9a\u4e49\u51fa\u7ad9\u8fde\u63a5\u7684\u65b9\u5f0f\uff1a\u201doutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\u201d: [ { \u201caddress\u201d: [&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-58435","post","type-post","status-publish","format-standard","hentry","category-vpn"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/58435","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=58435"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/58435\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=58435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=58435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=58435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}