hybrid-torrent-tracker

Hybrid torrent tracker for Node.js

Usage no npm install needed!

<script type="module">
  import hybridTorrentTracker from 'https://cdn.skypack.dev/hybrid-torrent-tracker';
</script>

README

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

📖 Documentation

Features

  • User-friendly interface for query processing (middleware)
  • Predictable abstraction

Installation

Node.js 12.0.0 or newer is required

Yarn

Recommended

yarn add hybrid-torrent-tracker

NPM

npm install hybrid-torrent-tracker --save

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:*