~为meta内核的providers本地生成文件添加了自动跳过证书验证功能

~优化singbox内核providers生成时的ua标识
~使用systemd启动时,优化启动前逻辑,优化报错信息
~增加内核切换时自动切换dns模式的逻辑
~增加在本地没有配置文件启动时,自动使用providers生成配置的功能
~修复热更新订阅时找不到内核的bug
This commit is contained in:
juewuy
2024-02-17 19:06:42 +08:00
parent 48103e8b09
commit 2fba0f58ed
3 changed files with 26 additions and 8 deletions

View File

@@ -175,7 +175,12 @@ start_core(){
core_config=${CRASHDIR}/yamls/config.yaml
fi
echo -----------------------------------------------
if [ -s $core_config -o -n "$Url" -o -n "$Https" ];then
if [ ! -s $core_config -a -s $CRASHDIR/configs/providers.cfg ];then
echo -e "\033[33m没有找到${crashcore}配置文件尝试生成providers配置文件\033[0m"
[ "$crashcore" = singboxp ] && coretype=singbox
[ "$crashcore" = meta -o "$crashcore" = clashpre ] && coretype=clash
source ${CRASHDIR}/getdate.sh && gen_${coretype}_providers
elif [ -s $core_config -o -n "$Url" -o -n "$Https" ];then
${CRASHDIR}/start.sh start
#设置循环检测以判定服务启动是否成功
i=1
@@ -1207,7 +1212,6 @@ normal_set(){ #基础设置
}
set_dns_mod(){
[ "$dns_mod" = mix ] && [ "$crashcore" != singbox -o "$crashcore" != singboxp ] && dns_mod=redir_host
echo -----------------------------------------------
echo -e "当前DNS运行模式为\033[47;30m $dns_mod \033[0m"
echo -e "\033[33m切换模式后需要手动重启服务以生效\033[0m"