v1.0.0beta14fix3

~修复部分ssr节点不可用的bug
~mac过滤功能增加移除单个设备以及添加全部设备功能
~修复设置本机代理时直接跳出的bug
~优化安装脚本,增加root用户检测
This commit is contained in:
juewuy
2020-10-11 21:30:20 +08:00
parent 156d9193ee
commit 87ae8b78be
14 changed files with 32 additions and 173 deletions

View File

@@ -2,7 +2,7 @@
# Copyright (C) Juewuy
echo='echo -e' && [ -n "$(ls -l /bin/sh|grep -o dash)" ] && echo=echo
test=0
test=$1
echo "***********************************************"
echo "** 欢迎使用 **"
@@ -10,11 +10,15 @@ echo "** ShellClash **"
echo "** by Juewuy **"
echo "***********************************************"
#检查root权限
[ "$USER" != "root" ] && echo 请使用root用户执行安装&& exit 1
#检查更新
url="https://cdn.jsdelivr.net/gh/juewuy/ShellClash"
if [ $test -ge 1 ];then
if [ $test -eq 1 ];then
url="--resolve raw.githubusercontent.com:443:199.232.68.133 https://raw.githubusercontent.com/juewuy/ShellClash/master"
[ $test -ge 2 ] && url="http://192.168.31.30:8080/clash-for-Miwifi"
[ $test -ge 3 ] && url="http://192.168.123.90:8080/clash-for-Miwifi"
[ $test -eq 2 ] && url="http://192.168.31.30:8080/clash-for-Miwifi"
[ $test -eq 3 ] && url="http://192.168.123.90:8080/clash-for-Miwifi"
else
release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 "https://api.github.com/repos/juewuy/ShellClash/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') #检查版本
fi
@@ -39,7 +43,7 @@ gettar(){
mv $clashdir/clashservice /etc/init.d/clash
chmod 777 /etc/init.d/clash
else
[ -d /etc/systemd/system ] && sysdir=/etc/systemd/system
[ -d /etc/systemd/system/ ] && sysdir=/etc/systemd/system/
[ -d /usr/lib/systemd/system/ ] && sysdir=/usr/lib/systemd/system/
if [ -n "$sysdir" ];then
#设为systemd方式启动