From 05cfb033a6fd4653a5bac591493bbbafa4fcee28 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 18 Mar 2021 15:55:22 +0100 Subject: [PATCH] Add wait to v2ray rules --- v2ray-core/files/usr/bin/v2ray-rules | 4 ++-- v2ray-core/files/usr/bin/v2ray-rules6 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2ray-core/files/usr/bin/v2ray-rules b/v2ray-core/files/usr/bin/v2ray-rules index 98978f12e..25f435cc9 100755 --- a/v2ray-core/files/usr/bin/v2ray-rules +++ b/v2ray-core/files/usr/bin/v2ray-rules @@ -112,7 +112,7 @@ v2r_rules_parse_args() { __errmsg "Requires at least -l or -L option" return 1 fi - if [ -n "$o_dst_forward_recentrst" ] && ! iptables -m recent -h >/dev/null; then + if [ -n "$o_dst_forward_recentrst" ] && ! iptables -w -m recent -h >/dev/null; then __errmsg "Please install iptables-mod-conntrack-extra with opkg" return 1 fi @@ -166,7 +166,7 @@ v2r_rules_iptchains_init() { } v2r_rules_iptchains_init_mark() { - if [ "$(iptables -t mangle -L PREROUTING | grep ss_rules_dst_bypass_all)" = "" ]; then + if [ "$(iptables -w -t mangle -L PREROUTING | grep ss_rules_dst_bypass_all)" = "" ]; then iptables-restore -w --noflush <<-EOF *mangle -A PREROUTING -m set --match-set ss_rules_dst_bypass_all dst -j MARK --set-mark 0x539 diff --git a/v2ray-core/files/usr/bin/v2ray-rules6 b/v2ray-core/files/usr/bin/v2ray-rules6 index 5e1714110..c62b50ba0 100755 --- a/v2ray-core/files/usr/bin/v2ray-rules6 +++ b/v2ray-core/files/usr/bin/v2ray-rules6 @@ -95,7 +95,7 @@ v2ray_rules6_parse_args() { __errmsg "Requires at least -l or -L option" return 1 fi - if [ -n "$o_dst_forward_recentrst" ] && ! ip6tables -m recent -h >/dev/null; then + if [ -n "$o_dst_forward_recentrst" ] && ! ip6tables -w -m recent -h >/dev/null; then __errmsg "Please install ip6tables-mod-conntrack-extra with opkg" return 1 fi