改进WAF record_ip动作

This commit is contained in:
GoEdgeLab
2021-08-04 15:35:22 +08:00
parent 9e5f4056e3
commit 9f4c01cba4

View File

@@ -25,7 +25,7 @@ func (this *TrafficListener) Accept() (net.Conn, error) {
ip, _, err := net.SplitHostPort(conn.RemoteAddr().String())
if err == nil {
if !waf.SharedIPWhiteList.Contains(waf.IPTypeAll, ip) && waf.SharedIPBlackLIst.Contains(waf.IPTypeAll, ip) {
go func() {
defer func() {
_ = conn.Close()
}()
return conn, nil