使用CalcOutboundFlag

This commit is contained in:
xljiulang 2022-10-17 20:25:54 +08:00
parent 81c6ebd583
commit 1d177f6aba
2 changed files with 3 additions and 10 deletions

View File

@ -149,16 +149,9 @@ namespace FastGithub.PacketIntercept.Dns
result.UdpHeader->Length = (ushort)(sizeof(UdpHeader) + responsePayload.Length);
addr.Flags |= WinDivertAddressFlag.Impostor;
if (addr.Flags.HasFlag(WinDivertAddressFlag.Loopback))
{
addr.Flags |= WinDivertAddressFlag.Outbound;
}
else
{
addr.Flags &= ~WinDivertAddressFlag.Outbound;
}
packet.CalcOutboundFlag(addr);
packet.CalcChecksums(addr);
this.logger.LogInformation($"{domain}->{loopback}");
}

View File

@ -7,7 +7,7 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="DNS" Version="7.0.0" />
<PackageReference Include="WindivertDotnet" Version="1.0.4" />
<PackageReference Include="WindivertDotnet" Version="1.0.5" />
</ItemGroup>
<ItemGroup>