A common mistake for the user is to connect to (for example) irc.freenode.net:6697 (note the lack of +).
ZNC fails connection with the error "Connection closed by peer", while not incorrect, it doesn't help the user figure out what's wrong.
A common mistake for the user is to connect to (for example) irc.freenode.net:6697 (note the lack of +).
ZNC fails connection with the error "Connection closed by peer", while not incorrect, it doesn't help the user figure out what's wrong.
<!-- github-sync-id:261906598 -->
What do some clients produce in this case? How about openssl s_client or gnutls-cli?
I don't think there is anything that we can do in this case. TLS begins its handshake with the client sending something to the server. IRC begins with the client sending something to the server. A TLS server that gets USER instead of a valid TLS record will react by closing the connection. Thus, there is no more information available than "the other end closed the connection".
What do some clients produce in this case? How about `openssl s_client` or `gnutls-cli`?
I don't think there is anything that we can do in this case. TLS begins its handshake with the client sending something to the server. IRC begins with the client sending something to the server. A TLS server that gets `USER` instead of a valid TLS record will react by closing the connection. Thus, there is no more information available than "the other end closed the connection".
<!-- github-comment-id:333373410 -->
(16:36:12) * Connecting to chatfreenode.net (6697)
(16:36:13) * Disconnected
For WeeChat:
irc: connecting to server chat.freenode.net/6697...
irc: connected to chat.freenode.net/6697 (2001:1bc0:c1::6667)
irc: reading data on socket: error 104 Connection reset by peer
irc: disconnecting from server...
irc: disconnected from server
irc: reconnecting to server in 10 seconds
I guess they do more or less the same, but it's not uncommon for it to go wrong during troubleshooting.
One solution could be to enable SSL by default and the port 6697 as default as well, a "trying to speak securely to an unsecured socket" error is more obvious to catch and you don't run the risk of "forgetting to tick a ssl box"
As I mentioned on IRC the only alternative I saw was to getPort() == 6697 && ssl == false && error == Connection reset by peer
For mIRC:
```
(16:36:12) * Connecting to chatfreenode.net (6697)
(16:36:13) * Disconnected
```
For WeeChat:
```
irc: connecting to server chat.freenode.net/6697...
irc: connected to chat.freenode.net/6697 (2001:1bc0:c1::6667)
irc: reading data on socket: error 104 Connection reset by peer
irc: disconnecting from server...
irc: disconnected from server
irc: reconnecting to server in 10 seconds
```
I guess they do more or less the same, but it's not uncommon for it to go wrong during troubleshooting.
One solution could be to enable SSL by default and the port 6697 as default as well, a "trying to speak securely to an unsecured socket" error is more obvious to catch and you don't run the risk of "forgetting to tick a ssl box"
As I mentioned on IRC the only alternative I saw was to `getPort() == 6697 && ssl == false && error == Connection reset by peer`
<!-- github-comment-id:333381120 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A common mistake for the user is to connect to (for example) irc.freenode.net:6697 (note the lack of +).
ZNC fails connection with the error "Connection closed by peer", while not incorrect, it doesn't help the user figure out what's wrong.
What do some clients produce in this case? How about
openssl s_clientorgnutls-cli?I don't think there is anything that we can do in this case. TLS begins its handshake with the client sending something to the server. IRC begins with the client sending something to the server. A TLS server that gets
USERinstead of a valid TLS record will react by closing the connection. Thus, there is no more information available than "the other end closed the connection".For mIRC:
For WeeChat:
I guess they do more or less the same, but it's not uncommon for it to go wrong during troubleshooting.
One solution could be to enable SSL by default and the port 6697 as default as well, a "trying to speak securely to an unsecured socket" error is more obvious to catch and you don't run the risk of "forgetting to tick a ssl box"
As I mentioned on IRC the only alternative I saw was to
getPort() == 6697 && ssl == false && error == Connection reset by peer