Skip to content

Commit eb39590

Browse files
committed
dfgf
1 parent 0053882 commit eb39590

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ws/ws.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ app.get('/', (res, req) => {
234234
if (ip instanceof ArrayBuffer) {
235235
ip = new TextDecoder().decode(ip);
236236
}
237-
if (!isCloudflareIp(ip)) {
238-
res.close(); // Disconnect if not from Cloudflare
239-
console.log("Blocked non-Cloudflare IP:", ip);
240-
return;
241-
}
237+
// if (!isCloudflareIp(ip)) {
238+
// res.close(); // Disconnect if not from Cloudflare
239+
// console.log("Blocked non-Cloudflare IP:", ip);
240+
// return;
241+
// }
242242

243243
setCorsHeaders(res);
244244
res.writeHeader('Content-Type', 'text/plain');
@@ -301,11 +301,11 @@ app.ws('/wg', {
301301

302302
open: (ws, req) => {
303303
const ip = ws.ip;
304-
if (!isCloudflareIp(ip)) {
305-
ws.close(); // Disconnefct if not from Cloudflare
306-
console.log("Blocked non-Cloudflare IP:", ip);
307-
return;
308-
}
304+
// if (!isCloudflareIp(ip)) {
305+
// ws.close(); // Disconnefct if not from Cloudflare
306+
// console.log("Blocked non-Cloudflare IP:", ip);
307+
// return;
308+
// }
309309

310310
const id = ws.id;
311311
const player = new Player(ws, id);

0 commit comments

Comments
 (0)