Skip to content

This repository serves as the backend for the Torrust Index project.

License

Notifications You must be signed in to change notification settings

josecelano/torrust-index

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torrust Index

container_wf_b coverage_wf_b deployment_wf_b testing_wf_b labels_wf_b

Torrust Index is a library for BitTorrent Files. Written in Rust Language with the Axum web framework. This index aims to be respectful to established standards, (both formal and otherwise).

This is a Torrust project and is in active development. It is community supported as well as sponsored by Nautilus Cyberneering.

About

The core purpose of a BitTorrent Index is to maintain a database that connects torrent files with useful metadata. Allowing a community of users to keep track of their torrents in a well-organized and informative manner.

The Torrust Index serves as a high-level API for our Torrust Index GUI client. It also connects to the management api of our Torrust Tracker, to provide statistics and whitelisting functionally.

Torrust Index Architecture

Key Features

  • High Quality and Modern Rust Codebase.
  • Documentation Generated from Code Comments.
  • Comprehensive Suit of Unit and Functional Tests.
  • Good Performance in Busy Conditions.
  • Native IPv4 and IPv6 support.
  • Persistent SQLite3 or MySQL Databases.

Getting Started

Upgrading

If you are using Version 1 of torrust-tracker-backend, please view our upgrading guide.

Container Version

The Torrust Index is deployed to DockerHub, you can run a demo immediately with the following commands:

Docker

docker run -it torrust/index:develop

Please read our container guide for more information.

Podman

podman run -it torrust/index:develop

Please read our container guide for more information.

Development Version

Checkout, Test and Run:

# Checkout repository into a new folder:
git clone https://github.com/torrust/torrust-index.git

# Change into directory and create a empty database file:
cd torrust-index
mkdir -p ./storage/index/lib/database/
touch ./storage/index/lib/database/sqlite3.db

# Check all tests in application:
cargo test --tests --benches --examples --workspace --all-targets --all-features

# Run the index:
cargo run

Customization

# Copy the default configuration into the standard location:
mkdir -p ./storage/index/etc/
cp ./share/default/config/index.development.sqlite3.toml ./storage/index/etc/index.toml

# Customize the index configuration (for example):
vim ./storage/index/etc/index.toml

# Run the index with the updated configuration:
TORRUST_INDEX_PATH_CONFIG="./storage/index/etc/index.toml" cargo run

Optionally, you may choose to supply the entire configuration as an environmental variable:

# Use a configuration supplied on an environmental variable:
TORRUST_INDEX_CONFIG=$(cat "./storage/index/etc/index.toml") cargo run

_For deployment, you should override:

  • The tracker_api_token and the index_auth_secret_key by using environmental variables:_
# Please use the secret that you generated for the torrust-tracker configuration.
# Override secret in configuration using an environmental variable
TORRUST_INDEX_CONFIG=$(cat "./storage/index/etc/index.toml") \
  TORRUST_INDEX_TRACKER_API_TOKEN=$(cat "./storage/tracker/lib/tracker_api_admin_token.secret") \
  TORRUST_INDEX_AUTH_SECRET_KEY="MaxVerstappenWC2021" \
  cargo run

Please view our crate documentation for more detailed instructions.

Services

The following services are provided by the default configuration:

  • API
    • http://127.0.0.1:3001/.

Documentation

Contributing

We are happy to support and welcome new people to our project. Please consider our contributor guide.
This is an open-source community-supported project. We welcome contributions from the community!

How can you contribute?

  • Bug reports and feature requests.
  • Code contributions. You can start by looking at the issues labeled "good first issues".
  • Documentation improvements. Check the documentation and API documentation for typos, errors, or missing information.
  • Participation in the community. You can help by answering questions in the discussions.

License

Copyright (c) 2023 The Torrust Developers.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Some files include explicit copyright notices and/or license notices.

Legacy Exception

For prosperity, versions of Torrust Tracker that are older than five years are automatically granted the MIT-0 license in addition to the existing AGPL-3.0-only license.

Contributor Agreement

The copyright of the Torrust Tracker is retained by the respective authors.

Contributors agree that:

The Torrust-Tracker project has no copyright assignment agreement.

We kindly ask you to take time and consider The Torrust Project Contributor Agreement in full.

Acknowledgments

This project was a joint effort by Nautilus Cyberneering GmbH and Dutch Bits.

About

This repository serves as the backend for the Torrust Index project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 96.1%
  • Shell 1.7%
  • HTML 1.1%
  • Other 1.1%