This commit is contained in:
lejianwen 2024-11-16 20:03:30 +08:00
parent f99803aef4
commit d77191ce0f
2 changed files with 11 additions and 1 deletions

View File

@ -753,12 +753,22 @@ function getDefaultUri(isRelay: Boolean = false): string {
const host = localStorage.getItem("custom-rendezvous-server"); const host = localStorage.getItem("custom-rendezvous-server");
return getrUriFromRs(host || HOST, isRelay); 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( function getrUriFromRs(
uri: string, uri: string,
isRelay: Boolean = false, isRelay: Boolean = false,
roffset: number = 0 roffset: number = 0
): string { ): string {
//v2
//if (isHttps()) return "wss://" + domain(uri) + "/ws/" + (isRelay ? "relay" : "id");
if (uri.indexOf(":") > 0) { if (uri.indexOf(":") > 0) {
const tmp = uri.split(":"); const tmp = uri.split(":");
const port = parseInt(tmp[1]); const port = parseInt(tmp[1]);

View File

@ -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"; 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; var Zt = Object.defineProperty;