~根据sayo-melu的pr,新增了下载dashboard面板后修改默认host端口为本机端口的功能
~增加了启动clash时对端口占用进行检测的功能
~界面优化
This commit is contained in:
juewuy
2020-08-17 12:44:55 +08:00
parent 8178a577df
commit 9da9606c57
5 changed files with 14 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
# Copyright (C) 2007 OpenWrt.org
USE_PROCD=1
START=99
START=92
getconfig(){
#开机加载环境变量保证找到文件路径
@@ -30,6 +30,10 @@ fi
if [ "$common_ports" = "已开启" ];then
ports='-m multiport --dports 22,53,587,465,995,993,143,80,443 '
fi
#检测系统端口占用
for portx in 1053 7890 7892 9999 ;do
[ -n "$(netstat -ntulp |grep $portx|grep -v clash)" ] && echo -e "检测到端口:\033[30;47m $portx \033[0m被占用clash无法启动" && exit;
done
}
modify_yaml(){
##########需要变更的配置###########