From d2b29999ff159430600675ebfb4544bc5716f67c Mon Sep 17 00:00:00 2001 From: chn Date: Tue, 29 Aug 2023 17:06:15 +0800 Subject: [PATCH] Revert "xray: fix client dns settings" This reverts commit 0b966ab1daa27cc142ea7df905598a7bfb407d81. --- modules/services/xray.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/services/xray.nix b/modules/services/xray.nix index 061edf7a..4921de09 100644 --- a/modules/services/xray.nix +++ b/modules/services/xray.nix @@ -66,10 +66,14 @@ inputs: { servers = [ - { address = "223.5.5.5"; domains = [ "geosite:geolocation-cn" ]; port = 53; tag = "dns-direct"; } - { address = "8.8.8.8"; domains = [ "geosite:geolocation-!cn" ]; port = 53; tag = "dns-proxy"; } - { address = "223.5.5.5"; expectIPs = [ "geoip:cn" ]; tag = "dns-direct"; } - { address = "8.8.8.8"; tag = "dns-proxy"; } + { address = "223.5.5.5"; domains = [ "geosite:geolocation-cn" ]; port = 53; } + { + address = "8.8.8.8"; + domains = [ "geosite:geolocation-!cn" "domain:worldcat.org" "domain:mstdn.one" ]; + port = 53; + } + { address = "223.5.5.5"; expectIPs = [ "geoip:cn" ]; } + { address = "8.8.8.8"; } ]; disableCache = true; queryStrategy = "UseIPv4"; @@ -152,8 +156,8 @@ inputs: [ { inboundTag = [ "dns-in" ]; outboundTag = "dns-out"; } { inboundTag = [ "xmu-in" ]; outboundTag = "xmu-out"; } - { inboundTag = [ "dns-direct" "direct-in" ]; outboundTag = "direct"; } - { inboundTag = [ "dns-proxy" "proxy-in" "proxy-socks-in" ]; outboundTag = "proxy-vless"; } + { inboundTag = [ "direct-in" ]; outboundTag = "direct"; } + { inboundTag = [ "proxy-in" "proxy-socks-in" ]; outboundTag = "proxy-vless"; } { inboundTag = [ "common-in" ]; domain = [ "geosite:geolocation-cn" ]; @@ -233,6 +237,7 @@ inputs: ${ipset} create noproxy_src_net hash:net ${ipset} create proxy_net hash:net + ${ipset} add proxy_net 8.8.8.8 ${iptables} -t mangle -N v2ray -w ${iptables} -t mangle -A PREROUTING -j v2ray -w