Merge pull request #740 from slingamn/proxy_dline

don't check the real IP for bans on proxy-before-TLS
This commit is contained in:
Shivaram Lingamneni
2020-01-09 04:42:46 -05:00
committed by GitHub
+4 -1
View File
@@ -222,7 +222,10 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) {
isBanned, banMsg = server.checkTorLimits()
} else {
realIP = utils.AddrToIP(conn.Conn.RemoteAddr())
isBanned, banMsg = server.checkBans(realIP)
// skip the ban check for k8s-style proxy-before-TLS
if proxyLine == "" {
isBanned, banMsg = server.checkBans(realIP)
}
}
if isBanned {