使用CalcOutboundFlag
This commit is contained in:
parent
81c6ebd583
commit
1d177f6aba
@ -149,16 +149,9 @@ namespace FastGithub.PacketIntercept.Dns
|
|||||||
result.UdpHeader->Length = (ushort)(sizeof(UdpHeader) + responsePayload.Length);
|
result.UdpHeader->Length = (ushort)(sizeof(UdpHeader) + responsePayload.Length);
|
||||||
|
|
||||||
addr.Flags |= WinDivertAddressFlag.Impostor;
|
addr.Flags |= WinDivertAddressFlag.Impostor;
|
||||||
if (addr.Flags.HasFlag(WinDivertAddressFlag.Loopback))
|
packet.CalcOutboundFlag(addr);
|
||||||
{
|
|
||||||
addr.Flags |= WinDivertAddressFlag.Outbound;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
addr.Flags &= ~WinDivertAddressFlag.Outbound;
|
|
||||||
}
|
|
||||||
|
|
||||||
packet.CalcChecksums(addr);
|
packet.CalcChecksums(addr);
|
||||||
|
|
||||||
this.logger.LogInformation($"{domain}->{loopback}");
|
this.logger.LogInformation($"{domain}->{loopback}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||||
<PackageReference Include="DNS" Version="7.0.0" />
|
<PackageReference Include="DNS" Version="7.0.0" />
|
||||||
<PackageReference Include="WindivertDotnet" Version="1.0.4" />
|
<PackageReference Include="WindivertDotnet" Version="1.0.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user