Skip to content

[feature] upload/download rate limits#275

Merged
ikatson merged 10 commits intomainfrom
updown-ratelimits
Nov 20, 2024
Merged

[feature] upload/download rate limits#275
ikatson merged 10 commits intomainfrom
updown-ratelimits

Conversation

@ikatson
Copy link
Copy Markdown
Owner

@ikatson ikatson commented Nov 9, 2024

This works, but starts panicking in a while because of smth in leaky-bucket crate

@ikatson ikatson changed the title [feature] upload/download rate limits [feature] upload/download rate limits (address #256) Nov 9, 2024
@ikatson ikatson changed the title [feature] upload/download rate limits (address #256) [feature] upload/download rate limits Nov 9, 2024
let request = WriterRequest::ReadChunkRequest(chunk_info);
trace!("sending {:?}", &request);
Ok::<_, anyhow::Error>(self.tx.send(request)?)
self.state
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: when no limits, just upload straight without a channel

@ikatson ikatson marked this pull request as ready for review November 20, 2024 16:22
@ikatson
Copy link
Copy Markdown
Owner Author

ikatson commented Nov 20, 2024

It's not perfect, but should work alright.

Usage

CLI

rqbit --ratelimit-download 1000000 --ratelimit-upload 5000000 server start - this means limit download speed to "1 MBps, limit upload speed to 5 MBps"

HTTP API

curl -v -H 'Content-Type: application/json' --data-raw '{"download_bps": 1000000, "upload_bps": 5000000}' http://localhost:3030/torrents/limits

Desktop

Screenshot 2024-11-20 at 16 18 37

@ikatson ikatson merged commit 09c9659 into main Nov 20, 2024
@ikatson ikatson mentioned this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant