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

Print warnings to heavily encourage exposing port 6697 as a TLS port

This commit is contained in:
Daniel Oaks 2017-07-27 23:29:08 +10:00
parent 0b75351e56
commit 97cfc0b629

View File

@ -312,8 +312,23 @@ func NewServer(configFilename string, config *Config, logger *logger.Manager) (*
server.password = config.Server.PasswordBytes()
}
tlsListeners := config.TLSListeners()
for _, addr := range config.Server.Listen {
server.createListener(addr, config.TLSListeners())
server.createListener(addr, tlsListeners)
}
if len(tlsListeners) == 0 {
server.logger.Warning("startup", "You are not exposing an SSL/TLS listening port. You should expose at least one port (typically 6697) to accept TLS connections")
}
var usesStandardTLSPort bool
for addr := range config.TLSListeners() {
if strings.Contains(addr, "6697") {
usesStandardTLSPort = true
break
}
}
if 0 < len(tlsListeners) && !usesStandardTLSPort {
server.logger.Warning("startup", "Port 6697 is the standard TLS port for IRC. You should (also) expose port 6697 as a TLS port to ensure clients can connect securely")
}
if config.Server.Wslisten != "" {