Client key
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ export interface Account {
|
||||
}
|
||||
|
||||
export interface AccountsFile {
|
||||
activeAccount: number | null;
|
||||
activeAccount: number;
|
||||
accounts: Account[];
|
||||
}
|
||||
|
||||
|
||||
@@ -18,16 +18,13 @@ export async function getServerList(): Promise<ServerList> {
|
||||
}
|
||||
|
||||
export function getHTTPUrl(hostname: string, isSecure: boolean, path: string) {
|
||||
return (
|
||||
(isSecure ? "https://" : "http://") +
|
||||
(hostname.includes(":") ? hostname : hostname + ":3415") +
|
||||
path
|
||||
);
|
||||
return (isSecure ? "https://" : "http://") + getHostname(hostname) + path;
|
||||
}
|
||||
|
||||
export function getWSUrl(hostname: string, isSecure: boolean) {
|
||||
return (
|
||||
(isSecure ? "wss://" : "ws://") +
|
||||
(hostname.includes(":") ? hostname : hostname + ":3415")
|
||||
);
|
||||
return (isSecure ? "wss://" : "ws://") + getHostname(hostname);
|
||||
}
|
||||
|
||||
export function getHostname(hostname: string) {
|
||||
return hostname.includes(":") ? hostname : hostname + ":3415";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user