Skip to content

Commit

Permalink
Merge pull request #743 from eyebrowkang/dev
Browse files Browse the repository at this point in the history
fix: 修复nftables规则重复插入的问题
  • Loading branch information
juewuy authored Aug 25, 2024
2 parents 1918d41 + 31a1f8e commit 6a813f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ start_nftables() { #nftables配置总入口
nft list chain inet fw4 forward >/dev/null 2>&1 || nft add chain inet fw4 forward { type filter hook forward priority filter \; } 2>/dev/null
nft list chain inet fw4 input >/dev/null 2>&1 || nft add chain inet fw4 input { type filter hook input priority filter \; } 2>/dev/null
nft list chain inet fw4 forward | grep -q 'oifname "utun" accept' || nft insert rule inet fw4 forward oifname "utun" accept
nft list chain inet fw4 input | grep -q 'oifname "utun" accept' || nft insert rule inet fw4 input iifname "utun" accept
nft list chain inet fw4 input | grep -q 'iifname "utun" accept' || nft insert rule inet fw4 input iifname "utun" accept
}
[ "$local_proxy" = true ] && start_nft_route output output route -150
}
Expand Down

0 comments on commit 6a813f1

Please sign in to comment.