请教大大,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