From ff10c10b8efdc55912713b1fe7a162839ee2c320 Mon Sep 17 00:00:00 2001 From: jumpsplat120 Date: Tue, 3 Jun 2025 05:09:38 -0700 Subject: [PATCH] Add SNI Perform SNI (Server Name Indication) for secure websocket (wss) connections. --- src/websocket/sync.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/websocket/sync.lua b/src/websocket/sync.lua index 2b94312..8ef95e7 100644 --- a/src/websocket/sync.lua +++ b/src/websocket/sync.lua @@ -129,6 +129,7 @@ local connect = function(self,ws_url,ws_protocol,ssl_params) end if protocol == 'wss' then self.sock = ssl.wrap(self.sock, ssl_params) + self.sock:sni(host) self.sock:dohandshake() elseif protocol ~= "ws" then return nil, 'bad protocol'