Skip to content

AprilNEA/bitburn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitburn

A bandwidth burner written in Rust. Downloads files and discards the data — useful for consuming traffic quotas or stress-testing network throughput.

Install

cargo install --path .

Usage

# Run with defaults (4 concurrent downloads from built-in speedtest URLs)
bitburn

# Custom URLs, 8 workers, run for 60 seconds
bitburn -u https://example.com/big.bin -j 8 --duration 60

# Rate limit to 10 MB/s
bitburn --rate 10MB

# Pick 2 random URLs from the list, loop forever
bitburn -n 2 --random --loop

# Run as daemon with built-in cron (every hour, 5 min each)
bitburn --schedule "0 * * * *" --duration 300 --quiet

# Generate sample config
bitburn --init > ~/.config/bitburn/config.toml

Configuration

Config is loaded in layers (later overrides earlier):

TOML fileEnvironment variablesCLI arguments

Config file is auto-discovered from:

  1. ~/.config/bitburn/config.toml
  2. ./bitburn.toml

Or pass explicitly with --config path/to/config.toml.

url = [
    "http://speedtest.tele2.net/100MB.zip",
    "https://speed.hetzner.de/100MB.bin",
]

count = 0           # URLs per session (0 = all)
random = false      # Shuffle URL selection
concurrency = 4     # Parallel download workers
duration = 300      # Time limit in seconds (0 = unlimited)
loop = true         # Repeat after all URLs finish
# rate = "10MB"     # Rate limit (e.g. "500KB", "10MB")
# schedule = "0 * * * *"  # Cron expression (daemon mode)
quiet = false       # Suppress progress bars

Environment variables use the BITBURN_ prefix:

BITBURN_CONCURRENCY=8 BITBURN_DURATION=60 bitburn

CLI Options

Flag Description
-u, --url <URL> Download URL (repeatable)
-f, --url-file <PATH> Read URLs from text file (one per line)
-n, --count <N> Number of URLs to pick per session (0 = all)
--random Randomly pick URLs
-j, --concurrency <N> Parallel workers (default: 4)
-d, --duration <SECS> Time limit in seconds
-r, --rate <SIZE> Rate limit (e.g. 10MB, 500KB)
-l, --loop Repeat downloads indefinitely
-s, --schedule <CRON> Built-in cron schedule (daemon mode)
-q, --quiet No progress bars
-c, --config <PATH> Config file path
--init Print sample config to stdout

License

MIT

About

A bandwidth burn tool that downloads mirror files to saturate network links

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages