diff --git a/resources/web/js/src/connection.ts b/resources/web/js/src/connection.ts index 342e0e3..5b41e7e 100644 --- a/resources/web/js/src/connection.ts +++ b/resources/web/js/src/connection.ts @@ -753,12 +753,22 @@ function getDefaultUri(isRelay: Boolean = false): string { const host = localStorage.getItem("custom-rendezvous-server"); return getrUriFromRs(host || HOST, isRelay); } +/* +function isHttps() { + return window.location.protocol === "https:" +} + +function domain(uri: string) { + return uri.indexOf(":") > 0 ? uri.split(":")[0] : uri +}*/ function getrUriFromRs( uri: string, isRelay: Boolean = false, roffset: number = 0 ): string { + //v2 + //if (isHttps()) return "wss://" + domain(uri) + "/ws/" + (isRelay ? "relay" : "id"); if (uri.indexOf(":") > 0) { const tmp = uri.split(":"); const port = parseInt(tmp[1]); diff --git a/resources/web2/js/dist/index.js b/resources/web2/js/dist/index.js index ede9b71..b01f79e 100644 --- a/resources/web2/js/dist/index.js +++ b/resources/web2/js/dist/index.js @@ -1,4 +1,4 @@ -import {getServerConf} from './ljw.js' +import {getServerConf} from `./ljw.js?v=3` import {F as $t, J as Yt, L as Re, l as P4, m as r, P as ua, s as Xt, z as H4} from "./vendor.js?v=0b990c6e"; var Zt = Object.defineProperty;