Skip to content

FlorianSG/Torratio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torratio

Torratio is an HTTP proxy which automatically fakes upload/download ratio of any1 BitTorrent client.

If you just want to set it up, go to wiki/Installation for an easy step-by-step guide!

How does it work ?

Torratio works by modifying HTTP requests sent by your BitTorrent client to every torrent trackers:

def apply_fake_ratio(self, query):
    mem_id = query["info_hash"].hex()

    if "downloaded" in query:
        query["downloaded"] = 0

    if "left" in query:
        if query["left"] != 0:
            if "left" not in self.MEMORY[mem_id]:
                self.MEMORY[mem_id]["left"] = query["left"]
            else:
                query["left"] = self.MEMORY[mem_id]["left"]
  • The uploaded query field is sent as is.
  • The downloaded query field is set to 0 unconditionally.
  • The left query field value changes depending the state of the torrent.

While leeching (downloading) a torrent

If the left query field is not 0, the first value received from the client is recorded and sent as is. For the subsequent requests, and until received value is 0, the recorded value is sent.

This behavior can be seen as a stalled download from the tracker's point of view.

While seeding (uploading) a torrent

The left query field is 0 and sent as is.

Prerequisites

You will first need a supported version of Python 3 with pip.

Installation

python -m pip install https://github.com/FlorianSG/Torratio/archive/refs/heads/main.tar.gz

See wiki/Installation for more details about installation. See wiki/Setting-Up to configure your torrent client.

Usage

As a daemon

torratio -a 127.0.0.1 -p 9092

See wiki/Running_Torratio for more details about how to run Torratio daemon.

As a Python module

import torratio
torratio.daemon(listen_address = "localhost", listen_port = 8090)

See wiki/Python_API for more details about the API.

Contributing

If you want to improve this software, report a bug, or submit a new feature, go to wiki/Contributing

License

This software is licensed under the Open Software License. See LICENSE.txt for more detail.

Author and contact

Florian SARRAUTE-GILLY torratio@florian-sg.fr

On GitHub: https://github.com/FlorianSG/Torratio

Footnotes

  1. Torratio works with any BitTorrent compatible client allowing the use of an HTTP proxy for tracker requests. See wiki/Setting-Up for more details.

About

Torrent tracker ratio proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages