socket-function 0.71.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/webSocketServer.ts +9 -0
package/package.json
CHANGED
package/src/webSocketServer.ts
CHANGED
|
@@ -214,6 +214,15 @@ export async function startSocketServer(
|
|
|
214
214
|
console.warn(`No SNI found in TLS hello from ${debug}, using main server. Packets ${packetCount}`);
|
|
215
215
|
console.log(buffer.toString("base64"));
|
|
216
216
|
}
|
|
217
|
+
|
|
218
|
+
if (!sniServers.has(sni)) {
|
|
219
|
+
if (sni) {
|
|
220
|
+
sni = sni.split(".").slice(-2).join(".");
|
|
221
|
+
}
|
|
222
|
+
if (!sniServers.has(sni)) {
|
|
223
|
+
console.warn(`No SNI server found for ${sni}, using main server.`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
217
226
|
server = sniServers.get(sni) || mainHTTPSServer;
|
|
218
227
|
}
|
|
219
228
|
|