diff --git a/client/src/lib/Websocket.ts b/client/src/lib/Websocket.ts index 2cf67a8..2366220 100644 --- a/client/src/lib/Websocket.ts +++ b/client/src/lib/Websocket.ts @@ -11,6 +11,21 @@ class FastEvent extends Event { const hosts: { urls: string, credential?: string, username?: string }[] = [ { urls: "stun:openrelay.metered.ca:80", + }, + { + urls: "turn:openrelay.metered.ca:80", + username: "openrelayproject", + credential: "openrelayproject", + }, + { + urls: "turn:openrelay.metered.ca:443", + username: "openrelayproject", + credential: "openrelayproject", + }, + { + urls: "turn:openrelay.metered.ca:443?transport=tcp", + username: "openrelayproject", + credential: "openrelayproject", } ] @@ -140,7 +155,8 @@ export class WebsocketConnection extends EventTarget { } connect() { - this.ws = new WebSocket("ws://" + location.hostname + ":8080/?name=" + encodeURIComponent(this.name)); + const host = location.hostname.includes("danbulant.eu") ? "multidie.danbulant.cloud" : location.hostname + ":8080"; + this.ws = new WebSocket("ws://" + host + "/?name=" + encodeURIComponent(this.name)); this.ws.addEventListener("open", (e) => { console.log("WS ready"); this.refreshList(); diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..e777452 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,7 @@ +FROM node:18 + +COPY . /app +EXPOSE 8080 +WORKDIR /app +RUN npm i +CMD node /app/src \ No newline at end of file