mistakster / throttle-proxy

Throttle HTTP/HTTPS/SOCKS proxy server
121 stars 24 forks source link

Provide speed presets #12

Open CashWilliams opened 8 years ago

CashWilliams commented 8 years ago

Would be nice feature to add some common speed presets, such as ones provided by Chrome

speeds

SassNinja commented 6 years ago

Some presets for the speed would be awesome!

SassNinja commented 5 years ago

@mistakster what do you think about this?

I might dig into the code and try to submit a PR. But I don't wanna waste my time if it never gets merged due to inactivity.

mistakster commented 5 years ago

Hi, @SassNinja. The project is active.

Sorry, I have no idea how the presets can significantly improve the DX. I'm happy to discuss and approve your PR if you are going to make it.

I think, the presets should modify existing options. So, all amends can be done in https://github.com/mistakster/throttle-proxy/blob/master/lib/args.js

SassNinja commented 5 years ago

Thanks for the quick reply! I'm glad to hear the project is still active :-) I'll create a PR once I've got a bit time.

Sorry, I have no idea how the presets can significantly improve the DX.

It's about avoiding to enter the exact speed values over and over again. The chrome dev tools are a good example: you can just pick the Fast 3G preset and don't need to care about anything else.

mistakster commented 5 years ago

Yeah, I see. But when you in CLI, you have to memorize all the names. And it's not clear how to deal with white space in the name of the preset.