改进WAF record_ip动作

This commit is contained in:
刘祥超
2021-08-04 15:35:22 +08:00
parent 06e27bb469
commit 4d679e31bc

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