~默认更新服务器改成cloudflare源

~修复部分设备本地更新内核和配置文件报错的bug
~将默认路由表改成166避免冲突
This commit is contained in:
juewuy
2025-11-24 18:56:53 +08:00
parent a0da1cd203
commit a68b7aef5d
3 changed files with 16 additions and 19 deletions

View File

@@ -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安装**<br>
@@ -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
```

View File

@@ -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

View File

@@ -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