From a5831ae9c70a7ec79c226a707b70cca3dfacad6d Mon Sep 17 00:00:00 2001 From: Michael Storgaard Date: Tue, 30 Sep 2025 15:35:55 +0200 Subject: [PATCH] fix: skip SNI for IP addresses in TLS connection --- lib/base/connection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base/connection.js b/lib/base/connection.js index b8bc90af8a..70cec19c97 100644 --- a/lib/base/connection.js +++ b/lib/base/connection.js @@ -345,7 +345,9 @@ class BaseConnection extends EventEmitter { }); const rejectUnauthorized = this.config.ssl.rejectUnauthorized; const verifyIdentity = this.config.ssl.verifyIdentity; - const servername = this.config.host; + const servername = Net.isIP(this.config.host) + ? undefined + : this.config.host; let secureEstablished = false; this.stream.removeAllListeners('data');