4 个版本 (1 个稳定版)

3.0.0-alpha.122024年8月13日
3.0.0-alpha.22023年10月15日
2.0.0-dev.12022年9月12日
1.0.0 2022年8月29日

#515 in Web 编程

45 星 & 5 关注者

AGPL-3.0-only

605KB
11K SLoC

Torrust Index

container_wf_b coverage_wf_b deployment_wf_b testing_wf_b labels_wf_b

Torrust Index 是一个针对 BitTorrent 文件的库。使用 Rust 语言Axum Web 框架编写。 此索引旨在尊重现有标准(包括正式和非正式的)。

这是一个 Torrust 项目,目前处于积极开发中。该项目由社区支持并由 Nautilus Cyberneering 赞助。

关于

BitTorrent索引的核心目的是维护一个数据库,将种子文件与有用的元数据连接起来。允许用户社区以组织良好和富有信息量的方式跟踪他们的种子。

Torrust索引作为我们Torrust索引GUI客户端高级API。它还连接到我们Torrust Tracker管理API,以提供统计和白名单功能。

Torrust Index Architecture

主要功能

  • 高质量的现代Rust代码库。
  • 由代码注释生成的文档
  • 全面的单元和功能测试套件
  • 繁忙条件下的良好性能。
  • 原生IPv4IPv6支持。
  • 持久的SQLite3MySQL数据库。

入门

升级

如果您正在使用Version 1torrust-tracker-backend,请参阅我们的升级指南

容器版本

Torrust索引已部署到DockerHub,您可以使用以下命令立即运行演示

Docker

docker run -it torrust/index:develop

有关更多信息,请阅读我们的容器指南

Podman

podman run -it torrust/index:develop

有关更多信息,请阅读我们的容器指南

开发版本

检出、测试和运行

# 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

定制

# 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

可选地,您可以选择将整个配置作为环境变量提供

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

对于部署,您应该使用环境变量覆盖以下内容:

  • 使用环境变量覆盖tracker_api_tokenindex_auth_secret_key
# 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

有关更详细的说明,请参阅我们的crate文档

服务

默认配置提供了以下服务

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

文档

贡献

我们很高兴支持并欢迎新成员加入我们的项目。请考虑我们的贡献指南
这是一个开源社区支持的项目。我们欢迎社区的贡献!

您如何贡献?

  • 错误报告和功能请求。
  • 代码贡献。您可以从查看标记为"good first issues"的问题开始。
  • 文档改进。检查文档API文档中的错别字、错误或缺失信息。
  • 参与社区。您可以在讨论中回答问题。

许可证

版权(c)2023 Torrust开发者。

本程序是免费软件:您可以在自由软件基金会发布的GNU Affero通用公共许可证的条款下重新分发和/或修改它,版本3。

本程序以希望它可能有用而分发,但没有任何保证;甚至没有关于其商业性或适用于特定目的的暗示性保证。有关详细信息,请参阅GNU Affero通用公共许可证

您应该已收到本程序的副本以及《GNU Affero通用公共许可证》。如果没有,请参阅https://gnu.ac.cn/licenses/

一些文件包含明确的版权声明和/或许可证声明。

旧版例外

为了繁荣,五周年以上的 Torrust Tracker 版本自动获得MIT-0许可证,以及现有的AGPL-3.0-only许可证。

贡献者协议

Torrust Tracker 的版权由相应的作者保留。

贡献者同意

Torrust-Tracker 项目没有版权转让协议。

我们恳请您花时间仔细考虑 The Torrust 项目贡献者协议

致谢

该项目是由Nautilus Cyberneering GmbHDutch Bits共同努力的成果。

依赖项

~68–105MB
~2M SLoC