3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-23 04:19:25 +01:00

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
commit 68968d6868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,8 +222,11 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) {
isBanned, banMsg = server.checkTorLimits() isBanned, banMsg = server.checkTorLimits()
} else { } else {
realIP = utils.AddrToIP(conn.Conn.RemoteAddr()) realIP = utils.AddrToIP(conn.Conn.RemoteAddr())
// skip the ban check for k8s-style proxy-before-TLS
if proxyLine == "" {
isBanned, banMsg = server.checkBans(realIP) isBanned, banMsg = server.checkBans(realIP)
} }
}
if isBanned { if isBanned {
// this might not show up properly on some clients, // this might not show up properly on some clients,