pass the require-sasl message through from the script

This commit is contained in:
Shivaram Lingamneni 2020-09-14 08:11:56 -04:00
parent 7f13ec14cc
commit f3cdf8442a
3 changed files with 13 additions and 2 deletions

View file

@ -82,6 +82,9 @@ func (client *Client) ApplyProxiedIP(session *Session, proxiedIP net.IP, tls boo
return errBanned, banMsg
}
client.requireSASL = requireSASL
if requireSASL {
client.requireSASLMessage = banMsg
}
// successfully added a limiter entry for the proxied IP;
// remove the entry for the real IP if applicable (#197)
client.server.connectionLimiter.RemoveClient(session.realIP)