13 Commits

Author SHA1 Message Date
juewuy
0b7f7161b0 ~1.9.4release 2026-02-15 19:19:19 +08:00
juewuy
02a342cbd1 Merge branch 'master' of https://github.com/juewuy/ShellCrash into master
# Conflicts:
#	scripts/starts/start_legacy_wd.sh
2026-02-14 21:15:43 +08:00
juewuy
1fbade025a ~优化保守模式守护进程 2026-02-14 21:14:13 +08:00
juewuy
f5394120e1 ~优化保守模式守护进程 2026-02-14 20:30:53 +08:00
juewuy
0589bc7881 ~1.9.4rc7.1 pkg 2026-02-10 19:57:07 +08:00
juewuy
3b578c7988 ~修复TG-BOT因守护进程错乱导致的各种bug 2026-02-10 19:56:38 +08:00
juewuy
7f73133657 Merge branch 'master' of https://github.com/juewuy/ShellCrash into master
# Conflicts:
#	ShellCrash.tar.gz
2026-02-10 19:44:36 +08:00
juewuy
952e1a8f63 ~1.9.4rc7 pkg 2026-02-10 19:44:11 +08:00
juewuy
b3ac793f6e ~1.9.4rc7 pkg 2026-02-10 19:34:20 +08:00
juewuy
37269ef851 ~增加每次启动tg_bot服务时自动推送菜单的开关 2026-02-10 19:31:15 +08:00
juewuy
f2ce2fb9b4 ~自定义内核链接支持.upx结尾内核文件 2026-02-10 19:18:12 +08:00
juewuy
d86969bf9b ~修复Mihomo内核自动检测下载geoip和geosite数据库功能未工作的bug 2026-02-10 19:02:54 +08:00
juewuy
dfc6910bc3 ~1.9.4rc6.1 pkg 2026-02-08 20:14:30 +08:00
11 changed files with 39 additions and 24 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
meta_v=v1.19.17
singboxr_v=1.13.0-alpha.27
versionsh=1.9.4rc6
versionsh=1.9.4release
GeoIP_v=20251205

View File

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

View File

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

View File

@@ -183,7 +183,8 @@ set_bot_tg_service(){
. "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_stop
else
bot_tg_service=ON
[ -n "$(pidof CrashCore)" ] && . "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_start
[ -n "$(pidof CrashCore)" ] && . "$CRASHDIR"/menus/bot_tg_service.sh &&
bot_tg_start && bot_tg_cron
fi
setconfig bot_tg_service "$bot_tg_service"
}
@@ -195,6 +196,7 @@ set_bot_tg(){
echo "-----------------------------------------------"
echo -e " 1 启用/关闭TG-BOT服务 \033[32m$bot_tg_service\033[0m"
echo -e " 2 TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m"
echo -e " 3 启动时推送菜单 \033[32m$TG_menupush\033[0m"
echo -e " 0 返回上级菜单 \033[0m"
echo "-----------------------------------------------"
read -p "请输入对应数字 > " num
@@ -223,6 +225,15 @@ set_bot_tg(){
set_bot_tg_init
set_bot_tg
;;
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
;;

View File

@@ -354,7 +354,7 @@ setcustcore(){ #自定义内核
checkcustcore
;;
9)
read -p "请输入自定义内核的链接地址(必须是以.tar.gz或.gz结尾的压缩文件) > " link
read -p "请输入自定义内核的链接地址(必须是以.tar.gz、.upx或.gz结尾的压缩文件) > " link
[ -n "$link" ] && custcorelink="$link"
setcoretype
getcore
@@ -398,7 +398,7 @@ setcore() {
[ -z "$crashcore" ] && crashcore="unknow"
[ -z "$zip_type" ] && zip_type="tar.gz"
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/#@#')"
###
echo "-----------------------------------------------"
[ -z "$cpucore" ] && check_cpucore

View File

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

View File

@@ -4,7 +4,6 @@
bot_tg_start(){
. "$CRASHDIR"/starts/start_legacy.sh
start_legacy "$CRASHDIR/menus/bot_tg.sh" 'bot_tg'
bot_tg_cron
}
bot_tg_stop(){
cronload | grep -q 'TG_BOT' && cronset 'TG_BOT'

View File

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

View File

@@ -1,14 +1,17 @@
[ -z "$CRASHDIR" ] && CRASHDIR=$(cd "$(dirname "$0")"/.. && pwd)
PIDFILE="/tmp/ShellCrash/$1.pid"
LOCKDIR="/tmp/ShellCrash/start_$1.lock"
[ -f "$CRASHDIR"/.start_error ] && [ ! -f /tmp/ShellCrash/crash_start_time ] && exit 1 #当启动失败后禁止开机自启动
mkdir "$LOCKDIR" 2>/dev/null || exit 1
if [ -f "$PIDFILE" ]; then
PID="$(cat "$PIDFILE")"
if [ -n "$PID" ] && [ "$PID" -eq "$PID" ] 2>/dev/null; then
if kill -0 "$PID" 2>/dev/null || [ -d "/proc/$PID" ]; then
return 0
rm -d "$LOCKDIR" 2>/dev/null
exit 0
fi
else
rm -f "$PIDFILE"
@@ -16,13 +19,12 @@ if [ -f "$PIDFILE" ]; then
fi
#如果没有进程则拉起
LOCKDIR="/tmp/ShellCrash/start_$1.lock"
if mkdir "$LOCKDIR" 2>/dev/null; then
if [ "$1" = "shellcrash" ]; then
"$CRASHDIR"/start.sh start
else
[ -f "$CRASHDIR/starts/start_legacy.sh" ] && . "$CRASHDIR/starts/start_legacy.sh"
killall bot_tg.sh 2>/dev/null
start_legacy "$CRASHDIR/menus/bot_tg.sh" "$1"
fi
rm -d "$LOCKDIR" 2>/dev/null
fi

View File

@@ -1 +1 @@
1.9.4rc6
1.9.4release