package
µWebTorrentTracker - Simple, robust and lightweight WebTorrent tracker server implementation
npm install uwtGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.

Node.js implementation of a BitTorrent tracker for WebTorrent clients.
A BitTorrent tracker is a web service which responds to requests from BitTorrent clients. The requests include metrics from clients that help the tracker keep overall statistics about the torrent. The response includes a peer list that helps the client participate in the torrent swarm.
This module is used by βTorrent Tracker, the first community operated WebTorrent tracker.
/stats or JSON data at /stats.jsonnpm install uwtTo start a WebTorrent tracker server to track swarms of peers:
const Server = require('uwt')
const server = new Server({
stats: true, // enable web-based statistics? [default=true]
filter: function (infoHash, params, cb) {
// Blacklist/whitelist function for allowing/disallowing torrents. If this option is
// omitted, all torrents are allowed. It is possible to interface with a database or
// external system before deciding to allow/deny, because this function is async.
// It is possible to block by peer id (whitelisting torrent clients) or by secret
// key (private trackers). Full access to the original HTTP/UDP request parameters
// are available in `params`.
// This example only allows one torrent.
const allowed = (infoHash === 'aaa67059ed6bd08362da625b3ae77f6f4a075aaa')
if (allowed) {
cb(null)
}
Install uwt globally
$ npm install -g uwtEasily start a tracker server:
$ webtorrent-tracker
Tracker: ws://localhost:8000
Tracker stats: http://localhost:8000/statsLots of options:
$ webtorrent-tracker --help
webtorrent-tracker - Start a webtorrent tracker server
Usage:
webtorrent-tracker [OPTIONS]
Options:
-p, --port [number] change the port [default: 8000]
--trust-proxy trust 'x-forwarded-for' header from reverse proxy
--interval client announce interval (ms) [default: 120000]
--stats enable web-based statistics (default: true)
-q, --quiet only show error output
-s, --silent show no output
-v, --version print the
MIT
Copyright (c) Diego Rodríguez Baquero (uwt)
Copyright (c) Feross Aboukhadijeh (bittorrent-tracker)
Estimated unpacked size across 17 packages.
205.7 kB
Includes dependencies.
9 direct · 3 outdated
^3.0.0
3.1.0
^8.14.0
200.0.0
^4.1.0
4.4.3
^1.1.1
1.2.8
^1.0.2
1.1.9
^1.0.2
1.0.2