mirror of https://github.com/VERT-sh/VERT.git
feat: protocol detection for wss in vertd
This commit is contained in:
parent
b4f5c20793
commit
dbf5c2a481
|
@ -141,8 +141,9 @@ export class VertdConverter extends Converter {
|
|||
|
||||
return new Promise((resolve, reject) => {
|
||||
const apiUrl = Settings.instance.settings.vertdURL;
|
||||
const protocol = apiUrl.startsWith("https") ? "wss:" : "ws:";
|
||||
const ws = new WebSocket(
|
||||
`ws://${apiUrl.replace("http://", "").replace("https://", "")}/api/ws`,
|
||||
`${protocol}//${apiUrl.replace("http://", "").replace("https://", "")}/api/ws`,
|
||||
);
|
||||
ws.onopen = () => {
|
||||
const speed = Settings.instance.settings.vertdSpeed;
|
||||
|
|
Loading…
Reference in New Issue