Add initial support for choosing to still connect when the server uses a self-signed cert and verify_vertificates is turned on
This commit is contained in:
parent
3f70567d56
commit
c005fc7cae
7 changed files with 81 additions and 22 deletions
|
@ -95,6 +95,18 @@ func (h *wsHandler) connect(b []byte) {
|
|||
}
|
||||
}
|
||||
|
||||
func (h *wsHandler) reconnect(b []byte) {
|
||||
var data ReconnectSettings
|
||||
json.Unmarshal(b, &data)
|
||||
|
||||
if i, ok := h.session.getIRC(data.Server); ok && !i.Connected() {
|
||||
if i.TLS {
|
||||
i.TLSConfig.InsecureSkipVerify = data.SkipVerify
|
||||
}
|
||||
i.Reconnect()
|
||||
}
|
||||
}
|
||||
|
||||
func (h *wsHandler) join(b []byte) {
|
||||
var data Join
|
||||
json.Unmarshal(b, &data)
|
||||
|
@ -252,6 +264,7 @@ func (h *wsHandler) setServerName(b []byte) {
|
|||
func (h *wsHandler) initHandlers() {
|
||||
h.handlers = map[string]func([]byte){
|
||||
"connect": h.connect,
|
||||
"reconnect": h.reconnect,
|
||||
"join": h.join,
|
||||
"part": h.part,
|
||||
"quit": h.quit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue