diff --git a/api/ip_group.go b/api/ip_group.go index 9c1f46d..2f8fb7a 100644 --- a/api/ip_group.go +++ b/api/ip_group.go @@ -171,7 +171,13 @@ func (i *IKuai) DelIKuaiBypassIpGroup(cleanTag string) (err error) { ids = append(ids, strconv.Itoa(d.ID)) } } else { - if d.Comment == COMMENT_IKUAI_BYPASS { + if cleanTag == "" { + cleanTag = COMMENT_IKUAI_BYPASS + } else { + cleanTag = COMMENT_IKUAI_BYPASS + "_" + cleanTag + } + + if d.Comment == cleanTag { ids = append(ids, strconv.Itoa(d.ID)) } } diff --git a/api/stream_ipport.go b/api/stream_ipport.go index 07a5abf..77d231e 100644 --- a/api/stream_ipport.go +++ b/api/stream_ipport.go @@ -138,7 +138,13 @@ func (i *IKuai) DelIKuaiBypassStreamIpPort(cleanTag string) (err error) { ids = append(ids, strconv.Itoa(d.ID)) } } else { - if d.Comment == COMMENT_IKUAI_BYPASS { + if cleanTag == "" { + cleanTag = COMMENT_IKUAI_BYPASS + } else { + cleanTag = COMMENT_IKUAI_BYPASS + "_" + cleanTag + } + + if d.Comment == cleanTag { ids = append(ids, strconv.Itoa(d.ID)) } }