mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #996
This commit is contained in:
parent
93f1e5b5b8
commit
0f7d58b1c5
3 changed files with 40 additions and 27 deletions
|
|
@ -329,22 +329,19 @@ func (server *Server) RunClient(conn IRCConn) {
|
|||
for _, defaultMode := range config.Accounts.defaultUserModes {
|
||||
client.SetMode(defaultMode, true)
|
||||
}
|
||||
if proxiedConn.Secure {
|
||||
client.SetMode(modes.TLS, true)
|
||||
}
|
||||
|
||||
if proxiedConn.Config.TLSConfig != nil {
|
||||
client.SetMode(modes.TLS, true)
|
||||
// error is not useful to us here anyways so we can ignore it
|
||||
session.certfp, _ = utils.GetCertFP(proxiedConn.Conn, RegisterTimeout)
|
||||
}
|
||||
|
||||
if session.isTor {
|
||||
client.SetMode(modes.TLS, true)
|
||||
session.rawHostname = config.Server.TorListeners.Vhost
|
||||
client.rawHostname = session.rawHostname
|
||||
} else {
|
||||
if realIP.IsLoopback() || utils.IPInNets(realIP, config.Server.secureNets) {
|
||||
// treat local connections as secure (may be overridden later by WEBIRC)
|
||||
client.SetMode(modes.TLS, true)
|
||||
}
|
||||
if config.Server.CheckIdent {
|
||||
client.doIdentLookup(proxiedConn.Conn)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue