diff --git a/src/api/ws.ts b/src/api/ws.ts index 61fd9d7..3f04630 100644 --- a/src/api/ws.ts +++ b/src/api/ws.ts @@ -12,7 +12,12 @@ export const activateWS = () => { activeWS = true; }; export const wsOnConnection = (socket: ws.WebSocket, req: http.IncomingMessage) => { let ip = req.socket.remoteAddress; - if (!activeWS || bruteforcecheck(ip ?? "")) return void socket.close(); + if (!activeWS || bruteforcecheck(ip ?? "")) { + debug("WebSocket", "Rejected ip for bruteforce suspicion:", ip); + socket.close(); + return; + } + debug("WebSocket", "Opend new WebSocket from ip:", ip); new wsClient(socket, req); } diff --git a/src/setup/config.ts b/src/setup/config.ts index ea81b95..41deb4a 100644 --- a/src/setup/config.ts +++ b/src/setup/config.ts @@ -22,7 +22,8 @@ const isFile = async (path: string) => { } const loading = () => { - var P = "⣾⣽⣻⢿⡿⣟⣯⣷"; + //var P = "⣾⣽⣻⢿⡿⣟⣯⣷"; + let P = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"; var x = 0; let intID = setInterval(function () { process.stdout.write("\r\x1b[1m" + P[(x++) % P.length]+" ");