From cb75f6780c8b8d185b14ae1345e277d299c4fc46 Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 27 Dec 2024 12:36:06 -0800 Subject: [PATCH] log ip address for debugging (TODO remove logging before next release) --- src/server/Archive.ts | 6 +++++- src/server/Server.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/Archive.ts b/src/server/Archive.ts index a727533ac..8c85ed15e 100644 --- a/src/server/Archive.ts +++ b/src/server/Archive.ts @@ -166,11 +166,15 @@ function anonymizeIPv6(ipv6: string): string | null { } function anonymizeIP(ip: string): string | null { + console.log(`anonymize got ip: ${ip}`) const ipv4Result = anonymizeIPv4(ip); if (ipv4Result) { + console.log(`got ipv4 result: ${ipv4Result}`) return ipv4Result; } - return anonymizeIPv6(ip); + const ipv6 = anonymizeIPv6(ip); + console.log(`got ipv6: ${ipv6}`) + return ipv6 } diff --git a/src/server/Server.ts b/src/server/Server.ts index 31994516d..046794a0a 100644 --- a/src/server/Server.ts +++ b/src/server/Server.ts @@ -134,7 +134,7 @@ wss.on('connection', (ws, req) => { const ip = Array.isArray(forwarded) ? forwarded[0] // Get the first IP if it's an array : forwarded || req.socket.remoteAddress; - + console.log(`dev: ip address: ${ip}`) gm.addClient( new Client( clientMsg.clientID,