Show HN:我用Elixir写了一个新的BitTorrent追踪器
Show HN: I wrote a new BitTorrent tracker in Elixir

原始链接: https://github.com/Dahrkael/ExTracker

ExTracker是一个高性能的BitTorrent追踪器,使用Elixir编写,旨在降低内存占用并实现零配置。它利用所有可用的核心并将数据存储在内存中,支持HTTPS和数据库备份。一个测试实例位于extracker.dahrkael.net:6969。 该项目仍在开发中,提供了核心追踪器功能,但缺乏诸如WebTorrent支持、全面的对等管理、高级指标和GeoIP集成等功能。 您可以直接从源代码运行ExTracker(需要Erlang和Elixir),使用`mix release`为Linux或Windows构建您自己的发行版,或使用提供的Docker镜像。可以使用`runtime.exs`或在使用Docker时使用环境变量进行配置。 开发正在进行中,欢迎提出功能建议。ExTracker 采用 Apache License 2.0 许可。

一位热衷于 Elixir 和 Go,并有 C++ 开发经验的开发者,出于提升技能的目的,用 Elixir 编写了一个新的 BitTorrent 追踪器作为个人项目。经过三个月的开发,该追踪器已准备好进行公开测试,并提供 Docker 镜像方便部署。作者认为,尽管 DHT 和 PEX 非常流行,并且近年来追踪器领域的开发进展有限(除了 Aquatic 和 Torrust),但追踪器,尤其是公共追踪器,仍然扮演着重要的角色。这个项目旨在提供一个现代化、更可靠的替代方案,以取代常用的开源追踪器。开发者计划继续添加可选功能,并鼓励追踪器运营者尝试使用。他幽默地提到,只有一个文件是“随性编码”的,其余部分都是手动编写的。
相关文章

原文

ExTracker The Bittorrent Tracker made in Elixir

CI CI CI

👷‍♂️This project is a Work In Progress. While not ready for full industrial usage it does work.
There is a testing instance running at extracker.dahrkael.net:6969 with all current features enabled (Live statistics).

Implementation Legend: 🔲 Not Yet 🔰 Partially ✅ Done ❌ Won't do

  • ✅ High performance (uses ALL the available cores, in-memory storage)
  • ✅ Low memory usage (~200MB of RAM for each 1.000.000 peers)
  • ✅ Zero setup (launch it and it just works)

Tracker-related BitTorrent Enhancement Proposals

Final and Active Process BEPs

  • ✅ HTTPS support
  • ✅ Database backups to disk
  • ❌ WebTorrent
  • 🔰 Infohash whitelist/blacklist
  • 🔰 Peer management (interval enforcement, cleanup, banning, etc)
  • 🔰 Metrics
  • 🔰 GeoIP support (statistics, peer restrictions)
  • Feel free to propose features in the Issues

There are 3 main ways of running ExTracker currently

Straight from source code

For this method to work you need to have Erlang and Elixir installed on your system

  • Clone the repository: git clone https://github.com/Dahrkael/ExTracker.git && cd ExTracker
  • If needed, modify the configuration in config/runtime.exs to fit your needs
  • run MIX_ENV=prod iex -S mix

Currently there are no official releases built (soon™️). You can however make your own and deploy it where needed:

  • Clone the repository: git clone https://github.com/Dahrkael/ExTracker.git && cd ExTracker
  • run MIX_ENV=prod mix release extracker for Linux or MIX_ENV=prod mix release extrackerw for Windows
  • Find the release files inside the _build/prod/rel/extracker folder (if its a different machine make sure the OS and architecture is the same!)
  • Copy the folder to its final destination
  • If needed, modify the configuration in releases/{VERSION}/runtime.exs to fit your needs
  • Run bin/extracker start

For this method you can directly run the available docker image: docker run ghcr.io/dahrkael/extracker:latest
or use it as part of docker-compose. Theres an example compose file available.

Note

Since modifying the runtime.exs file to tune the configuration inside the container is not easy you can also configure it using Environment Variables, see the example compose file for the complete list.

Copyright (c) Dahrkael <dahrkael at outlook dot com>
Distributed under the terms of the Apache License, Version 2.0. Please refer to the LICENSE file in the repository root directory for details.

联系我们 contact @ memedata.com