~为华硕设备添加基于下载大师的自启选项

~增加对mix、redir、tproxy端口为目标流量的拦截机制以防止回环
~增加对华硕设备切换使用meta内核的警告信息
This commit is contained in:
juewuy
2024-09-22 16:26:59 +08:00
parent e203938ca6
commit 047297ba2a
4 changed files with 15 additions and 9 deletions

View File

@@ -916,6 +916,7 @@ start_ipt_route() { #iptables-route通用工具
$1 $w -t $2 -A $4 -m owner --gid-owner $gid -j RETURN
done
[ "$firewall_area" = 5 ] && $1 $w -t $2 -A $4 -s $bypass_host -j RETURN
[ -z "$ports" ] && $1 $w -t $2 -A $4 -m multiport --dports "$mix_port,$redir_port,$tproxy_port" -j RETURN
#跳过目标保留地址及目标本机网段
for ip in $HOST_IP $RESERVED_IP; do
$1 $w -t $2 -A $4 -d $ip -j RETURN
@@ -1180,6 +1181,7 @@ start_nft_route() { #nftables-route通用工具
#防回环
nft add rule inet shellcrash $1 meta mark $routing_mark return
nft add rule inet shellcrash $1 meta skgid 7890 return
[ -z "$ports" ] && nft add rule inet shellcrash $1 tcp dport {"$mix_port, $redir_port, $tproxy_port"} return
#nft add rule inet shellcrash $1 ip saddr 198.18.0.0/16 return
[ "$firewall_area" = 5 ] && nft add rule inet shellcrash $1 ip saddr $bypass_host return
nft add rule inet shellcrash $1 ip daddr {$RESERVED_IP} return #过滤保留地址