Binary file not shown.
Binary file not shown.
@@ -44,7 +44,7 @@ error_down(){
|
|||||||
}
|
}
|
||||||
#安装及初始化
|
#安装及初始化
|
||||||
gettar(){
|
gettar(){
|
||||||
webget /tmp/clashfm.tar.gz $tarurl
|
webget /tmp/ShellClash.tar.gz $tarurl
|
||||||
if [ "$result" != "200" ];then
|
if [ "$result" != "200" ];then
|
||||||
$echo "\033[33m文件下载失败!\033[0m"
|
$echo "\033[33m文件下载失败!\033[0m"
|
||||||
error_down
|
error_down
|
||||||
@@ -55,9 +55,9 @@ gettar(){
|
|||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo 开始解压文件!
|
echo 开始解压文件!
|
||||||
mkdir -p $clashdir > /dev/null
|
mkdir -p $clashdir > /dev/null
|
||||||
tar -zxvf '/tmp/clashfm.tar.gz' -C $clashdir/
|
tar -zxvf '/tmp/ShellClash.tar.gz' -C $clashdir/
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
rm -rf /tmp/clashfm.tar.gz
|
rm -rf /tmp/ShellClash.tar.gz
|
||||||
$echo "\033[33m文件解压失败!\033[0m"
|
$echo "\033[33m文件解压失败!\033[0m"
|
||||||
error_down
|
error_down
|
||||||
exit 1
|
exit 1
|
||||||
@@ -235,7 +235,7 @@ webget /tmp/clashversion "$url_dl/bin/version" echooff
|
|||||||
[ -z "$release_new" ] && release_new=$versionsh
|
[ -z "$release_new" ] && release_new=$versionsh
|
||||||
rm -rf /tmp/clashversion
|
rm -rf /tmp/clashversion
|
||||||
rm -rf /tmp/clashrelease
|
rm -rf /tmp/clashrelease
|
||||||
tarurl=$url_dl/bin/clashfm.tar.gz
|
tarurl=$url_dl/bin/ShellClash.tar.gz
|
||||||
|
|
||||||
#输出
|
#输出
|
||||||
$echo "最新版本:\033[32m$release_new\033[0m"
|
$echo "最新版本:\033[32m$release_new\033[0m"
|
||||||
|
|||||||
@@ -151,9 +151,8 @@ getlink(){
|
|||||||
if [ -n "$Url_link" ];then
|
if [ -n "$Url_link" ];then
|
||||||
i=100
|
i=100
|
||||||
#将用户链接写入mark
|
#将用户链接写入mark
|
||||||
sed -i '/Https=*/'d $ccfg
|
setconfig Https
|
||||||
setconfig Url \'$Url_link\'
|
setconfig Url \'$Url_link\'
|
||||||
Https=""
|
|
||||||
#获取在线yaml文件
|
#获取在线yaml文件
|
||||||
getyaml
|
getyaml
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=
|
version=1.7.0
|
||||||
|
|
||||||
setdir(){
|
setdir(){
|
||||||
dir_avail(){
|
dir_avail(){
|
||||||
|
|||||||
@@ -1114,7 +1114,8 @@ bfstart(){
|
|||||||
[ -z "$cpucore" ] && logger 找不到设备的CPU信息,请手动指定处理器架构类型! 31 && setcpucore
|
[ -z "$cpucore" ] && logger 找不到设备的CPU信息,请手动指定处理器架构类型! 31 && setcpucore
|
||||||
[ "$update_url" = "https://jwsc.eu.org:8888" ] && [ "$clashcore" != 'clash' ] && update_url=https://fastly.jsdelivr.net/gh/juewuy/ShellClash@master
|
[ "$update_url" = "https://jwsc.eu.org:8888" ] && [ "$clashcore" != 'clash' ] && update_url=https://fastly.jsdelivr.net/gh/juewuy/ShellClash@master
|
||||||
$0 webget $bindir/clash "$update_url/bin/$clashcore/clash-linux-$cpucore"
|
$0 webget $bindir/clash "$update_url/bin/$clashcore/clash-linux-$cpucore"
|
||||||
[ "$?" = "1" ] && rm -rf $bindir/clash && logger "核心下载失败,已退出!" 31 && exit 1
|
#校验内核
|
||||||
|
chmod +x $bindir/clash 2>/dev/null
|
||||||
clashv=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
|
clashv=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
|
||||||
if [ -z "$clashv" ];then
|
if [ -z "$clashv" ];then
|
||||||
rm -rf $bindir/clash
|
rm -rf $bindir/clash
|
||||||
@@ -1420,9 +1421,7 @@ unset_proxy)
|
|||||||
sed -i '/all_proxy/'d $profile
|
sed -i '/all_proxy/'d $profile
|
||||||
sed -i '/ALL_PROXY/'d $profile
|
sed -i '/ALL_PROXY/'d $profile
|
||||||
;;
|
;;
|
||||||
-t)
|
|
||||||
$2 $3 $4 $5 $6
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user