Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xljiulang authored Sep 25, 2022
1 parent 6031d5c commit af0cd90
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# WindivertDotnet
面向对象的Windivert的dotnet封装


### 如何使用
```
using var divert = new WinDivert("true", WinDivertLayer.Network);
using var packet = new WinDivertPacket();
var addr = new WinDivertAddress();
// 读包
divert.Recv(packet, ref addr);
// 解包
var result = packet.GetParseResult();
// 改包
result.TcpHeader->DstPort = 443;
// 重算checksums
packet.CalcChecksums(ref addr);
// 修改后发出
divert.Send(packet, ref addr);
###

0 comments on commit af0cd90

Please sign in to comment.