mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(irc): allow insecure TLS cipher suites (#1444)
This commit is contained in:
parent
70018a0133
commit
6b37c13da7
1 changed files with 14 additions and 1 deletions
|
@ -230,8 +230,21 @@ func (h *Handler) Run() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if h.network.TLS {
|
if h.network.TLS {
|
||||||
|
// In Go 1.22 old insecure ciphers was removed. A lot of old IRC networks still uses those, so we need to allow those.
|
||||||
|
unsafeCipherSuites := make([]uint16, 0, len(tls.InsecureCipherSuites())+len(tls.CipherSuites()))
|
||||||
|
for _, suite := range tls.InsecureCipherSuites() {
|
||||||
|
unsafeCipherSuites = append(unsafeCipherSuites, suite.ID)
|
||||||
|
}
|
||||||
|
for _, suite := range tls.CipherSuites() {
|
||||||
|
unsafeCipherSuites = append(unsafeCipherSuites, suite.ID)
|
||||||
|
}
|
||||||
|
|
||||||
client.UseTLS = true
|
client.UseTLS = true
|
||||||
client.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
client.TLSConfig = &tls.Config{
|
||||||
|
InsecureSkipVerify: true,
|
||||||
|
MinVersion: tls.VersionTLS10,
|
||||||
|
CipherSuites: unsafeCipherSuites,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client.AddConnectCallback(h.onConnect)
|
client.AddConnectCallback(h.onConnect)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue