mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 03:32:34 +08:00
v1.0.0beta13
~支持Padavan系统(仅保守模式) ~进阶功能菜单增加修改默认端口功能 ~优化版本检测机制以及显示效果 ~优化定时任务功能,修复部分设备不可用的bug ~优化检测端口占用流程 ~优化安装脚本安装流程,支持覆盖安装 ~修复部分设备因开启ipv6导致的DNS污染(待测试) ~修复小米R2D等博通芯片设备使用ARMv7核心报错的bug ~修复部分旧设备无法正确显示运行时间的bug ~修复无法正常导入个人更新源的bug
This commit is contained in:
parent
dea883c011
commit
6dc8545ddd
Binary file not shown.
|
@ -97,7 +97,7 @@ fi
|
|||
#检查GeoIP数据库
|
||||
if [ ! -f $clashdir/Country.mmdb ];then
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo -e "\033[31m没有找到GeoIP数据库文件,请先下载数据库!\033[0m"
|
||||
echo -e "\033[31m没有找到GeoIP数据库文件,请下载数据库文件!\033[0m"
|
||||
checkupdate
|
||||
source $clashdir/getdate.sh
|
||||
getgeo
|
||||
|
@ -749,13 +749,9 @@ checkupdate
|
|||
[ "$clashcore" = "clash" ] && clash_n=$clash_v || clash_n=$clashpre_v
|
||||
echo -e "\033[30;47m欢迎使用更新功能:\033[0m"
|
||||
echo -----------------------------------------------
|
||||
echo -e "ShellClash 本地版本:\033[33m$versionsh_l \033[0m在线版本:\033[32m$versionsh\033[0m"
|
||||
echo -e "Geoip数据库 本地版本:\033[33m$Geo_v \033[0m在线版本:\033[32m$GeoIP_v\033[0m"
|
||||
echo -e "$clashcore核心 本地版本:\033[33m$clashv \033[0m在线版本:\033[32m$clash_n\033[0m"
|
||||
echo -----------------------------------------------
|
||||
echo -e " 1 更新\033[36m管理脚本\033[0m"
|
||||
echo -e " 2 切换\033[33mclash核心\033[0m"
|
||||
echo -e " 3 更新\033[32mGeoIP数据库\033[0m"
|
||||
echo -e " 1 更新\033[36m管理脚本 \033[33m$versionsh_l\033[0m > \033[32m$versionsh\033[0m"
|
||||
echo -e " 2 切换\033[33mclash核心 \033[33m$clashv\033[0m > \033[32m$clash_n\033[0m"
|
||||
echo -e " 3 更新\033[32mGeoIP数据库 \033[33m$Geo_v\033[0m > \033[32m$GeoIP_v\033[0m"
|
||||
echo -e " 4 安装本地\033[35mDashboard\033[0m面板"
|
||||
echo -e " 5 生成本地PAC文件(需先安装本地面板)"
|
||||
echo -----------------------------------------------
|
||||
|
|
|
@ -336,13 +336,13 @@ read -p "请输入对应数字 > " num
|
|||
update
|
||||
elif [[ $num == 1 ]]; then
|
||||
clashcore=clash
|
||||
version=$claversionsh_l
|
||||
version=$clash_v
|
||||
elif [[ $num == 2 ]]; then
|
||||
clashcore=clashpre
|
||||
version=$clashpre_v
|
||||
elif [[ $num == 3 ]]; then
|
||||
clashcore=clashr
|
||||
version='1.0(已停止更新)'
|
||||
version='已停止更新'
|
||||
else
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo -e "\033[31m请输入正确的数字!\033[0m"
|
||||
|
@ -351,42 +351,33 @@ read -p "请输入对应数字 > " num
|
|||
#生成链接
|
||||
corelink="$update_url/bin/$clashcore/clash-linux-$cpucore"
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo -e "当前clash核心:\033[0m $clashcore_n \033[33m$clashv\033[0m"
|
||||
echo -e "最新clash核心:\033[32m $clashcore \033[36m$version\033[0m"
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
read -p "是否更新?[1/0] > " res
|
||||
if [ "$res" = '1' ]; then
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo 正在连接服务器获取clash核心文件…………链接地址为:
|
||||
echo -e "\033[4;32m$corelink\033[0m"
|
||||
echo 如无法正常下载可以手动复制到浏览器下载核心文件!
|
||||
echo -e "\033[36m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo -e "| |"
|
||||
echo -e "| 需要一点时间,请耐心等待! |"
|
||||
echo -e "| \033[0m如长时间没有数据请用ctrl+c退出 |"
|
||||
echo -e "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\033[0m"
|
||||
#获取在线clash核心文件
|
||||
result=$(curl -w %{http_code} -kLo /tmp/clash.new $corelink)
|
||||
if [ "$result" != "200" ];then
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[31m核心文件下载失败!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
getcore
|
||||
else
|
||||
echo -e "\033[32m$clashcore核心下载成功,正在替换!\033[0m"
|
||||
mv /tmp/clash.new $clashdir/clash
|
||||
chmod 777 $clashdir/clash #授予权限
|
||||
sed -i '/clashcore=*/'d $ccfg
|
||||
sed -i "1i\clashcore=$clashcore" $ccfg
|
||||
sed -i '/clashv=*/'d $ccfg
|
||||
sed -i "1i\clashv=$version" $ccfg
|
||||
rm -rf /tmp/clashversion
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo -e "\033[32m$clashcore核心替换成功,请手动启动clash服务!\033[0m"
|
||||
clashsh
|
||||
fi
|
||||
echo 正在连接服务器获取clash核心文件…………链接地址为:
|
||||
echo -e "\033[4;32m$corelink\033[0m"
|
||||
echo 如无法正常下载可以手动复制到浏览器下载核心文件!
|
||||
echo -e "\033[36m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo -e "| |"
|
||||
echo -e "| 需要一点时间,请耐心等待! |"
|
||||
echo -e "| \033[0m如长时间没有数据请用ctrl+c退出 |"
|
||||
echo -e "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\033[0m"
|
||||
#获取在线clash核心文件
|
||||
result=$(curl -w %{http_code} -kLo /tmp/clash.new $corelink)
|
||||
if [ "$result" != "200" ];then
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[31m核心文件下载失败!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
getcore
|
||||
else
|
||||
getcore
|
||||
echo -e "\033[32m$clashcore核心下载成功,正在替换!\033[0m"
|
||||
mv /tmp/clash.new $clashdir/clash
|
||||
chmod 777 $clashdir/clash #授予权限
|
||||
sed -i '/clashcore=*/'d $ccfg
|
||||
sed -i "1i\clashcore=$clashcore" $ccfg
|
||||
sed -i '/clashv=*/'d $ccfg
|
||||
sed -i "1i\clashv=$version" $ccfg
|
||||
rm -rf /tmp/clashversion
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo -e "\033[32m$clashcore核心替换成功,请手动启动clash服务!\033[0m"
|
||||
clashsh
|
||||
fi
|
||||
}
|
||||
getgeo(){
|
||||
|
|
Loading…
Reference in New Issue
Block a user