mafintosh / peerflix

Streaming torrent client for node.js
MIT License
6.18k stars 674 forks source link

[feature] Ability to control download/upload speed #197

Open mamboitaliano21 opened 9 years ago

mamboitaliano21 commented 9 years ago

Hi guys, I am just wondering if this feature can be implemented ? There has been a feature request on Pop Corn time and I was referred to peer flix

I willing to implement it and issue a PR but for now am I allowed to implement this feature/if anyone is interested in guiding me / anyone interested ?

I'm thinking of implementing it like something like this, Request object, then sleep for (second) (depends on what is the download speed) or maybe other sophisticated algorithm like leaky bucket algorithm?

Thanks !

watdafox commented 9 years ago

This might interrest you: https://github.com/mafintosh/peerflix/issues/29

dcerisano commented 9 years ago

Until this feature is implemented, you can always use a traffic shaper. Eg. on linux you can use wondershaper before running peerflix to limit both the upstream and downstream on your network interface.

Programs like trickle unfortunately don't work with forked nodejs processes like peerflix. This would be ideal since it allows per app per user limiting.

With all the streaming apps out there, this might be a good solution for people who want to limit their bandwidth footprint overall.