Skip to content

Commit 6000eb2

Browse files
authored
fix: skip SNI for IP addresses in TLS connection (#3835)
1 parent a106df1 commit 6000eb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/base/connection.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ class BaseConnection extends EventEmitter {
345345
});
346346
const rejectUnauthorized = this.config.ssl.rejectUnauthorized;
347347
const verifyIdentity = this.config.ssl.verifyIdentity;
348-
const servername = this.config.host;
348+
const servername = Net.isIP(this.config.host)
349+
? undefined
350+
: this.config.host;
349351

350352
let secureEstablished = false;
351353
this.stream.removeAllListeners('data');

0 commit comments

Comments
 (0)