diff --git a/public/fallback_filter.list b/public/fallback_filter.list deleted file mode 100644 index f6048b18..00000000 --- a/public/fallback_filter.list +++ /dev/null @@ -1,2 +0,0 @@ -+.bing.com -+.linkedin.com diff --git a/public/servers.list b/public/servers_chs.list similarity index 100% rename from public/servers.list rename to public/servers_chs.list diff --git a/public/servers_en.list b/public/servers_en.list new file mode 100644 index 00000000..fa46d5e6 --- /dev/null +++ b/public/servers_en.list @@ -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 diff --git a/public/task.list b/public/task_chs.list similarity index 100% rename from public/task.list rename to public/task_chs.list diff --git a/public/task_en.list b/public/task_en.list new file mode 100644 index 00000000..c9ba3429 --- /dev/null +++ b/public/task_en.list @@ -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 + + + diff --git a/scripts/init.sh b/scripts/init.sh index 0e602a89..b1cca155 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -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 diff --git a/scripts/lang/en/2_settings.lang b/scripts/lang/en/2_settings.lang index 5fcb929a..c59936e2 100644 --- a/scripts/lang/en/2_settings.lang +++ b/scripts/lang/en/2_settings.lang @@ -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 " diff --git a/scripts/menus/2_settings.sh b/scripts/menus/2_settings.sh index b3ed12e8..6cb466cb 100644 --- a/scripts/menus/2_settings.sh +++ b/scripts/menus/2_settings.sh @@ -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 diff --git a/scripts/menus/5_task.sh b/scripts/menus/5_task.sh index a7b0958f..e65618dd 100644 --- a/scripts/menus/5_task.sh +++ b/scripts/menus/5_task.sh @@ -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" diff --git a/scripts/menus/9_upgrade.sh b/scripts/menus/9_upgrade.sh index c6e6ec7b..85077612 100644 --- a/scripts/menus/9_upgrade.sh +++ b/scripts/menus/9_upgrade.sh @@ -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 } - - - - diff --git a/scripts/menus/bot_tg_service.sh b/scripts/menus/bot_tg_service.sh index a0b0a23a..759d6591 100644 --- a/scripts/menus/bot_tg_service.sh +++ b/scripts/menus/bot_tg_service.sh @@ -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" } diff --git a/scripts/menus/subconverter.sh b/scripts/menus/subconverter.sh index d1295e52..8a92cd32 100644 --- a/scripts/menus/subconverter.sh +++ b/scripts/menus/subconverter.sh @@ -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" \