From b4623ddb60d579a22bbbe756b6d7a857bcfabda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E4=B9=9D?= <366193849@qq.com> Date: Fri, 24 Sep 2021 22:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddns=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=B8=BA=E5=9B=9E=E7=8E=AFip=E6=97=B6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.PacketIntercept/Dns/DnsInterceptor.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/FastGithub.PacketIntercept/Dns/DnsInterceptor.cs b/FastGithub.PacketIntercept/Dns/DnsInterceptor.cs index 70a7d38..7569464 100644 --- a/FastGithub.PacketIntercept/Dns/DnsInterceptor.cs +++ b/FastGithub.PacketIntercept/Dns/DnsInterceptor.cs @@ -163,17 +163,7 @@ namespace FastGithub.PacketIntercept.Dns packet.UdpHeader->SrcPort = destPort; packet.UdpHeader->Length = BinaryPrimitives.ReverseEndianness((ushort)(sizeof(UdpHeader) + responsePayload.Length)); - // 反转方向 winDivertAddress.Impostor = true; - if (winDivertAddress.Direction == WinDivertDirection.Inbound) - { - winDivertAddress.Direction = WinDivertDirection.Outbound; - } - else - { - winDivertAddress.Direction = WinDivertDirection.Inbound; - } - WinDivert.WinDivertHelperCalcChecksums(winDivertBuffer, packetLength, ref winDivertAddress, WinDivertChecksumHelperParam.All); this.logger.LogInformation($"{domain} => {IPAddress.Loopback}"); }