Crapify 是一个代理服务器,用来模拟缓慢而且不稳定的 HTTP 网络连接,可以让你限制:
上传和下载速度
对外 HTTP 请求的并发连接数
使用方法:
npm install crapify -g
crapify --port=5000 --speed=3000 --concurrency=2, where:
crapify --port=5000 --speed=3000 --concurrency=2
port 侦听端口
port
speed 连接速率
speed
concurrency 并发连接数
concurrency
示例:
npm config set proxy http://127.0.0.1:5000
curl -v --proxy http://127.0.0.1:5000 https://www.google.com
Go to system preferences.
system preferences
Click on Network.
Network
Click on Advanced.
Advanced
Click on Proxies.
Proxies
Enable an http, and an https proxy, with 127.0.0.1, and :5000, respectively.
http
https
127.0.0.1
:5000