diff --git a/.github/workflows/bin_update.yml b/.github/workflows/bin_update.yml index bbe8c10..23a146e 100644 --- a/.github/workflows/bin_update.yml +++ b/.github/workflows/bin_update.yml @@ -110,7 +110,7 @@ jobs: run: | cd bin source version - curl -kfSL -o geodata/Country.mmdb https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb + #curl -kfSL -o geodata/Country.mmdb https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb curl -kfSL -o geodata/cn_mini.mmdb https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/Country.mmdb curl -kfSL -o geodata/china_ip_list.txt https://raw.githubusercontent.com/ChanthMiao/China-IPv4-List/release/cn.txt curl -kfSL -o geodata/china_ipv6_list.txt https://raw.githubusercontent.com/ChanthMiao/China-IPv6-List/release/cn6.txt @@ -119,6 +119,7 @@ jobs: curl -kfSL -o geodata/geosite_cn.db https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box/geosite-lite.db curl -kfSL -o geodata/srs_geoip_cn.srs https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cnip.srs curl -kfSL -o geodata/srs_geosite_cn.srs https://github.com/DustinWin/ruleset_geodata/releases/download/sing-box-ruleset/cn.srs + curl -kfSL -o geodata/mrs_geosite_cn.mrs https://github.com/DustinWin/ruleset_geodata/releases/download/clash-ruleset/cn.mrs mv -f ../ca-bundle.crt ./fix/ca-certificates.crt sed -i "s/GeoIP_v=.*/GeoIP_v=$(date '+%Y%m%d')/" version #修改版本号 echo 数据库及根证书文件更新完成! diff --git a/scripts/start.sh b/scripts/start.sh index b00e9a9..0590e5a 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -386,7 +386,7 @@ dns: EOF if [ "$dns_mod" != "redir_host" ]; then cat "$CRASHDIR"/configs/fake_ip_filter "$CRASHDIR"/configs/fake_ip_filter.list 2>/dev/null | grep '\.' | sed "s/^/ - '/" | sed "s/$/'/" >>"$TMPDIR"/dns.yaml - [ "$dns_mod" = "mix" ] && echo ' - "geosite:CN"' >>"$TMPDIR"/dns.yaml + [ "$dns_mod" = "mix" ] && echo ' - "rule-set:geosite-cn"' >>"$TMPDIR"/dns.yaml #插入cn过滤规则 else echo " - '+.*'" >>"$TMPDIR"/dns.yaml #使用fake-ip模拟redir_host fi @@ -517,6 +517,14 @@ EOF cat "$TMPDIR"/rules.yaml >>"$TMPDIR"/rules.add mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml } + #mix模式生成rule-providers + [ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn' "$TMPDIR"/rule-providers.yaml && cat >>"$TMPDIR"/rule-providers.yaml <