v1.4.4-test

~适配hanwckf及chongshengb等版本Padavan固件
~增加clash.net核心
~增加脚本设置一键备份还原功能
This commit is contained in:
juewuy
2021-08-30 17:49:33 +08:00
parent 5159886b64
commit 4767a9dc3a
11 changed files with 44 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2,3 +2,4 @@ GeoIP_v=20210709
clash_v=1.6.5
clashpre_v=2021.07.03
versionsh=1.4.3
clash.net_v=1.7.3

View File

@@ -776,7 +776,7 @@ clashadv(){
echo -e " 7 使用自定义配置"
echo -e " 8 手动指定相关端口、秘钥及本机host"
echo -----------------------------------------------
echo -e " 9 \033[31m重置\033[0m配置文件"
echo -e " 9 \033[31m重置/备份/还原\033[0m脚本设置"
echo -e " 0 返回上级菜单 \033[0m"
echo -----------------------------------------------
read -p "请输入对应数字 > " num
@@ -939,15 +939,34 @@ EOF
clashadv
elif [ "$num" = 9 ]; then
read -p "确认重置配置文件?(1/0) > " res
if [ "$res" = "1" ];then
echo "versionsh_l=$versionsh_l" > $ccfg
echo "start_time=$start_time" >> $ccfg
echo "#标识clash运行状态的文件不明勿动" >> $ccfg
echo -e "\033[33m配置文件已重置请重新运行脚本\033[0m"
exit
echo -e " 1 备份脚本设置"
echo -e " 2 还原脚本设置"
echo -e " 3 重置脚本设置"
echo -e " 0 返回上级菜单"
echo -----------------------------------------------
read -p "请输入对应数字 > " num
if [ -z "$num" ]; then
errornum
elif [ "$num" = 0 ]; then
i=
elif [ "$num" = 1 ]; then
cp -f $ccfg $ccfg.bak
echo -e "\033[32m脚本设置已备份\033[0m"
elif [ "$num" = 2 ]; then
if [ -f "$ccfg.bak" ];then
mv -f $ccfg $ccfg.bak2
mv -f $ccfg.bak $ccfg
mv -f $ccfg.bak2 $ccfg.bak
echo -e "\033[32m脚本设置已还原(被覆盖的配置已备份!)\033[0m"
else
echo -e "\033[31m找不到备份文件请先备份脚本设置\033[0m"
fi
elif [ "$num" = 3 ]; then
mv -f $ccfg $ccfg.bak
echo -e "\033[32m脚本设置已重置(旧文件已备份!)\033[0m"
fi
clashadv
echo -e "\033[33m请重新启动脚本\033[0m"
exit 0
else
errornum

View File

@@ -428,7 +428,7 @@ getcore(){
else
echo -e "\033[32m$clashcore核心下载成功\033[0m"
mv -f /tmp/clash.new $bindir/clash
chmod 777 $bindir/clash #授予权限
chmod 777 $bindir/clash #授予权限
setconfig clashcore $clashcore
setconfig clashv $version
fi
@@ -449,7 +449,10 @@ setcore(){
echo "2 clashpre 支持Tun模式、混合模式"
echo "(高级预览版) 内存占用更高"
echo
echo "3 手动指定处理器架构"
echo "3 clash.net 支持vless/xtls"
echo "(.net定制版) 未测试,可能不稳定"
echo
echo "4 手动指定处理器架构"
echo -----------------------------------------------
echo 0 返回上级菜单
read -p "请输入对应数字 > " num
@@ -466,6 +469,10 @@ setcore(){
version=$clashpre_v
getcore
elif [ "$num" = 3 ]; then
clashcore=clash.net
version=$clash.net_v
getcore
elif [ "$num" = 4 ]; then
setcpucore
setcore
else
@@ -873,6 +880,7 @@ userguide(){
echo -----------------------------------------------
echo -e " 1 \033[32m主路由或旁路由\033[0m"
echo -e " 2 \033[36mLinux本机代理\033[0m"
[ -f "$ccfg.bak" ] && echo -e " 3 \033[33m还原之前备份的设置\033[0m"
echo -----------------------------------------------
read -p "请输入对应数字 > " num
if [ -z "$num" ] || [ "$num" -gt 4 ];then
@@ -906,6 +914,11 @@ userguide(){
fi
setconfig local_proxy $local_proxy
setconfig local_type $local_type
elif [ "$num" = 3 ];then
mv -f $ccfg.bak $ccfg
echo -e "\033[32m脚本设置已还原\033[0m"
echo -e "\033[33m请重新启动脚本\033[0m"
exit 0
fi
}
forwhat