From 35792a16417a947bfd853649f5306ce263bd37c0 Mon Sep 17 00:00:00 2001 From: AeonLucid Date: Fri, 23 Oct 2020 20:13:06 +0200 Subject: [PATCH] Anonymize PacketRecorder --- src/Impostor.Server/Recorder/PacketRecorder.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Impostor.Server/Recorder/PacketRecorder.cs b/src/Impostor.Server/Recorder/PacketRecorder.cs index 3d41890..1fa40ac 100644 --- a/src/Impostor.Server/Recorder/PacketRecorder.cs +++ b/src/Impostor.Server/Recorder/PacketRecorder.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Net; using System.Threading; using System.Threading.Tasks; using Impostor.Api.Games; @@ -125,7 +126,8 @@ namespace Impostor.Server.Recorder private static void WriteClient(PacketSerializationContext context, ClientBase client, bool full) { - var addressBytes = client.Connection.EndPoint.Address.GetAddressBytes(); + var address = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 12345); + var addressBytes = address.Address.GetAddressBytes(); context.Writer.Write(client.Id); @@ -133,7 +135,7 @@ namespace Impostor.Server.Recorder { context.Writer.Write((byte) addressBytes.Length); context.Writer.Write(addressBytes); - context.Writer.Write((ushort) client.Connection.EndPoint.Port); + context.Writer.Write((ushort) address.Port); context.Writer.Write(client.Name); } } -- 2.39.5