我需要模拟到服务器的低带宽、高延迟连接,以模拟远程站点上VPN的条件。带宽和延迟应该是可调整的,这样我就可以发现最好的组合来运行我们的软件包。


当前回答

我一直在寻找一种易于使用的工具来进行这种类型的测试。前几天我偶然发现了这个:网络延迟模拟器

如果你用的是Windows系统,你应该试试。它超级容易设置和开始,而且似乎工作得很好。可以自定义各个方向的带宽、时延和丢包。另一个非常好的事情是,你可以定义“流量匹配条件”,这样它只影响你想要它的流量。是的,而且是免费的。

其他回答

查尔斯

我遇到了Charles web调试代理应用程序,并在模拟网络延迟方面取得了巨大的成功。它可以在Windows、Mac和Linux上运行。

Bandwidth throttle / Bandwidth simulator Charles can be used to adjust the bandwidth and latency of your Internet connection. This enables you to simulate modem conditions using your high-speed connection. The bandwidth may be throttled to any arbitrary bytes per second. This enables any connection speed to be simulated. The latency may also be set to any arbitrary number of milliseconds. The latency delay simulates the latency experienced on slower connections, that is the delay between making a request and the request being received at the other end.

虚拟网

您也可以使用vmware来运行BSD或Linux,并尝试本文(DummyNet)或本文。

我会尝试在linux上使用netem。有了它,你可以模拟额外的延迟、损坏、丢包和复制。它甚至可以用在环回设备上。

如果你在linux上,我发现流量控制程序对这类事情有很大的帮助。

对于macOS,有Network Link Conditioner可以模拟可配置的带宽、延迟和丢包。它包含在Xcode的附加工具包中。

我在我的Windows电脑上使用NetBalancer。

http://seriousbit.com/netbalancer/

2017-10-07更新:NetBalancer最新免费版本为9.2.7。该程序有一个硬编码的截止日期。在启动NetBalancer服务之前,您需要在2016-10-18之前调回系统时钟。详情请参阅本文。