- const wsproto = window.protocol === "https" ? "wss" : "ws";
- const wshost = window.hostname ? window.hostname : "localhost";
- const wsport = window.port ? window.port : 5049;
+
+ const ourl = new URL(window.location);
+ const wsproto = ourl.protocol === "https" ? "wss" : "ws";
+ const wshost = ourl.hostname ? ourl.hostname : "localhost";
+ const wsport = ourl.port ? ourl.port : 5049;
+
+ const imeis = new Set();