fix(tproxy): RemoveIPWhitelist should apply to correct chain

This commit is contained in:
mzz2017 committed 2022-07-08 22:08:01 +08:00
1 parent ed89d49a14
commit b78be1c801
1 file changed
+1 -1
+1 -1
View File
@@ -32,7 +32,7 @@ func (t *tproxy) AddIPWhitelist(cidr string) {
func (t *tproxy) RemoveIPWhitelist(cidr string) {
var commands string
commands = fmt.Sprintf(`iptables -w 2 -t mangle -D SETMARK -d %s -j RETURN`, cidr)
commands = fmt.Sprintf(`iptables -w 2 -t mangle -D TP_RULE -d %s -j RETURN`, cidr)
if !strings.Contains(cidr, ".") {
//ipv6
commands = strings.Replace(commands, "iptables", "ip6tables", 1)