~为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

@@ -1776,8 +1776,10 @@ update_config(){ #更新订阅并重启
hotupdate(){ #热更新订阅
getconfig
get_core_config
core_check
modify_$format && \
put_save http://127.0.0.1:${db_port}/configs "{\"path\":\"${CRASHDIR}/config.$format\"}"
rm -rf ${TMPDIR}/CrashCore
}
set_proxy(){ #设置环境变量
getconfig
@@ -1807,10 +1809,12 @@ start)
elif [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ];then
/etc/init.d/shellcrash start
elif [ "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ];then
FragmentPath=$(systemctl show -p FragmentPath shellcrash | sed 's/FragmentPath=//')
[ -f $FragmentPath ] && setconfig ExecStart "$COMMAND >/dev/null" "$FragmentPath"
systemctl daemon-reload
systemctl start shellcrash.service || start_error
bfstart && {
FragmentPath=$(systemctl show -p FragmentPath shellcrash | sed 's/FragmentPath=//')
[ -f $FragmentPath ] && setconfig ExecStart "$COMMAND >/dev/null" "$FragmentPath"
systemctl daemon-reload
systemctl start shellcrash.service || start_error
}
else
bfstart && start_old
fi