双栈 Linux 上怎么用 X-UI 实现 http/https 流量 IPv4 到 IPv6 转换

295 天前
 leo220

请教大大,X-UI 怎么配置才能把流经本机的一些 IPv4 流量转换成 IPv6 发出去?多谢多谢!

已经用 iptables 把流经的 80/443 流量重定向到了本机 62789 端口,DNS6 也解析正常,X-UI 配置如下:

{ "api": { "services": [ "HandlerService", "LoggerService", "StatsService" ], "tag": "api" }, "inbounds": [ { "listen": "127.0.0.1", "port": 62789, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" }, "tag": "api" } ], "outbounds": [ { "protocol": "freedom", "settings": {}, "tag": "IP-V4" }, { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv6" }, "tag": "IP-V6" }, { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "policy": { "system": { "statsInboundDownlink": true, "statsInboundUplink": true } }, "routing": { "rules": [ { "type": "field", "outboundTag": "IP-V6", "domain": [ "ipget.net", "geosite:netflix", "geosite:disney" ] }, { "type": "field", "outboundTag": "IP4-out", "network": "udp,tcp" }, { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" }, { "ip": [ "geoip:private" ], "outboundTag": "blocked", "type": "field" }, { "outboundTag": "blocked", "protocol": [ "bittorrent" ], "type": "field" } ] }, "stats": {} }

DNS 解析没问题: #dig AAAA netflix.com

; <<>> DiG 9.18.19-1~deb12u1-Debian <<>> aaaa netflix.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50182 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;netflix.com. IN AAAA

;; ANSWER SECTION: netflix.com. 60 IN AAAA 2a05:d018:76c:b685:3b38:679d:2640:1ced netflix.com. 60 IN AAAA 2a05:d018:76c:b684:8e48:47c9:84aa:b34d netflix.com. 60 IN AAAA 2a05:d018:76c:b683:f711:f0cf:5cc7:b815

;; Query time: 5 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Thu Dec 07 04:06:34 GMT 2023 ;; MSG SIZE rcvd: 124

687 次点击
所在节点    VPS
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/998331

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX