7 Commits

Author SHA1 Message Date
juewuy
837f99727a ~统一缩进 2026-03-25 20:15:42 +08:00
juewuy
ab29b5c036 ~1.9.5alpha12 pkg 2026-03-25 20:01:48 +08:00
juewuy
3e2ad3da2e ~1.9.5alpha12 pkg 2026-03-25 19:57:18 +08:00
juewuy
13aa2f20cf ~bug fix 2026-03-25 19:49:20 +08:00
juewuy
b1622958e0 ~singboxr增加urltest_unified_delay启用 2026-03-25 19:32:27 +08:00
juewuy
3dad12584a ~bug fix 2026-03-25 19:32:00 +08:00
juewuy
91ae2c88de ~i18h 2026-03-25 19:15:15 +08:00
73 changed files with 2916 additions and 2979 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.5alpha11
versionsh=1.9.5alpha12
GeoIP_v=20251205

View File

@@ -1,2 +0,0 @@
+.bing.com
+.linkedin.com

30
public/servers_en.list Normal file
View File

@@ -0,0 +1,30 @@
# ID&类型 说明 地址 其他说明 (类型100-三版全通源;200-单一源;300-基础sub;400-meta_sub;500-规则地址)
101 Jsdelivr_CDN https://cdn.jsdelivr.net/gh/juewuy/ShellCrash
102 Github https://raw.githubusercontent.com/juewuy/ShellCrash
103 ShellClash https://gh.jwsc.eu.org
104 Cloudflare https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash
401 ... https://sub.jwsc.eu.org ua
402 ... https://api.v1.mk diyua
403 ... https://url.v1.mk diyua
501 Acl4SSR全能优化版 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash.ini (推荐)
502 Acl4SSR精简优化版 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash_Mini.ini (推荐)
503 Acl4SSR全能优化+去广告增强 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash_Block.ini
504 Acl4SSR极简版 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash_Nano.ini (适合自建节点)
505 Acl4SSR分流&游戏增强 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash_Full.ini
506 Acl4SSR分流&游戏&去广告增强 https://github.com/juewuy/ShellCrash/raw/dev/rules/ShellClash_Full_Block.ini (低性能设备慎用)
507 洞主规则精简版 https://github.com/juewuy/ShellCrash/raw/dev/rules/lhie1_clash.ini
508 洞主规则重度完整版 https://github.com/juewuy/ShellCrash/raw/dev/rules/lhie1_dler.ini
509 Acl4SSR多国精简 https://github.com/juewuy/ShellCrash/raw/dev/rules/ACL4SSR_Online_Mini_MultiCountry.ini
510 Acl4SSR回国专用 https://github.com/juewuy/ShellCrash/raw/dev/rules/ACL4SSR_BackCN.ini
511 Acl4SSR增强国外GFW https://github.com/juewuy/ShellCrash/raw/dev/rules/ACL4SSR_WithGFW.ini (适合黑名单模式使用)
512 DustinWin全分组规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Full.ini
513 DustinWin无广告全分组规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Full_NoAds.ini
514 DustinWin精简规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Lite.ini (推荐)
515 DustinWin无广告精简规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Lite_NoAds.ini
516 DustinWin黑名单模式规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Blacklist.ini
517 DustinWin无广告黑名单模式规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Blacklist_NoAds.ini
518 DustinWin轻量规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Light.ini
519 DustinWin极简规则 https://raw.githubusercontent.com/DustinWin/ruleset_geodata/master/rule_templates/DustinWin_Nano.ini

19
public/task_en.list Normal file
View File

@@ -0,0 +1,19 @@
#TaskID#TaskCommand#TaskDescription (use # as separator; # is not allowed in command or description)
101#$CRASHDIR/start.sh start#Start ShellCrash
102#$CRASHDIR/start.sh stop#Stop ShellCrash service
103#$CRASHDIR/start.sh restart#Restart ShellCrash service
104#$CRASHDIR/task/task.sh update_config#Update online subscriptions and restart service
105#$CRASHDIR/task/task.sh hotupdate#Hot update online subscriptions (without restart)
106#$CRASHDIR/task/task.sh web_save_auto#Automatically save panel configuration
107#$CRASHDIR/task/task.sh ntp#Automatically sync NTP time
111#$CRASHDIR/task/task.sh update_core#Automatically update core
112#$CRASHDIR/task/task.sh update_scripts#Automatically update scripts
113#$CRASHDIR/task/task.sh update_mmdb#Automatically update database files
121#$CRASHDIR/task/task.sh reset_firewall#Reset transparent routing firewall
122#sleep 70 && touch /etc/banner && reboot#Reboot router device use with caution

View File

@@ -17,7 +17,7 @@
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
#容器内环境
grep -qE '/(docker|lxc|kubepods|crio|containerd)/' /proc/1/cgroup || [ -f /run/.containerenv ] || [ -f /.dockerenv ] && systype='container'
grep -qE '/(docker|lxc|kubepods|crio|containerd)/' /proc/1/cgroup 2>/dev/null || [ -f /run/.containerenv ] || [ -f /.dockerenv ] && systype='container'
#检查环境变量
[ "$systype" = 'container' ] && CRASHDIR='/etc/ShellCrash'
[ -z "$CRASHDIR" ] && [ -n "$clashdir" ] && CRASHDIR="$clashdir"
@@ -37,11 +37,11 @@ mkdir -p "$CRASHDIR"/configs
#判断系统类型写入不同的启动文件
[ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
[ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
if [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ]; then
if [ -f /etc/rc.common -a "$(cat /proc/1/comm 2>/dev/null)" = "procd" ]; then
#设为init.d方式启动
cp -f "$CRASHDIR"/starts/shellcrash.procd /etc/init.d/shellcrash
chmod 755 /etc/init.d/shellcrash
elif [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ]; then
elif [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm 2>/dev/null)" = "systemd" ]; then
#创建shellcrash用户
userdel shellcrash 2>/dev/null
sed -i '/0:7890/d' /etc/passwd
@@ -187,7 +187,7 @@ for file in config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml
mv -f "$CRASHDIR"/"$file" "$CRASHDIR"/yamls/"$file" 2>/dev/null
done
[ ! -L "$CRASHDIR"/config.yaml ] && mv -f "$CRASHDIR"/config.yaml "$CRASHDIR"/yamls/config.yaml 2>/dev/null
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list singbox_providers.list clash_providers.list; do
for file in fake_ip_filter mac web_save servers_chs.list servers_en.list fake_ip_filter.list singbox_providers.list clash_providers.list; do
mv -f "$CRASHDIR"/"$file" "$CRASHDIR"/configs/"$file" 2>/dev/null
done
#配置文件改名
@@ -202,7 +202,7 @@ mv -f "$CRASHDIR"/*.mrs "$CRASHDIR"/ruleset/ 2>/dev/null
for file in dropbear_rsa_host_key authorized_keys tun.ko ShellDDNS.sh; do
mv -f "$CRASHDIR"/"$file" "$CRASHDIR"/tools/"$file" 2>/dev/null
done
for file in cron task.list; do
for file in cron task_chs.list task_en.list; do
mv -f "$CRASHDIR"/"$file" "$CRASHDIR"/task/"$file" 2>/dev/null
done
mv -f "$CRASHDIR"/menus/task_cmd.sh "$CRASHDIR"/task/task.sh 2>/dev/null

View File

@@ -51,17 +51,6 @@ DNS_IPV6_NOT_SUPPORT="该选项暂不支持IPv6加密DNS"
DNS_ENCRYPT_OK="已设置加密DNS如遇DNS解析问题请重置DNS配置"
DNS_CORE_REQUIRE="请使用Mihomo或SingBox内核"
DNS_SET_TO="设为"
DNS_PROTECT_NOW="当前"
DNS_HOSTS_NOW="当前"
DNS_ENABLED="已启用"
DNS_DISABLED="已禁用"
DNS_PROTECT_DISABLE_Q="DNS防泄漏是否确认禁用"
DNS_PROTECT_ENABLE_Q="DNS防泄漏是否确认启用"
DNS_HOSTS_DISABLE_Q="Hosts优化是否确认禁用"
DNS_HOSTS_ENABLE_Q="Hosts优化是否确认启用"
DNS_YES="是"
DNS_RESET_DEFAULT="重置为默认值"
DNS_NO_BACK="否,返回上级菜单"
DNS_REMOVE_OK="移除成功"
DNS_REMOVE_FAIL="移除失败"
DNS_INPUT_REDIR_PORT="请直接输入旁路由IPV4地址"

View File

@@ -138,7 +138,6 @@ SET_SNIFFER_ENABLE_Q=" domain sniffer. Enable now?"
SET_SNIFFER_DISABLE_Q=" domain sniffer. Disable now?"
SET_LANG_ZH="简体中文"
SET_LANG_EN="English"
SET_SWITCH_RERUN="Switched successfully! Please re-run the script!"
SET_SWITCH_OK="Switched successfully!"
SET_MODE_SUFFIX="mode"
SET_SET_TO="Set to "

View File

@@ -53,17 +53,6 @@ DNS_IPV6_NOT_SUPPORT="This option does not support IPv6 encrypted DNS!"
DNS_ENCRYPT_OK="Encrypted DNS has been configured. If DNS issues occur, please reset DNS settings."
DNS_CORE_REQUIRE="Please use the Mihomo or SingBox core"
DNS_SET_TO="Set to"
DNS_PROTECT_NOW="Current status: "
DNS_HOSTS_NOW="Current status: "
DNS_ENABLED="enabled"
DNS_DISABLED="disabled"
DNS_PROTECT_DISABLE_Q=" DNS leak protection. Disable now?"
DNS_PROTECT_ENABLE_Q=" DNS leak protection. Enable now?"
DNS_HOSTS_DISABLE_Q=" Hosts optimization. Disable now?"
DNS_HOSTS_ENABLE_Q=" Hosts optimization. Enable now?"
DNS_YES="Yes"
DNS_RESET_DEFAULT="Reset to defaults"
DNS_NO_BACK="No, back"
DNS_REMOVE_OK="Removed successfully"
DNS_REMOVE_FAIL="Remove failed"
DNS_INPUT_REDIR_PORT="Please input bypass-router IPv4 address"

View File

@@ -153,7 +153,7 @@ ckstatus() {
zip_type=$(echo "$file" | grep -oE 'tar.gz$|upx$|gz$')
. "$CRASHDIR"/menus/9_upgrade.sh && setcoretype
. "$CRASHDIR"/libs/core_tools.sh && core_check "/tmp/$file"
if [ "$?" = 0 ]; then
if [ "$?" = 0 ] && [ -n "$crashcore" ]; then
msg_alert "\033[32m$MENU_CORE_LOADED_OK\033[0m"
switch_core
else

View File

@@ -214,7 +214,7 @@ settings() {
;;
1)
echo chs >"$CRASHDIR"/configs/i18n.cfg
msg_alert "\033[32m$SET_SWITCH_RERUN\033[0m"
msg_alert "\033[32m切换成功,请重新执行脚本!\033[0m"
;;
2)
echo en >"$CRASHDIR"/configs/i18n.cfg

View File

@@ -111,7 +111,7 @@ task_add() {
while true; do
comp_box "\033[36m$TASK5_SELECT_ADD\033[0m"
# 输出任务列表
list=$(cat "$CRASHDIR"/task/task.list "$CRASHDIR"/task/task.user 2>/dev/null | grep -Ev '^(#|$)' | awk -F '#' '{print $3}')
list=$(cat "$CRASHDIR"/task/task_${i18n}.list "$CRASHDIR"/task/task.user 2>/dev/null | grep -Ev '^(#|$)' | awk -F '#' '{print $3}')
list_box "$list"
btm_box "" \
"0) $COMMON_BACK"

View File

@@ -755,10 +755,10 @@ debug() {
main_menu
;;
9)
. "$CRASHDIR"/libs/core_webget.sh && core_find && "$TMPDIR"/CrashCore merge "$TMPDIR"/debug.json -C "$TMPDIR"/jsons && line_break
. "$CRASHDIR"/libs/core_tools.sh && core_find && "$TMPDIR"/CrashCore merge "$TMPDIR"/debug.json -C "$TMPDIR"/jsons && line_break
comp_box "\033[32m$TOOLS_MERGE_OK\033[0m"
[ "$TMPDIR" = "$BINDIR" ] && rm -rf "$TMPDIR"/CrashCore
main_menu
debug
;;
*)
errornum

View File

@@ -1111,19 +1111,20 @@ saveserver() {
setserver() {
while true; do
line_break
LISTFILE="$CRASHDIR"/configs/servers_"$i18n".list
[ -z "$release_type" ] && release_name=$UPG_SOURCE_UNSET
[ -n "$release_type" ] && release_name="$release_type$UPG_SOURCE_ROLLBACK_TAG"
[ "$release_type" = stable ] && release_name=$UPG_SOURCE_STABLE_TEXT
[ "$release_type" = master ] && release_name=$UPG_SOURCE_MASTER_TEXT
[ "$release_type" = dev ] && release_name=$UPG_SOURCE_DEV_TEXT
[ -n "$url_id" ] && url_name=$(grep "$url_id" "$CRASHDIR"/configs/servers.list 2>/dev/null | awk '{print $2}') || url_name="$update_url"
[ -n "$url_id" ] && url_name=$(grep "$url_id" "$LISTFILE" 2>/dev/null | awk '{print $2}') || url_name="$update_url"
comp_box "\033[30;47m$UPG_SOURCE_TITLE\033[0m" \
"" \
"$UPG_SOURCE_CUR_VER\033[4;33m$release_name\033[0m" \
"$UPG_SOURCE_CUR_URL\n\033[4;32m$url_name\033[0m"
grep -E "^1|$release_name" "$CRASHDIR"/configs/servers.list |
grep -E "^1|^2" "$LISTFILE" |
awk '{print NR") "$2}' |
while IFS= read -r line; do
content_line "$line"
@@ -1145,12 +1146,12 @@ setserver() {
break
;;
[1-99])
url_id_new=$(grep -E "^1|$release_name" "$CRASHDIR"/configs/servers.list | sed -n "$num"p | awk '{print $1}')
url_id_new=$(grep -E "^1|$release_name" "$LISTFILE" | sed -n "$num"p | awk '{print $1}')
if [ -z "$url_id_new" ]; then
errornum
continue
elif [ "$url_id_new" -ge 200 ]; then
update_url=$(grep -E "^1|$release_name" "$CRASHDIR"/configs/servers.list | sed -n "$num"p | awk '{print $3}')
update_url=$(grep -E "^1|$release_name" "$LISTFILE" | sed -n "$num"p | awk '{print $3}')
url_id=''
saveserver
break
@@ -1257,7 +1258,3 @@ setserver() {
esac
done
}

View File

@@ -1,8 +1,6 @@
. "$CRASHDIR"/libs/set_cron.sh
load_lang bot_tg
bot_tg_start(){
. "$CRASHDIR"/starts/start_legacy.sh
start_legacy "$CRASHDIR/menus/bot_tg.sh" 'bot_tg'
@@ -14,5 +12,5 @@ bot_tg_stop(){
rm -f "$TMPDIR/bot_tg.pid"
}
bot_tg_cron(){
cronset "$BOT_TG_CRON_NAME" "* * * * * /bin/sh $CRASHDIR/starts/start_legacy_wd.sh bot_tg #$BOT_TG_CRON_NAME"
cronset 'ShellCrash-TG_BOT' "* * * * * /bin/sh $CRASHDIR/starts/start_legacy_wd.sh bot_tg #ShellCrash-TG_BOT"
}

View File

@@ -48,116 +48,31 @@ set_dns_mod() {
msg_alert "\033[36m$DNS_SET_OK$dns_mod\033[0m"
;;
4)
while true; do
line_break
separator_line "="
if [ "$dns_protect" = ON ]; then
content_line "$DNS_PROTECT_NOW\033[33m$DNS_ENABLED\033[0m$DNS_PROTECT_DISABLE_Q"
else
content_line "$DNS_PROTECT_NOW\033[33m$DNS_DISABLED\033[0m$DNS_PROTECT_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$dns_protect" = ON ]; then
dns_protect=OFF
else
dns_protect=ON
fi
;;
2)
dns_protect=ON
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$dns_protect"
common_success
done
;;
5)
while true; do
line_break
separator_line "="
if [ "$hosts_opt" = ON ]; then
content_line "$DNS_HOSTS_NOW\033[33m$DNS_ENABLED\033[0m$DNS_HOSTS_DISABLE_Q"
else
content_line "$DNS_HOSTS_NOW\033[33m$DNS_DISABLED\033[0m$DNS_HOSTS_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$hosts_opt" = ON ]; then
hosts_opt=OFF
else
hosts_opt=ON
fi
;;
2)
hosts_opt=ON
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$hosts_opt"
setconfig hosts_opt "$hosts_opt"
common_success
done
;;
6)
while true; do
line_break
separator_line "="
if [ "$ecs_subnet" = ON ]; then
content_line "$DNS_HOSTS_NOW\033[33m$DNS_ENABLED\033[0m$DNS_HOSTS_DISABLE_Q"
else
content_line "$DNS_HOSTS_NOW\033[33m$DNS_DISABLED\033[0m$DNS_HOSTS_ENABLE_Q"
fi
separator_line "="
btm_box "1) $DNS_YES" \
"2) $DNS_RESET_DEFAULT" \
"0) $DNS_NO_BACK"
read -r -p "$COMMON_INPUT> " num
case "$num" in
0)
break
;;
1)
if [ "$ecs_subnet" = ON ]; then
ecs_subnet=OFF
else
ecs_subnet=ON
fi
;;
2)
ecs_subnet=OFF
;;
*)
errornum
continue
;;
esac
setconfig dns_protect "$ecs_subnet"
setconfig ecs_subnet "$ecs_subnet"
common_success
done
;;
7)
while true; do

View File

@@ -9,6 +9,8 @@ __IS_MODULE_SUBCONVERTER=1
load_lang subconverter
LISTFILE="$CRASHDIR"/configs/servers_"$i18n".list
# Subconverter在线订阅转换
subconverter() {
while true; do
@@ -115,8 +117,8 @@ gen_link_ele() {
# 选择在线规则模版
gen_link_config() {
list=$(grep -aE '^5' "$CRASHDIR"/configs/servers.list | awk '{print $2$4}')
now=$(grep -aE '^5' "$CRASHDIR"/configs/servers.list | sed -n ""$rule_link"p" | awk '{print $2}')
list=$(grep -aE '^5' "$LISTFILE" | awk '{print $2$4}')
now=$(grep -aE '^5' "$LISTFILE" | sed -n ""$rule_link"p" | awk '{print $2}')
comp_box "$SUBCONVERTER_RULE_CURRENT\033[33m$now\033[0m"
list_box "$list"
content_line ""
@@ -140,8 +142,8 @@ gen_link_config() {
# 选择Subconverter服务器
gen_link_server() {
list=$(grep -aE '^3|^4' "$CRASHDIR"/configs/servers.list | awk '{print $3" "$2}')
now=$(grep -aE '^3|^4' "$CRASHDIR"/configs/servers.list | sed -n ""$server_link"p" | awk '{print $3}')
list=$(grep -aE '^3|^4' "$LISTFILE" | awk '{print $3" "$2}')
now=$(grep -aE '^3|^4' "$LISTFILE" | sed -n ""$server_link"p" | awk '{print $3}')
comp_box "\033[36m$SUBCONVERTER_SERVER_HINT\033[0m" \
"\033[32m$SUBCONVERTER_SERVER_THANKS\033[0m" \

View File

@@ -5,7 +5,7 @@
[ -z "$CRASHDIR" ] && CRASHDIR=$( cd $(dirname $0);cd ..;pwd)
. "$CRASHDIR"/libs/get_config.sh
[ -z "$BINDIR" -o -z "$TMPDIR" -o -z "$COMMAND" ] && . "$CRASHDIR"/init.sh >/dev/null 2>&1
[ ! -f "$TMPDIR" ] && mkdir -p "$TMPDIR"
[ ! -d "$TMPDIR" ] && mkdir -p "$TMPDIR"
#当上次启动失败时终止自启动
[ -f "$CRASHDIR"/.start_error ] && exit 1

View File

@@ -306,6 +306,7 @@ EOF
}
EOF
#生成experimental.json
[ "$crashcore" = "singboxr" ] && urltest_unified_delay=',"urltest_unified_delay": true'
cat >"$TMPDIR"/jsons/experimental.json <<EOF
{
"experimental": {
@@ -315,7 +316,7 @@ EOF
"external_ui_download_url": "$external_ui_url",
"secret": "$secret",
"default_mode": "Rule"
}
}$urltest_unified_delay
}
}
EOF

View File

@@ -1 +1 @@
1.9.5alpha11
1.9.5alpha12