From dfd65966b5fcf054cf0e19804e11f60f95d6c862 Mon Sep 17 00:00:00 2001 From: local Date: Sun, 14 Apr 2024 20:42:34 +0800 Subject: [PATCH] fix direct condition --- root/etc/init.d/luci_v2ray | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/root/etc/init.d/luci_v2ray b/root/etc/init.d/luci_v2ray index d28403d..de22aa8 100755 --- a/root/etc/init.d/luci_v2ray +++ b/root/etc/init.d/luci_v2ray @@ -603,7 +603,7 @@ add_v2ray_tproxy_rules() { cat <<-EOF >/tmp/tproxy_iptables.txt *mangle :V2RAY - - -A V2RAY -j RETURN -m mark --mark 0x2/0x3 + -A V2RAY -j RETURN -m mark --mark 0x2/0x2 $( if [ -n "$addition" ]; then echo "-A V2RAY -p udp --dport 53 -j TPROXY --on-ip 127.0.0.1 --on-port $port --tproxy-mark 0x1/0x3" @@ -631,7 +631,7 @@ add_v2ray_tproxy_rules() { ) :V2RAY_MASK - - -A V2RAY_MASK -j RETURN -m mark --mark 0x2/0x3 + -A V2RAY_MASK -j RETURN -m mark --mark 0x2/0x2 -A V2RAY_MASK -j RETURN -m set --match-set $ipset_src_direct src -A V2RAY_MASK -j RETURN -m set --match-set $ipset_dst_direct dst -A V2RAY_MASK -p tcp $ext_args -j MARK --set-mark 0x1/0x3 @@ -661,7 +661,7 @@ add_v2ray_tproxy_rules() { cat <<-EOF >/tmp/tproxy_ip6tables.txt *mangle :V2RAY - - -A V2RAY -j RETURN -m mark --mark 0x2/0x3 + -A V2RAY -j RETURN -m mark --mark 0x2/0x2 $( if [ -n "$addition" ]; then echo "-A V2RAY -p udp --dport 53 -j TPROXY --on-ip ::1 --on-port $port --tproxy-mark 0x1/0x3" @@ -689,7 +689,7 @@ add_v2ray_tproxy_rules() { ) :V2RAY_MASK - - -A V2RAY_MASK -j RETURN -m mark --mark 0x2/0x3 + -A V2RAY_MASK -j RETURN -m mark --mark 0x2/0x2 -A V2RAY_MASK -j RETURN -m set --match-set $ipset_src_direct_v6 src -A V2RAY_MASK -j RETURN -m set --match-set $ipset_dst_direct_v6 dst -A V2RAY_MASK -p tcp $ext_args -j MARK --set-mark 0x1/0x3 @@ -704,11 +704,11 @@ add_v2ray_tproxy_rules() { ) -A OUTPUT -j V2RAY_MASK - # look like divert has bug - # :V2RAY_DIVERT - - # -A V2RAY_DIVERT -j MARK --set-mark 0x1/0x3 - # -A V2RAY_DIVERT -j ACCEPT - # -I PREROUTING -p tcp -m socket --transparent -j V2RAY_DIVERT + #look like divert has bug + :V2RAY_DIVERT - + -A V2RAY_DIVERT -j MARK --set-mark 0x1/0x3 + -A V2RAY_DIVERT -j ACCEPT + -I PREROUTING -p tcp -m socket -j V2RAY_DIVERT COMMIT EOF