Skip Navigation

torrentz2 (tz2) - advanced .torrent file utility

codeberg.org

torrentz2

Been working on this the past couple months as an exercise in learning Rust. Just wanted to share how it's come so far!

torrentz2 (tz2) is an advanced, experimental utility for working with .torrent metadata files. It supports a wide array of BEPs and v1/v2/hybrid formats.

Features

  • Create, Edit, or Verify torrent files
  • Convenient config file to define default options and trackers
  • Multithreaded hashing
  • Include/exclude files based on globs and if they are symlinks
  • Create a single torrent file from disparate input paths, provided they share a common root
  • Intelligent automatic piece size selection with support for up to 64 MiB
  • Digitally sign/verify embedded signatures with standard X.509 certificates utilizing RSA or EC signatures
    • Includes utility command to generate an appropriate root CA and leaf cert
  • Optionally include md5 or sha1 sums per-file with v1 torrents

Optional Features

  • CPU hardware accelerated hashing (on by default)
  • GPU accelerated hashing (coming soon, maybe hopefully)
  • Compile to a static binary

Why another utility like this? Well, there wasn't one that met my requirements. That is, feature rich, oriented towards PT users, and supporting the v2 format. It's also, as far as I can tell, the only modern utility supporting the draft BEP 0035 (Torrent Signing). I intend to make use of this in a future project.

Right now all the main features are implemented, except the planned GPU hashing. Once I've had some more time to polish it up and write documentation, I intend to publish on crates.io. For now, if you'd like to try it out you can build from source, or I have some builds for x86_64 Linux available in the repo.

4 comments