log ip address for debugging (TODO remove logging before next release)

This commit is contained in:
Evan
2024-12-27 12:36:06 -08:00
parent bb968ec6b6
commit cb75f6780c
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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
}
+1 -1
View File
@@ -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,