Skip to content

negezor/hybrid-torrent-tracker

Repository files navigation

Build Status NPM version NPM downloads

Hybrid-Torrent-Tracker - This is a torrent tracker for Node.js with HTTP and UDP support based middleware.

📖 Documentation

Features

  1. Reliable. The library is written in TypeScript and covered by tests.
  2. Modern. The library comes with native ESM support
  3. Powerful. User-friendly interface for query processing (middleware)

Installation

Node.js 20.0.0 or newer is required

  • Using npm (recommended)
     npm i hybrid-torrent-tracker
  • Using Yarn
    yarn add hybrid-torrent-tracker
  • Using pnpm
    pnpm add hybrid-torrent-tracker

Example usage

import { TorrentTracker } from 'hybrid-torrent-tracker';

const tracker = new TorrentTracker({
	http: {
		port: 6881
	},
	udp: {
		port: 6881
	}
});

tracker.use((context, next) => {
	// Your logic
});

async function run() {
	await tracker.listen();

	console.log('Torrent tracker started');
}

run().catch(console.error);

Debug

Set environment DEBUG=hybrid-torrent-tracker:*