Working server list add

This commit is contained in:
2026-08-18 19:02:07 +02:00
parent bb8994bb7e
commit bc189ba79f
7 changed files with 62 additions and 17 deletions
+2 -6
View File
@@ -18,13 +18,9 @@ export async function getServerList(): Promise<ServerList> {
}
export function getHTTPUrl(hostname: string, isSecure: boolean, path: string) {
return (isSecure ? "https://" : "http://") + getHostname(hostname) + path;
return (isSecure ? "https://" : "http://") + hostname + path;
}
export function getWSUrl(hostname: string, isSecure: boolean) {
return (isSecure ? "wss://" : "ws://") + getHostname(hostname);
}
export function getHostname(hostname: string) {
return hostname.includes(":") ? hostname : hostname + ":3415";
return (isSecure ? "wss://" : "ws://") + hostname;
}