Merge pull request #602 from DustinWin/patch-1

修改生成 sing-box `dns.rules` 里 `domain_regex` 的错误
This commit is contained in:
juewuy 2024-04-02 09:02:59 +08:00 committed by GitHub
commit 0d1383d132
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -606,7 +606,7 @@ EOF
}
[ "$dns_mod" = "mix" ] && {
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\" },"
if [ -z "$(echo "$core_v" | grep -E '^1\.7.*')" ];then
direct_dns="{ \"rule_set\": [\"geosite-cn\"], \"server\": \"dns_direct\" },"