Merge branch 'master' into dev

# Conflicts:
#	ShellCrash.tar.gz
#	bin/version
#	version
This commit is contained in:
juewuy
2026-02-10 19:41:35 +08:00
6 changed files with 23 additions and 10 deletions

View File

@@ -72,8 +72,11 @@ core_webget(){
[ -z "$zip_type" ] && zip_type='tar.gz' [ -z "$zip_type" ] && zip_type='tar.gz'
get_bin "$TMPDIR/Coretmp.$zip_type" "bin/$crashcore/${target}-linux-${cpucore}.$zip_type" get_bin "$TMPDIR/Coretmp.$zip_type" "bin/$crashcore/${target}-linux-${cpucore}.$zip_type"
else else
zip_type=$(echo "$custcorelink" | grep -oE 'tar.gz$') case "$custcorelink" in
[ -z "$zip_type" ] && zip_type=$(echo "$custcorelink" | grep -oE 'gz$') *.tar.gz) zip_type="tar.gz" ;;
*.gz) zip_type="gz" ;;
*.upx) zip_type="upx" ;;
esac
[ -n "$zip_type" ] && webget "$TMPDIR/Coretmp.$zip_type" "$custcorelink" [ -n "$zip_type" ] && webget "$TMPDIR/Coretmp.$zip_type" "$custcorelink"
fi fi
#校验内核 #校验内核

View File

@@ -225,6 +225,7 @@ set_bot_tg() {
comp_box "\033[31m注意\033[0m由于网络环境原因此机器人仅限服务启动时运行" comp_box "\033[31m注意\033[0m由于网络环境原因此机器人仅限服务启动时运行"
btm_box "1) 启用关闭TG-BOT服务 \033[32m$bot_tg_service\033[0m" \ btm_box "1) 启用关闭TG-BOT服务 \033[32m$bot_tg_service\033[0m" \
"2) TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m" \ "2) TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m" \
"3) 启动时推送菜单 \033[32m$TG_menupush\033[0m" \
"" \ "" \
"0) 返回上级菜单" "0) 返回上级菜单"
read -r -p "请输入对应标号> " num read -r -p "请输入对应标号> " num
@@ -255,6 +256,15 @@ set_bot_tg() {
fi fi
set_bot_tg_init set_bot_tg_init
;; ;;
3)
if [ "$TG_menupush" = ON ];then
TG_menupush=OFF
else
TG_menupush=ON
fi
setconfig TG_menupush "$TG_menupush" "$GT_CFG_PATH"
set_bot_tg
;;
*) *)
errornum errornum
;; ;;

View File

@@ -440,7 +440,7 @@ setcustcore() {
;; ;;
9) 9)
comp_box "请输入自定义内核的链接地址" \ comp_box "请输入自定义内核的链接地址" \
"(必须是以.tar.gz或.gz结尾的压缩文件" \ "(必须是以.tar.gz、.upx或.gz结尾的压缩文件" \
"" \ "" \
"或者输入 0 返回上级菜单" "或者输入 0 返回上级菜单"
read -r -p "请输入> " link read -r -p "请输入> " link
@@ -495,7 +495,7 @@ setcore() {
[ -z "$crashcore" ] && crashcore="unknow" [ -z "$crashcore" ] && crashcore="unknow"
[ -z "$zip_type" ] && zip_type="tar.gz" [ -z "$zip_type" ] && zip_type="tar.gz"
echo "$crashcore" | grep -q 'singbox' && core_old=singbox || core_old=clash echo "$crashcore" | grep -q 'singbox' && core_old=singbox || core_old=clash
[ -n "$custcorelink" ] && custcore="$(echo "$custcorelink" | sed 's#.*github.com##; s#/releases/download/#@#; s#-linux.*$##')" [ -n "$custcorelink" ] && custcore="$(echo "$custcorelink" | sed 's#.*github.com##; s#/releases/download/#@#')"
[ -z "$cpucore" ] && check_cpucore [ -z "$cpucore" ] && check_cpucore

View File

@@ -320,7 +320,7 @@ polling(){
done done
} }
#send_menu [ "$TG_menupush" = ON ] && send_menu
polling polling

View File

@@ -15,7 +15,7 @@ set_fw_filter() {
comp_box "1) 过滤非常用端口: \033[36m$common_ports\033[0m ———用于过滤P2P流量" \ comp_box "1) 过滤非常用端口: \033[36m$common_ports\033[0m ———用于过滤P2P流量" \
"2) 过滤局域网设备: \033[36m$mac_return\033[0m ———使用黑/白名单进行过滤" \ "2) 过滤局域网设备: \033[36m$mac_return\033[0m ———使用黑/白名单进行过滤" \
"3) 过滤QUIC协议 \033[36m$quic_rj\033[0m ———优化视频性能" \ "3) 过滤QUIC协议 \033[36m$quic_rj\033[0m ———优化视频性能" \
"4) 过滤CN_IP(4/6)列表:\033[36m$cn_ip_route\033[0m ———优化性能" \ "4) 过滤CN_IP(4&6)列表:\033[36m$cn_ip_route\033[0m ———优化性能" \
"5) 自定义透明路由ipv4网段适合vlan等复杂网络环境" \ "5) 自定义透明路由ipv4网段适合vlan等复杂网络环境" \
"6) 自定义保留地址ipv4网段需要以保留地址为访问目标的环境" \ "6) 自定义保留地址ipv4网段需要以保留地址为访问目标的环境" \
"" \ "" \

View File

@@ -11,10 +11,10 @@ clash_check() { #clash启动前检查
[ "$crashcore" = "clash" ] && [ "$firewall_area" = 2 -o "$firewall_area" = 3 ] && [ -z "$(grep '0:7890' /etc/passwd)" ] && [ "$crashcore" = "clash" ] && [ "$firewall_area" = 2 -o "$firewall_area" = 3 ] && [ -z "$(grep '0:7890' /etc/passwd)" ] &&
core_exchange meta '当前内核不支持非root用户启用本机代理' core_exchange meta '当前内核不支持非root用户启用本机代理'
check_core check_core
#预下载GeoIP数据库并排除存在自定义数据库链接的情况 #预下载GeoIP数据库
[ -n "$(grep -oEi 'geoip:' "$CRASHDIR"/yamls/config.yaml)" ] && check_geo Country.mmdb cn_mini.mmdb grep -qEi 'GEOIP,CN' "$CRASHDIR"/yamls/config.yaml && ! grep -Eq '^[[:space:]]*geodata-mode:' "$CRASHDIR"/yamls/*.yaml && check_geo Country.mmdb cn_mini.mmdb
#预下载GeoSite数据库并排除存在自定义数据库链接的情况 #预下载GeoSite数据库
[ -n "$(grep -oEi 'geosite:' "$CRASHDIR"/yamls/config.yaml)" ] && check_geo GeoSite.dat geosite.dat grep -qEi 'GEOSITE,' "$CRASHDIR"/yamls/config.yaml && ! grep -Eq '^[[:space:]]*geosite:' "$CRASHDIR"/yamls/*.yaml && check_geo GeoSite.dat geosite.dat
#预下载cn.mrs数据库 #预下载cn.mrs数据库
[ "$dns_mod" = "mix" ] || [ "$dns_mod" = "route" ] && ! grep -Eq '^[[:space:]]*cn:' "$CRASHDIR"/yamls/*.yaml && check_geo ruleset/cn.mrs mrs_geosite_cn.mrs [ "$dns_mod" = "mix" ] || [ "$dns_mod" = "route" ] && ! grep -Eq '^[[:space:]]*cn:' "$CRASHDIR"/yamls/*.yaml && check_geo ruleset/cn.mrs mrs_geosite_cn.mrs
return 0 return 0