diff --git a/README_CN.md b/README_CN.md index 02b8824..c2dca64 100644 --- a/README_CN.md +++ b/README_CN.md @@ -55,13 +55,11 @@ ```shell sudo -i #切换到root用户,如果需要密码,请输入密码 -bash #如已处于bash环境可跳过 -export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null +export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null ``` 或者 ```shell sudo -i #切换到root用户,如果需要密码,请输入密码 -bash #如已处于bash环境可跳过 export url='https://gh.jwsc.eu.org/master' && bash -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null ``` @@ -74,7 +72,7 @@ export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && sh -c 或者 ```shell #jsDelivrCDN源 -export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null +export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null ``` 或者 ```shell @@ -91,7 +89,7 @@ export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && wget 或者 ```shell #jsDelivrCDN源 -export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null +export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null ``` ~**老旧设备使用低版本wge安装**:
@@ -117,7 +115,7 @@ docker exec -it ShellCrash sh apk add curl apk add nftables #执行安装命令 -export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null +export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null ``` diff --git a/scripts/menu.sh b/scripts/menu.sh index fb956ea..0f32bef 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -116,17 +116,16 @@ ckstatus() { [ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh #检查/tmp内核文件 for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -Ev ".*(gz|zip|7z|tar)$" | grep -iE 'CrashCore|^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'); do - file=/tmp/$file - chmod +x $file - echo -e "发现可用的内核文件: \033[36m$file\033[0m " + chmod +x /tmp/$file + echo -e "发现可用的内核文件: \033[36m/tmp/$file\033[0m " read -p "是否加载(会停止当前服务)?(1/0) > " res [ "$res" = 1 ] && { ${CRASHDIR}/start.sh stop - core_v=$($file -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //') - [ -z "$core_v" ] && core_v=$($file version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //') + core_v=$(/tmp/$file -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //') + [ -z "$core_v" ] && core_v=$(/tmp/$file version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //') if [ -n "$core_v" ]; then source ${CRASHDIR}/webget.sh && setcoretype && - mv -f $file ${TMPDIR}/CrashCore && + mv -f /tmp/$file ${TMPDIR}/CrashCore && tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore && echo -e "\033[32m内核加载完成!\033[0m " && setconfig crashcore $crashcore && @@ -135,7 +134,7 @@ ckstatus() { sleep 1 else echo -e "\033[33m检测到不可用的内核文件!可能是文件受损或CPU架构不匹配!\033[0m" - rm -rf $file + rm -rf /tmp/$file echo -e "\033[33m内核文件已移除,请认真检查后重新上传!\033[0m" sleep 2 fi @@ -144,14 +143,14 @@ ckstatus() { done #检查/tmp配置文件 for file in $(ls /tmp | grep -v [/$] | grep -v ' ' | grep -iE '.yaml$|.yml$|config.json$'); do - file=/tmp/$file - echo -e "发现内核配置文件: \033[36m$file\033[0m " + tmp_file=/tmp/$file + echo -e "发现内核配置文件: \033[36m/tmp/$file\033[0m " read -p "是否加载为$crashcore的配置文件?(1/0) > " res [ "$res" = 1 ] && { - if [ -n "$(echo $file | grep -iE '.json$')" ]; then - mv -f $file ${CRASHDIR}/jsons/config.json + if [ -n "$(echo /tmp/$file | grep -iE '.json$')" ]; then + mv -f /tmp/$file ${CRASHDIR}/jsons/config.json else - mv -f $file ${CRASHDIR}/yamls/config.yaml + mv -f /tmp/$file ${CRASHDIR}/yamls/config.yaml fi echo -e "\033[32m配置文件加载完成!\033[0m " sleep 1 diff --git a/scripts/start.sh b/scripts/start.sh index a76de59..b6ab4cc 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1425,7 +1425,7 @@ start_firewall() { #路由规则总入口 getlanip #获取局域网host地址 #设置策略路由 [ "$firewall_area" != 4 ] && { - local table=100 + local table=166 [ "$redir_mod" = "Tproxy模式" ] && ip route add local default dev lo table $table 2>/dev/null [ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && { i=1