~增加8-1-1命令等待时长
~自动同步ntp的任务当检测到singbox内核时不会运行
~修复singbox内核启动时geosite-cn相关报错
~修复singbox内核无法正确还原面板节点的问题
~修复卸载时报错source未找到
~修复升级或覆盖安装时界面卡死的bug
This commit is contained in:
juewuy
2024-01-13 19:39:15 +08:00
parent ea1b44669d
commit 0e402881a1
8 changed files with 13 additions and 10 deletions

View File

@@ -586,7 +586,7 @@ EOF
"outbound": ["any"],
"server": "dns_resolver"
}, {
"geosite": ["geolocation-cn"],
"geosite": ["cn"],
"query_type": [ "A", "AAAA" ],
"server": "$direct_dns"
}, {
@@ -1305,11 +1305,14 @@ stop_firewall(){ #还原防火墙配置
web_save(){ #最小化保存面板节点选择
getconfig
#使用get_save获取面板节点设置
get_save http://127.0.0.1:${db_port}/proxies | awk -F ':\\{"' '{for(i=1;i<=NF;i++) print $i}' | grep -aE '(^all|^alive)".*"Selector"' > ${TMPDIR}/shellcrash_web_check_$USER
get_save http://127.0.0.1:${db_port}/proxies | awk -F ':\\{"' '{for(i=1;i<=NF;i++) print $i}' | grep -aE '"Selector"' | grep -aoE '"name":.*"now":".*",' > ${TMPDIR}/shellcrash_web_check_$USER
while read line ;do
def=$(echo $line | awk -F "[[,]" '{print $2}')
now=$(echo $line | grep -oE '"now".*",' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/,//g')
[ "$def" != "$now" ] && echo $line | grep -oE '"name".*"now".*",' | sed 's/"name"://g' | sed 's/"now"://g' | sed 's/"type":.*//g' | sed 's/"//g' >> ${TMPDIR}/shellcrash_web_save_$USER
def=$(echo $line | grep -oE '"all".*",' | awk -F "[:\"]" '{print $5}' )
now=$(echo $line | grep -oE '"now".*",' | awk -F "[:\"]" '{print $5}' )
[ "$def" != "$now" ] && {
name=$(echo $line | grep -oE '"name".*",' | awk -F "[:\"]" '{print $5}' )
echo "${name},${now}" >> ${TMPDIR}/shellcrash_web_save_$USER
}
done < ${TMPDIR}/shellcrash_web_check_$USER
rm -rf ${TMPDIR}/shellcrash_web_check_$USER
#对比文件,如果有变动且不为空则写入磁盘,否则清除缓存