~适配AX6s等小米镜像化系统设备
~修复部分无意义报错bug
This commit is contained in:
juewuy
2022-03-05 17:57:27 +08:00
parent fe9784517a
commit 271865ef76
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@@ -42,7 +42,7 @@ setconfig(){
compare(){
if [ ! -f $1 -o ! -f $2 ];then
return 1
elif command -v cmp >/dev/null 2>&1;then
elif type cmp >/dev/null 2>&1;then
cmp -s $1 $2
else
[ "$(cat $1)" = "$(cat $2)" ] && return 0 || return 1
@@ -371,8 +371,8 @@ start_redir(){
if [ "$public_support" = "已开启" ];then
iptables -I INPUT -p tcp --dport $mix_port -j ACCEPT
iptables -I INPUT -p tcp --dport $db_port -j ACCEPT
[ -n "$(command -v ip6tables)" ] && ip6tables -I INPUT -p tcp --dport $mix_port -j ACCEPT
[ -n "$(command -v ip6tables)" ] && ip6tables -I INPUT -p tcp --dport $db_port -j ACCEPT
type ip6tables >/dev/null 2>&1 && ip6tables -I INPUT -p tcp --dport $mix_port -j ACCEPT
type ip6tables >/dev/null 2>&1 && ip6tables -I INPUT -p tcp --dport $db_port -j ACCEPT
fi
#Google home DNS特殊处理
iptables -t nat -I PREROUTING -p tcp -d 8.8.8.8 -j clash
@@ -768,7 +768,7 @@ start_old(){
if [ "$local_proxy" = "已开启" -a "$local_type" = "iptables增强模式" ];then
su shellclash -c "$bindir/clash -d $bindir >/dev/null" &
else
[ -n "$(command -v nohup)" ] && nohup=nohup
type nohup >/dev/null 2>&1 && nohup=nohup
$nohup $bindir/clash -d $bindir >/dev/null 2>&1 &
fi
afstart