寻找替代解决方案而不是IPFW来减缓互联网连接 [英] looking for alternative solution than IPFW for slowing down an internet connection

查看:115
本文介绍了寻找替代解决方案而不是IPFW来减缓互联网连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要减速(模拟坏)互联网连接,我找到了一些文档,它是通过ipfw pipe命令实现的,事情是在最新的MAC OS版本中,ipfw被弃用(并删除)......

I need to slow down (simulate bad) internet connection, I found some documentation where it was achieved by "ipfw pipe" command , the thing is that in latest MAC OS versions , ipfw was deprecated (and removed)...

我想知道是否有替代ipfw API的方法?
有谁知道最新的网络链接调节器如何实现它?

I was wondering if there are any alternative to the ipfw API ? Does anyone know how latest Network Link Conditioner achieves it?

以前的原始方式可以减慢互联网连接速度:

The original previous way which enabled to slow down an internet connection :

sudo ipfw pipe 1 config bw 56Kbit/s delay 200 plr 0.2

并清除管道:

sudo ipfw delete 1

谢谢。

推荐答案

我不太了解Mac OS(我自己使用Linux),但我会给它一个机会。

I don't know much about Mac OS (I use Linux myself), but I'll give this a shot.

一堆挖掘确定 ipfw 似乎不可用。

A bunch of digging established that ipfw seems unavailable, as you say.

我也无法从命令行找到使用网络链接调节器的方法。一切都应该可以从命令行使用,所以这是愚蠢的。

I was also unable to find a way to use the Network Link Conditioner from the command line. Everything should be usable from the command line, so that's stupid.

一个解决方法是尝试从AppleScript中访问NLC。以下内容将帮助您开始切换NLC:

One work around would be to try to access the NLC from within AppleScript. The following will get you started on toggling the NLC:

property thePane : "com.apple.Network-Link-Conditioner"  
tell application "System Preferences"  
activate  
  set the current pane to pane id thePane  
--delay 2  
end tell  
---  
tell application "System Events"  
  tell application process "System Preferences"  
  try  
  click ((checkboxes of window "Network Link Conditioner") whose description is "enable switch")  
  on error  
  click ((checkboxes of window "Network Link Conditioner") whose description is "enable switch")  
  end try  
  end tell  
end tell  

我认为您可以使用 osascript< SCRIPT>

作为替代方案, Charles Proxy 是一个付费使用程序,可以用来执行限制,只要你可以说服您正在测试的软件连接到代理的端口而不是直接连接到互联网。也许那里有免费的代理解决方案?

As an alternative, Charles Proxy is a pay-to-use program that can be used to perform throttling, provided you can convince the software you are testing to connect to the proxy's port rather than directly to the internet. Maybe there are free proxy solutions out there somewhere?

也许Squid会在这方面发挥作用。 SquidMan 似乎是一种为Mac安装它的简单方法。它看起来好像是 DelayPools 客户端带宽限制可能对模拟低速连接很有用,但我找不到人们使用它们的证据。

Perhaps Squid would work in that regard. SquidMan seems to be an easy-ish way to install it for Mac. It looks as though DelayPools and or Client Bandwidth Limits might be useful for simulating a low speed connection, though I can't find evidence of people having used them for such.

这篇关于寻找替代解决方案而不是IPFW来减缓互联网连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆