mika

command module
v0.0.0-...-da267cc Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 4 Imported by: 0

README

Mika - Bittorrent Tracker

Test Status Codacy Badge Maintainability Test Coverage Go Report Card GoDoc Lines of Code Discord chat

Mika is a torrent tracker written in the Go programming language.

It is designed exclusively for private tracker needs, chihaya is a more suitable choice for public trackers.

For the previous, 1.x code, see the legacy branch.

Documentation

The current documentation is within the docs folder. Keep in mind that these are currently either out of date with the current build, or referencing things that are not yet fully implemented.

Support & Discussion

There is currently a discord server setup for mika. You can join here.

Features (Planned)

A high level view of the features we integrate into the tracker. Some are fully implemented already, some are still in the works.

  • REST JSON API for interacting with the tracker on a separate authenticated port differing from the standard tracker port. This port is configured for TLS1.2+ only.

  • CLI for interacting with the running tracker ./mika client -h

  • Multiple storage backends which can be selected based on needs and system architecture. You can define completely different stores for the 3 types of backend interfaces we implement: Users, Torrents, Peers.

    • postgres A PostgreSQL 10+ backed store. We also use the PostGIS extension to store location data and perform geo queries.
    • mysql/mariadb A MySQL 5.1+ / MariaDB 10.1+ backed persistent storage backend. We use the POINT column for geospatial queries which is why we require these versions at minimum.
    • redis Redis provides an in-memory datastore which does get persisted to disk (if enabled in redis).
    • memory A simple in-memory storage which is not persisted anywhere.
    • custom You can easily add support for your own storage backends by implementing store.UserStore, store.PeerStore or store.TorrentStore interfaces as needed. PRs for new implementations welcomed.
  • IPv4 and IPv6 support with the ability to enable or disable the stacks. Note that v4 requests will only return v4 peers, same applies to v6.

  • Optional smarter peer selection strategies.

  • Either a single datastore read (which is cached, no future reads for the same resource made) or no database reads, depending on storage backends chosen on incoming announces/scrapes.

  • User bonus point system built into the tracker which is updated on each request instead of large batches.

  • Go / PHP based API Client examples. Contributions for other languages welcomed.

  • Client whitelists for only allowing specific torrent clients

  • Multi platform support. Should run on anything that go can target.

  • User authentication via passkey

  • Docker images for deployment

Some things we don't currently have plans to support:

  • Non-compact responses. There is no reason to use non-compact responses for a private tracker. All modern and usual whitelisted clients support it.
  • DHT bootstrapping node
  • Migrations from existing tracker systems

BEP Support

These are currently fully implemented BEPs:

  • BEP0003 The BitTorrent Protocol Specification
  • BEP0007 IPv6 Tracker Extension
  • BEP0020 Peer ID Conventions
  • BEP0021 Extension for partial seeds
  • BEP0023 Tracker Returns Compact Peer Lists
  • BEP0048 Tracker Protocol Extension: Scrape

Not currently planned, but maybe in the future:

  • BEP0008 Tracker Peer Obfuscation
  • BEP0024 Tracker Returns External IP
  • BEP0015 UDP Tracker Protocol for BitTorrent
  • BEP0041 UDP Tracker Protocol Extensions

Build Notes

The minimum required version of go for building from the source is 1.14+.

Usage

None, Don't use this yet.

Documentation

Overview

Copyright © 2020 Leigh MacDonald <leigh.macdonald@gmail.com>

Directories

Path Synopsis
Package geo provides the Lat/Long distance calculation functionality and GeoIP lookup functionality used to determine the best peers to use.
Package geo provides the Lat/Long distance calculation functionality and GeoIP lookup functionality used to determine the best peers to use.
Package store provides the underlying interfaces and glue for the backend storage drivers.
Package store provides the underlying interfaces and glue for the backend storage drivers.
mysql
Package mysql provides mysql/mariadb backed persistent storage NOTE this requires MySQL 8.0+ / MariaDB 10.5+ (maybe 10.4?) due to the POINT column type
Package mysql provides mysql/mariadb backed persistent storage NOTE this requires MySQL 8.0+ / MariaDB 10.5+ (maybe 10.4?) due to the POINT column type
postgres
Package postgres provides the backing store for postgresql TODO create domains for the uint types, eg: create domain uint64 as numeric(20,0);
Package postgres provides the backing store for postgresql TODO create domains for the uint types, eg: create domain uint64 as numeric(20,0);
Package tracker implements the public facing HTTP interfaces to the tracker.
Package tracker implements the public facing HTTP interfaces to the tracker.
Package util provides general utility functions shared by the other modules
Package util provides general utility functions shared by the other modules

Jump to

Keyboard shortcuts

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