~修复部分订阅配置用6-2获取失败的问题

~修复mix模式与自定义配置文件冲突的bug
~修复自定义数据库文件功能部分数据库失效的bug
This commit is contained in:
juewuy
2025-11-24 18:15:06 +08:00
parent d825af43f7
commit a0da1cd203
2 changed files with 5 additions and 5 deletions

View File

@@ -61,9 +61,9 @@ getconfig() { #读取配置及全局变量
#自动生成ua
[ -z "$user_agent" -o "$user_agent" = "auto" ] && {
if [ "$crashcore" = singbox -o "$crashcore" = singboxp ];then
user_agent="sing-box/$core_v"
user_agent="sing-box/singbox/$core_v"
elif [ "$crashcore" = meta ];then
user_agent="mihomo/$core_v"
user_agent="clash.meta/mihomo/$core_v"
else
user_agent="clash"
fi
@@ -541,7 +541,7 @@ EOF
mv -f "$TMPDIR"/rules.add "$TMPDIR"/rules.yaml
}
#mix模式生成rule-providers
[ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q 'rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
[ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q '^rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && {
space=$(sed -n "1p" "$TMPDIR"/rule-providers.yaml | grep -oE '^ *') #获取空格数
[ -z "$space" ] && space=' '
echo "${space}geosite-cn: {type: file, behavior: domain, format: mrs, path: geosite-cn.mrs}" >> "$TMPDIR"/rule-providers.yaml

View File

@@ -1663,13 +1663,13 @@ setcustgeo(){ #下载自定义数据库文件
;;
2)
project=DustinWin/ruleset_geodata
api_tag=mihomo
api_tag=mihomo-geodata
checkcustgeo
setcustgeo
;;
3)
project=DustinWin/ruleset_geodata
api_tag=sing-box
api_tag=sing-box-geodata
checkcustgeo
setcustgeo
;;