{"id":54160,"date":"2025-02-18T09:58:25","date_gmt":"2025-02-18T01:58:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/54160\/"},"modified":"2025-02-18T09:58:25","modified_gmt":"2025-02-18T01:58:25","slug":"%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aev2ray%e4%bb%a5%e6%94%af%e6%8c%81ipv6","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/54160\/","title":{"rendered":"\u5982\u4f55\u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6"},"content":{"rendered":"<p>\u5728\u73b0\u4ee3\u7f51\u7edc\u4e2d\uff0c<em>IPv6<\/em>\u7684\u4f7f\u7528\u8d8a\u6765\u8d8a\u666e\u904d\u3002\u7531\u4e8eIPv4\u5730\u5740\u7684\u67af\u7aed\uff0c\u8bb8\u591a\u670d\u52a1\u548c\u7528\u6237\u6b63\u5728\u8f6c\u5411IPv6\u3002<em>v2ray<\/em>\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u5b83\u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae\u548c\u4f20\u8f93\u65b9\u5f0f\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6\uff0c\u8ba9\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\u3002<\/p>\n<h2>\u4ec0\u4e48\u662fv2ray\uff1f<\/h2>\n<p><em>v2ray<\/em>\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u4e3b\u8981\u7528\u4e8e\u7f51\u7edc\u79d1\u5b66\u4e0a\u7f51\u548c\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u3002\u5b83\u4e0d\u4ec5\u652f\u6301HTTP\u3001SOCKS\u7b49\u4f20\u7edf\u4ee3\u7406\u534f\u8bae\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7<em>VMess<\/em>\u3001<em>VLess<\/em>\u7b49\u534f\u8bae\u63d0\u4f9b\u66f4\u52a0\u5b89\u5168\u548c\u7075\u6d3b\u7684\u7f51\u7edc\u8bbf\u95ee\u3002v2ray\u5177\u6709\u591a\u79cd\u914d\u7f6e\u9009\u9879\uff0c\u4f7f\u5f97\u5b83\u80fd\u591f\u5728\u590d\u6742\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u8fd0\u884c\u826f\u597d\u3002<\/p>\n<h2>IPv6\u7684\u4f18\u52bf<\/h2>\n<p>\u5728\u7f51\u7edc\u6280\u672f\u4e0d\u65ad\u53d1\u5c55\u7684\u4eca\u5929\uff0c<em>IPv6<\/em>\u5e26\u6765\u4e86\u8bb8\u591a\u4f18\u52bf\uff1a<\/p>\n<ul>\n<li><strong>\u66f4\u5927\u7684\u5730\u5740\u7a7a\u95f4<\/strong>\uff1aIPv6\u4f7f\u7528128\u4f4d\u5730\u5740\uff0c\u53ef\u4ee5\u63d0\u4f9b\u6bd4IPv4\u66f4\u5927\u7684\u5730\u5740\u6c60\u3002<\/li>\n<li><strong>\u7b80\u5316\u7684\u7f51\u7edc\u914d\u7f6e<\/strong>\uff1a\u652f\u6301\u81ea\u52a8\u5730\u5740\u914d\u7f6e\uff0c\u53ef\u4ee5\u51cf\u5c11\u624b\u52a8\u914d\u7f6e\u7684\u590d\u6742\u6027\u3002<\/li>\n<li><strong>\u66f4\u597d\u7684\u5b89\u5168\u6027<\/strong>\uff1aIPv6\u534f\u8bae\u672c\u8eab\u96c6\u6210\u4e86IPSec\uff0c\u589e\u5f3a\u4e86\u6570\u636e\u4f20\u8f93\u7684\u5b89\u5168\u6027\u3002<\/li>\n<\/ul>\n<h2>\u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6<\/h2>\n<p>\u8981\u5728v2ray\u4e2d\u914d\u7f6eIPv6\uff0c\u9700\u8981\u8fdb\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<h3>1. \u5b89\u88c5v2ray<\/h3>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86v2ray\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5\uff1a bash bash &lt;(curl -s -L https:\/\/git.io\/v2ray.sh)<\/p>\n<h3>2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>v2ray\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e<code>\/etc\/v2ray\/config.json<\/code>\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u6b64\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u6216\u4fee\u6539\u4ee5\u4e0b\u90e8\u5206\u4ee5\u652f\u6301IPv6\u3002<\/p>\n<h4>2.1 \u76d1\u542c\u5730\u5740<\/h4>\n<p>\u5728<code>inbounds<\/code>\u90e8\u5206\u4e2d\uff0c\u5c06<code>listen<\/code>\u5730\u5740\u8bbe\u7f6e\u4e3a<code>::<\/code>\u4ee5\u652f\u6301\u6240\u6709IPv6\u5730\u5740\uff1a\u201dinbounds\u201d: [ { \u201cport\u201d: 1080, \u201clisten\u201d: \u201c::\u201d, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true, \u201cip\u201d: \u201c0.0.0.0\u201d } } ]<\/p>\n<h4>2.2 \u670d\u52a1\u5668\u5730\u5740<\/h4>\n<p>\u5728<code>outbounds<\/code>\u90e8\u5206\u4e2d\uff0c\u786e\u4fdd\u4f7f\u7528IPv6\u5730\u5740\u6765\u914d\u7f6e\u4f60\u7684\u670d\u52a1\u5668\uff1a\u201doutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\u201d: [ { \u201caddress\u201d: \u201c\u4f60\u7684IPv6\u5730\u5740\u201d, \u201cport\u201d: 443, \u201cusers\u201d: [ { \u201cid\u201d: \u201c\u4f60\u7684UUID\u201d, \u201calterId\u201d: 64 } ] } ] } } ]<\/p>\n<h3>3. \u68c0\u67e5\u9632\u706b\u5899\u8bbe\u7f6e<\/h3>\n<p>\u786e\u4fdd\u4f60\u7684\u9632\u706b\u5899\u5141\u8bb8\u901a\u8fc7IPv6\u8fdb\u884c\u7684\u6d41\u91cf\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u548c\u4fee\u6539iptables\u8bbe\u7f6e\uff1a bash sudo ip6tables -A INPUT -p tcp \u2013dport 1080 -j ACCEPT<\/p>\n<h3>4. \u542f\u52a8v2ray<\/h3>\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9aa4\u540e\uff0c\u91cd\u65b0\u542f\u52a8v2ray\u4ee5\u5e94\u7528\u65b0\u7684\u914d\u7f6e\uff1a bash sudo systemctl restart v2ray<\/p>\n<h2>\u6ce8\u610f\u4e8b\u9879<\/h2>\n<p>\u5728\u914d\u7f6ev2ray\u652f\u6301IPv6\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ul>\n<li>\u786e\u4fdd\u4f60\u7684ISP\u63d0\u4f9bIPv6\u652f\u6301\u3002<\/li>\n<li>\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u65f6\u95f4\u540c\u6b65\uff0c\u907f\u514d\u56e0\u4e3a\u65f6\u95f4\u5dee\u5bfc\u81f4\u7684\u8fde\u63a5\u95ee\u9898\u3002<\/li>\n<li>\u5b9a\u671f\u66f4\u65b0v2ray\uff0c\u786e\u4fdd\u4f7f\u7528\u6700\u65b0\u7684\u5b89\u5168\u534f\u8bae\u3002<\/li>\n<\/ul>\n<h2>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54\uff08FAQ\uff09<\/h2>\n<h3>1. v2ray\u652f\u6301IPv6\u5417\uff1f<\/h3>\n<p>\u662f\u7684\uff0cv2ray\u5b8c\u5168\u652f\u6301IPv6\uff0c\u4f60\u53ea\u9700\u8981\u6b63\u786e\u914d\u7f6e\u5176\u8bbe\u7f6e\u5373\u53ef\u3002<\/p>\n<h3>2. \u5982\u4f55\u68c0\u67e5v2ray\u662f\u5426\u6210\u529f\u914d\u7f6eIPv6\uff1f<\/h3>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6d4b\u8bd5IPv6\u8fde\u63a5\uff1a bash ping6 www.google.com<\/p>\n<p>\u5982\u679c\u80fd\u6210\u529f\u8fd4\u56de\u6570\u636e\u5305\uff0c\u8bf4\u660eIPv6\u8fde\u63a5\u6b63\u5e38\u3002<\/p>\n<h3>3. \u5982\u679cv2ray\u65e0\u6cd5\u8fde\u63a5\uff0c\u5e94\u8be5\u600e\u4e48\u529e\uff1f<\/h3>\n<ul>\n<li>\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6b63\u786e\u3002<\/li>\n<li>\u786e\u8ba4\u670d\u52a1\u5668\u7684IPv6\u5730\u5740\u662f\u5426\u53ef\u4ee5\u8bbf\u95ee\u3002<\/li>\n<li>\u67e5\u770b\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u786e\u4fdd\u6ca1\u6709\u963b\u6b62IPv6\u6d41\u91cf\u3002<\/li>\n<\/ul>\n<h3>4. \u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u4f7f\u7528v2ray\u5982\u4f55\u914d\u7f6eIPv6\uff1f<\/h3>\n<p>\u79fb\u52a8\u8bbe\u5907\u4e0a\u4e5f\u53ef\u4ee5\u4f7f\u7528v2ray\u7684\u76f8\u540c\u914d\u7f6e\u65b9\u5f0f\uff0c\u53ea\u9700\u8981\u786e\u4fdd\u8bbe\u5907\u8fde\u63a5\u5230\u652f\u6301IPv6\u7684\u7f51\u7edc\u5373\u53ef\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6\u5e76\u4e0d\u662f\u4e00\u9879\u590d\u6742\u7684\u4efb\u52a1\uff0c\u9075\u5faa\u4e0a\u8ff0\u6b65\u9aa4\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u5b8c\u6210\u8bbe\u7f6e\u3002\u968f\u7740\u7f51\u7edc\u73af\u5883\u7684\u53d8\u5316\uff0cIPv6\u5c06\u6210\u4e3a\u672a\u6765\u53d1\u5c55\u7684\u8d8b\u52bf\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4f7f\u7528v2ray\u3002\u5982\u679c\u6709\u66f4\u591a\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u67e5\u8be2\u76f8\u5173\u6587\u6863\u6216\u52a0\u5165\u6280\u672f\u793e\u533a\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u73b0\u4ee3\u7f51\u7edc\u4e2d\uff0cIPv6\u7684\u4f7f\u7528\u8d8a\u6765\u8d8a\u666e\u904d\u3002\u7531\u4e8eIPv4\u5730\u5740\u7684\u67af\u7aed\uff0c\u8bb8\u591a\u670d\u52a1\u548c\u7528\u6237\u6b63\u5728\u8f6c\u5411IPv6\u3002v2ray\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u5b83\u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae\u548c\u4f20\u8f93\u65b9\u5f0f\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6\uff0c\u8ba9\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\u3002 \u4ec0\u4e48\u662fv2ray\uff1f v2ray\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u4e3b\u8981\u7528\u4e8e\u7f51\u7edc\u79d1\u5b66\u4e0a\u7f51\u548c\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u3002\u5b83\u4e0d\u4ec5\u652f\u6301HTTP\u3001SOCKS\u7b49\u4f20\u7edf\u4ee3\u7406\u534f\u8bae\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7VMess\u3001VLess\u7b49\u534f\u8bae\u63d0\u4f9b\u66f4\u52a0\u5b89\u5168\u548c\u7075\u6d3b\u7684\u7f51\u7edc\u8bbf\u95ee\u3002v2ray\u5177\u6709\u591a\u79cd\u914d\u7f6e\u9009\u9879\uff0c\u4f7f\u5f97\u5b83\u80fd\u591f\u5728\u590d\u6742\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u8fd0\u884c\u826f\u597d\u3002 IPv6\u7684\u4f18\u52bf \u5728\u7f51\u7edc\u6280\u672f\u4e0d\u65ad\u53d1\u5c55\u7684\u4eca\u5929\uff0cIPv6\u5e26\u6765\u4e86\u8bb8\u591a\u4f18\u52bf\uff1a \u66f4\u5927\u7684\u5730\u5740\u7a7a\u95f4\uff1aIPv6\u4f7f\u7528128\u4f4d\u5730\u5740\uff0c\u53ef\u4ee5\u63d0\u4f9b\u6bd4IPv4\u66f4\u5927\u7684\u5730\u5740\u6c60\u3002 \u7b80\u5316\u7684\u7f51\u7edc\u914d\u7f6e\uff1a\u652f\u6301\u81ea\u52a8\u5730\u5740\u914d\u7f6e\uff0c\u53ef\u4ee5\u51cf\u5c11\u624b\u52a8\u914d\u7f6e\u7684\u590d\u6742\u6027\u3002 \u66f4\u597d\u7684\u5b89\u5168\u6027\uff1aIPv6\u534f\u8bae\u672c\u8eab\u96c6\u6210\u4e86IPSec\uff0c\u589e\u5f3a\u4e86\u6570\u636e\u4f20\u8f93\u7684\u5b89\u5168\u6027\u3002 \u914d\u7f6ev2ray\u4ee5\u652f\u6301IPv6 \u8981\u5728v2ray\u4e2d\u914d\u7f6eIPv6\uff0c\u9700\u8981\u8fdb\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u5b89\u88c5v2ray \u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86v2ray\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5\uff1a bash bash &lt;(curl -s -L https:\/\/git.io\/v2ray.sh) 2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6 v2ray\u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\/etc\/v2ray\/config.json\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u6b64\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u6216\u4fee\u6539\u4ee5\u4e0b\u90e8\u5206\u4ee5\u652f\u6301IPv6\u3002 2.1 \u76d1\u542c\u5730\u5740 \u5728inbounds\u90e8\u5206\u4e2d\uff0c\u5c06listen\u5730\u5740\u8bbe\u7f6e\u4e3a::\u4ee5\u652f\u6301\u6240\u6709IPv6\u5730\u5740\uff1a\u201dinbounds\u201d: [ { \u201cport\u201d: 1080, \u201clisten\u201d: \u201c::\u201d, \u201cprotocol\u201d: \u201csocks\u201d, \u201csettings\u201d: { \u201cauth\u201d: \u201cnoauth\u201d, \u201cudp\u201d: true, \u201cip\u201d: \u201c0.0.0.0\u201d } } ] 2.2 \u670d\u52a1\u5668\u5730\u5740 \u5728outbounds\u90e8\u5206\u4e2d\uff0c\u786e\u4fdd\u4f7f\u7528IPv6\u5730\u5740\u6765\u914d\u7f6e\u4f60\u7684\u670d\u52a1\u5668\uff1a\u201doutbounds\u201d: [ { \u201cprotocol\u201d: \u201cvmess\u201d, \u201csettings\u201d: { \u201cvnext\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-54160","post","type-post","status-publish","format-standard","hentry","category-vpn"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/54160","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=54160"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/54160\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=54160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=54160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=54160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}