From 309e1e24ba863e9c19bb33e6dac5dca98708f265 Mon Sep 17 00:00:00 2001 From: mzz2017 Date: Wed, 6 Jul 2022 22:48:18 +0800 Subject: [PATCH] fix(redirect): AddIPWhitelist --- service/core/iptables/redirect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/core/iptables/redirect.go b/service/core/iptables/redirect.go index e09fcdd5..0a6f4fe2 100644 --- a/service/core/iptables/redirect.go +++ b/service/core/iptables/redirect.go @@ -14,7 +14,7 @@ func (r *redirect) AddIPWhitelist(cidr string) { // avoid duplication r.RemoveIPWhitelist(cidr) var commands string - commands = fmt.Sprintf(`iptables -w 2 -t nat -I V2RAY -d %s -j RETURN`, cidr) + commands = fmt.Sprintf(`iptables -w 2 -t nat -I TP_RULE -d %s -j RETURN`, cidr) if !strings.Contains(cidr, ".") { //ipv6 commands = strings.Replace(commands, "iptables", "ip6tables", 1) @@ -24,7 +24,7 @@ func (r *redirect) AddIPWhitelist(cidr string) { func (r *redirect) RemoveIPWhitelist(cidr string) { var commands string - commands = fmt.Sprintf(`iptables -w 2 -t mangle -D V2RAY -d %s -j RETURN`, cidr) + commands = fmt.Sprintf(`iptables -w 2 -t mangle -D TP_RULE -d %s -j RETURN`, cidr) cmds.ExecCommands(commands, false) }