修改生成 sing-box dns.rulesdomain_regex 的错误

修改生成 sing-box `dns.rules` 里 `domain_regex` 的错误
This commit is contained in:
DustinWin 2024-04-02 02:05:47 +08:00 committed by GitHub
parent d6d07abaef
commit 1d84e34134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -606,7 +606,7 @@ EOF
} }
[ "$dns_mod" = "mix" ] && { [ "$dns_mod" = "mix" ] && {
global_dns=dns_fakeip global_dns=dns_fakeip
fake_ip_filter=$(cat ${CRASHDIR}/configs/fake_ip_filter 2>/dev/null | grep '\.' | awk '{printf "\"%s\", ",$1}' | sed "s/, $//" | sed 's/+/.+/g' | sed 's/*/.*/g') fake_ip_filter=$(cat ${CRASHDIR}/configs/fake_ip_filter 2>/dev/null | grep '\.' | awk '{printf "\"%s\", ",$1}' | sed "s/, $//" | sed 's/\"+/\".+/g' | sed 's/\"\*/\".*/g')
[ -n "$fake_ip_filter" ] && fake_ip_filter="{ \"domain_regex\": [$fake_ip_filter], \"server\": \"dns_direct\" }," [ -n "$fake_ip_filter" ] && fake_ip_filter="{ \"domain_regex\": [$fake_ip_filter], \"server\": \"dns_direct\" },"
if [ -z "$(echo "$core_v" | grep -E '^1\.7.*')" ];then if [ -z "$(echo "$core_v" | grep -E '^1\.7.*')" ];then
direct_dns="{ \"rule_set\": [\"geosite-cn\"], \"server\": \"dns_direct\" }," direct_dns="{ \"rule_set\": [\"geosite-cn\"], \"server\": \"dns_direct\" },"