[UE]弱网工具Clumsy的使用
弱网工具Clumsy的使用
Clumsy 用于弱网测试时,进行本地弱网环境的模拟,基于 WinDivert 实现,可以出模拟延迟、丢包等网络状态。
Downloads
下载地址:Clumsy;官方文档:Clumsy Manual
下载后的几个重点文件:
打开 Clumsy.exe 可以看到以下内容:
可以看出这里有几个重点的 Function,一般重点使用 Lag 延迟、Drop 丢包。
在 Filtering 填入对应的 Command 后,设置 Functions,点击 Start 即可开始模拟。
同时可以在 Config.txt 中,预设一些 Presets 方便下次使用。
UE DS 中的使用
对于 UE的 DS 环境,首先为了具体到某一个 Client / DS,采用 Filter Port 的机制,对某个具体的端口号进行操作。
用 netstat -aon\Findstr 进程ID,查询 DS/Client 进程,通过 UDP 进行链接。
DS 的 port 一般可以在启动命令中找到 -port=17777;
Client 的 port 可以在 DS 的 Log 中,快速查询到对应与指定 Client 连接的对应端口号:
// DS.log
LogNet: NotifyAcceptedConnection: Name: TestMap, TimeStamp: 04/14/24 00:00:00, [UNetConnection] RemoteAddr: 127.0.0.1:58459, Name: IpConnection_0, Driver: GameNetDriver NetDriver_1, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: 127.0.0.1:58459, Name: IpConnection_0, Driver: GameNetDriver NetDriver_1, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
这里的 **58459** 也就是该 `Client` 的 `Connetcion` 对应的端口号。
在 `Filtering` 中填入对应的设置即可:
1. 关闭上行包:`udp and udp.SrcPort == 58459` ,设置 `Drop = 100%`
2. 关闭下行包:`udp and udp.DstPort == 58459`,设置 `Drop = 100%`



