v1.2.2-test

~Redir模式调整为仅支持redir_host的DNS模式
~增加禁用小米路由器自动更新功能(7-8)
~新手引导增加检测及开启本机ip转发的功能
~将22与8080添加为默认的常用端口
~修复定时任务文件会出现大量空行的bug
This commit is contained in:
juewuy
2021-04-09 14:34:01 +08:00
parent 282d0aa161
commit b75eddd710
3 changed files with 35 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ getconfig(){
[ -z "$dns_port" ] && dns_port=1053
[ -z "$dns_nameserver" ] && dns_nameserver='114.114.114.114, 223.5.5.5'
[ -z "$dns_fallback" ] && dns_fallback='1.0.0.1, 8.8.4.4'
[ -z "$multiport" ] && multiport='53,587,465,995,993,143,80,443'
[ -z "$multiport" ] && multiport='22,53,587,465,995,993,143,80,443,8080'
#是否代理常用端口
[ "$common_ports" = "已开启" ] && ports="-m multiport --dports $multiport"
}
@@ -80,6 +80,7 @@ cronset(){
crondir=/tmp/cron_$USER
crontab -l > $crondir
sed -i "/$1/d" $crondir
sed -i '/^$/d' $crondir
echo "$2" >> $crondir
crontab $crondir
rm -f $crondir