v1.0.0beta10

~同步Premium核心版本至20200927
~增加对小米/红米AC2100系列设备的支持
~修复了默认配置设置显示与实际设置不符的bug
This commit is contained in:
juewuy
2020-09-28 20:56:00 +08:00
parent 38aeddd90d
commit 99af6fe1d9
11 changed files with 21 additions and 14 deletions

View File

@@ -85,6 +85,7 @@ linkset
}
linkset(){
if [ -n $Url ];then
[ -z "$skip_cert" ] && skip_cert=已开启
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo -e "\033[47;30m请检查输入的链接是否正确\033[0m"
echo -e "\033[32;4m$Url\033[0m"
@@ -93,7 +94,7 @@ if [ -n $Url ];then
echo -e " 2 \033[36m添加/修改节点过滤关键字 \033[47;30m$exclude\033[0m"
echo -e " 3 \033[33m选取配置规则模版\033[0m"
echo -e " 4 \033[0m选取在线生成服务器\033[0m"
echo -e " 5 \033[0m跳过本地证书验证 \033[36m$skip_cert\033[0m ————解决节点证书验证错误"
echo -e " 5 \033[0m跳过本地证书验证 \033[36m$skip_cert\033[0m ————自建tls节点务必开启"
echo -----------------------------------------------
echo -e " 0 \033[31m取消导入\033[0m并返回上级菜单"
echo -----------------------------------------------
@@ -150,7 +151,8 @@ do
echo -e "\033[44m 遇问题请加TG群反馈\033[42;30m t.me/clashfm \033[0m"
echo -----------------------------------------------
echo -e "支持批量导入\033[30;46m Http/Https/Clash \033[0m等格式的订阅链接"
echo -e "以及\033[30;42m Vmess/SSR/SS/Trojan/Sock5 \033[0m等格式的节点链接"
echo -e "以及\033[30;42m Vmess/SSR/SS/Trojan \033[0m等格式的节点链接"
echo -e "自建Trojan节点链接格式为trojan://密码@host地址:443"
echo -----------------------------------------------
echo -e "多个较短的链接可以用\033[30;47m | \033[0m号分隔以一次性输入"
echo -e "多个较长的链接可分次输入,支持多达\033[30;47m 99 \033[0m次输入"
@@ -303,9 +305,12 @@ cpucore=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
[ -n "$(echo $cpucore | grep -E "linux.*aarch64.*")" ] && cpucore="armv8"
[ -n "$(echo $cpucore | grep -E "linux.*armv8.*")" ] && cpucore="armv8"
[ -n "$(echo $cpucore | grep -E "linux.*armv7.*")" ] && cpucore="armv7"
[ -n "$(echo $cpucore | grep -E "linux.*mips.*")" ] && cpucore="mipsle-softfloat"
[ -n "$(echo $cpucore | grep -E "linux.*x86.*")" ] && cpucore="386"
[ -n "$(echo $cpucore | grep -E "linux.*x86_64.*")" ] && cpucore="amd64"
if [ -n "$(echo $cpucore | grep -E "linux.*mips.*")" ];then
cpucore="mipsle-softfloat"
[ -n "$(uname -a | grep -E "*M2100*")" ] && cpucore="mipsle-hardfloat"
fi
###
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo -e "当前clash核心\033[47;30m $clashcore \033[46;30m$clashv\033[0m"

View File

@@ -5,16 +5,18 @@ getconfig(){
#加载环境变量
[ -z "$clashdir" ] && source /etc/profile > /dev/null 2>&1
ccfg=$clashdir/mark
if [ ! -f "$ccfg" ]; then
echo mark文件不存在默认以Redir模式运行
cat >$ccfg<<EOF
#标识clash运行状态的文件不明勿动
EOF
#指定一些默认状态
redir_mod=redir模式
modify_yaml=开启
fi
source $ccfg #加载配置文件
#检查/读取标识文件
[ ! -f $ccfg ]&& echo '#标识clash运行状态的文件不明勿动' >> $ccfg
source $ccfg
#默认设置
[ -z "$skip_cert" ] && skip_cert=已开启
[ -z "$common_ports" ] && common_ports=已开启
[ -z "$dns_mod" ] && dns_mod=redir_host
[ -z "$dns_over" ] && dns_over=开启
[ -z "$modify_yaml" ] && modify_yaml=未开启
[ -z "$ipv6_support" ] && ipv6_support=未开启
[ -z "$start_old" ] && start_old=未开启
[ -z "$local_proxy" ] && local_proxy=未开启
#是否代理常用端口
[ "$common_ports" = "已开启" ] && ports='-m multiport --dports 22,53,587,465,995,993,143,80,443 '
#检测系统端口占用