mochi

module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: BSD-2-Clause

README

Modified Chihaya (MoChi)

Build Status Docker Repository on Quay License

Modified version of Chihaya, an open source BitTorrent tracker written in Go.

Differences from the original project

  • Supports BittorrentV2 hashes (SHA-256 and hybrid SHA-256-to-160 BEP52, tested with qBittorrent);
  • Supports storage in middleware modules to persist useful data;
  • Supports KeyDB and PostgreSQL storages;
  • Metrics can be turned off (not enabled till it really needed);
  • Allows mixed peers: IPv4 requesters can fetch IPv6 peers or vice versa;
  • Contains some internal improvements.

Note: From time to time MoChi fetch modifications from Chihaya but is not fully compatible with original project (mainly in Redis storage structure), so it cannot be mixed with Chihaya (i.e. it is impossible create MoChi-Chihaya cluster).

Main goal

The main goal of made modifications is to create semi-private tracker like Hefur but with cluster support (allowed torrents limited by pre-existent list middleware and another directory middleware to limit registered torrents) and to maximize torrent swarm by providing maximum peers as possible (IPv4+IPv6).

Notice

Modifications made with particular purpose, so if you need pure tracker, with guaranteed stability, please, use the original project.

Developer(s) of this project (MoChi) do not declare themselves as authors of original project (Chihaya) and do not claim any other rights of original project.

Directories

Path Synopsis
Package bittorrent implements all of the abstractions used to decouple the protocol of a BitTorrent tracker from the logic of handling Announces and Scrapes.
Package bittorrent implements all of the abstractions used to decouple the protocol of a BitTorrent tracker from the logic of handling Announces and Scrapes.
cmd
mochi
Package main contains entry point logic of MoChi server
Package main contains entry point logic of MoChi server
mochi-e2e
Package main contains End-to-End MoChi check implementation.
Package main contains End-to-End MoChi check implementation.
Package frontend defines interface which should satisfy every network frontend
Package frontend defines interface which should satisfy every network frontend
http
Package http implements a BitTorrent frontend via the HTTP protocol as described in BEP 3 and BEP 23.
Package http implements a BitTorrent frontend via the HTTP protocol as described in BEP 3 and BEP 23.
udp
Package udp implements a BitTorrent tracker via the UDP protocol as described in BEP 15.
Package udp implements a BitTorrent tracker via the UDP protocol as described in BEP 15.
Package middleware implements the Logic interface by executing a series of middleware hooks.
Package middleware implements the Logic interface by executing a series of middleware hooks.
clientapproval
Package clientapproval XXX: implementation is broken, client ID is NOT 6 static bytes refer: - https://wiki.theory.org/BitTorrentSpecification#peer_id - https://github.com/webtorrent/bittorrent-peerid/blob/master/lib/utils.js
Package clientapproval XXX: implementation is broken, client ID is NOT 6 static bytes refer: - https://wiki.theory.org/BitTorrentSpecification#peer_id - https://github.com/webtorrent/bittorrent-peerid/blob/master/lib/utils.js
jwt
Package jwt implements a Hook that fails on Announce or Scrape if the client's request is missing a valid JSON Web Token.
Package jwt implements a Hook that fails on Announce or Scrape if the client's request is missing a valid JSON Web Token.
torrentapproval
Package torrentapproval implements a Hook that fails an Announce based on a whitelist or blacklist of torrent hash.
Package torrentapproval implements a Hook that fails an Announce based on a whitelist or blacklist of torrent hash.
torrentapproval/container
Package container contains interface and register used for torrent approval hash source
Package container contains interface and register used for torrent approval hash source
torrentapproval/container/directory
Package directory implements container which checks if hash present in any of torrent file placed in some directory.
Package directory implements container which checks if hash present in any of torrent file placed in some directory.
torrentapproval/container/list
Package list implements container with pre-defined list of torrent hashes from config file
Package list implements container with pre-defined list of torrent hashes from config file
varinterval
Package varinterval contains interval variation middleware
Package varinterval contains interval variation middleware
pkg
bytepool
Package bytepool defines pool for storing and reusing raw bytes
Package bytepool defines pool for storing and reusing raw bytes
conf
Package conf contains alias for map encoded configuration and structure unmarshaller
Package conf contains alias for map encoded configuration and structure unmarshaller
log
Package log adds a thin wrapper around zerolog to improve logging performance.
Package log adds a thin wrapper around zerolog to improve logging performance.
metrics
Package metrics implements a standalone HTTP server for serving pprof profiles and Prometheus metrics.
Package metrics implements a standalone HTTP server for serving pprof profiles and Prometheus metrics.
str2bytes
Package str2bytes provides fast, but unsafe functions to convert string to []byte or vice versa.
Package str2bytes provides fast, but unsafe functions to convert string to []byte or vice versa.
timecache
Package timecache provides a cache for the system clock, to avoid calls to time.Now().
Package timecache provides a cache for the system clock, to avoid calls to time.Now().
xorshift
Package xorshift contains functions for fast generating predictable pseudorandom numbers See https://prng.di.unimi.it .
Package xorshift contains functions for fast generating predictable pseudorandom numbers See https://prng.di.unimi.it .
Package storage contains prometheus specific globals, used by storages
Package storage contains prometheus specific globals, used by storages
keydb
Package keydb implements the storage interface.
Package keydb implements the storage interface.
memory
Package memory implements the storage interface for a Conf BitTorrent tracker keeping peer data in memory.
Package memory implements the storage interface for a Conf BitTorrent tracker keeping peer data in memory.
pg
Package pg implements PostgreSQL-like storage interface.
Package pg implements PostgreSQL-like storage interface.
redis
Package redis implements the storage interface.
Package redis implements the storage interface.
test
Package test contains storage benchmarks.
Package test contains storage benchmarks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL