我想直观地评估网页的几个互联网连接类型的响应时间(DSL,电缆,T1,拨号等),而我的浏览器和网络服务器是在同一局域网,甚至在同一台机器上。是否有任何简单的网络工具或浏览器插件来降低网络带宽,以模拟不同的现实连接场景。

对此我很感激。


当前回答

虚拟网

试试这个基于FreeBSD的VMWare映像。它还有一个很好的操作指南,完全免费,20分钟就能站起来。

更新:DummyNet现在也支持Linux, OSX和Windows

其他回答

如果你在为Windows Phone开发时需要模拟网络连接质量,你可以尝试一下Visual Studio内置的名为模拟仪表板的工具(更多详细信息请访问http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206952(v=vs.105).aspx):)

You can use the Simulation Dashboard in Visual Studio to test your app for these connection problems, and to help prevent users from encountering scenarios like the following: High-resolution music or videos stutter or freeze while streaming, or take a long time to download over a low-bandwidth connection. Calls to a web service fail with a timeout. The app crashes when no network is available. Data transfer does not resume when the network connection is lost and then restored. The user’s battery is drained by a streaming app that uses the network inefficiently. Mapping the user’s route is interrupted in a navigation app. ... In Visual Studio, on the Tools menu, open Simulation Dashboard. Find the network simulation section of the dashboard and check the Enable Network Simulation check box.

我正在恢复这个线程,因为我最近有同样的需要。 令人惊讶的是,我发现Fiddler可以通过自定义规则来做到这一点,并添加这一行oSession["response-涓滴-delay"] = "150";在onbeforresponse部分。

Fiddler真的很棒。

对于Linux和OSX系统,可以使用ipfw。

来自Quora (http://www.quora.com/What-is-the-best-tool-to-simulate-a-slow-internet-connection-on-a-Mac)

本质上是使用防火墙来限制所有网络数据:

定义一个规则,该规则使用管道重新路由来自任何源的所有流量 地址到任何目标地址,执行以下命令(作为 Root或使用sudo): $ ipfw添加管道1从任意到任意 配置此规则,将带宽限制为300Kbit/s,并强制 每次200ms的延迟: $ ipfw pipe 1配置bw 300Kbit/s delay 200ms 删除所有规则并恢复原来的网络连接: $ ipfw flush

你也可以尝试WANem,这是一个开源的广域网模拟器。您可以下载映像(ISO、Knoppix live CD)或VMWare虚拟设备。

如果你想要一个硬件解决方案,Netgear有一系列便宜的(50美元左右)交换机来限制带宽。Netgear Prosafe GS105E和类似的交换机值得研究。