Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Novage/wt-tracker
High-performance WebTorrent tracker
https://github.com/Novage/wt-tracker
bittorrent bittorrent-tracker p2p p2p-media-loader p2p-network peer-to-peer torrent tracker webrtc websockets webtorrent
Last synced: 9 days ago
JSON representation
High-performance WebTorrent tracker
- Host: GitHub
- URL: https://github.com/Novage/wt-tracker
- Owner: Novage
- License: apache-2.0
- Created: 2019-02-27T08:33:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-18T11:37:12.000Z (about 2 months ago)
- Last Synced: 2024-09-18T16:30:30.890Z (about 2 months ago)
- Topics: bittorrent, bittorrent-tracker, p2p, p2p-media-loader, p2p-network, peer-to-peer, torrent, tracker, webrtc, websockets, webtorrent
- Language: TypeScript
- Homepage:
- Size: 433 KB
- Stars: 248
- Watchers: 21
- Forks: 86
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/Novage/wt-tracker/actions/workflows/main.yml/badge.svg)](https://github.com/Novage/wt-tracker/actions/workflows/main.yml)
[![Coverage Status](https://coveralls.io/repos/github/Novage/wt-tracker/badge.svg?branch=main)](https://coveralls.io/github/Novage/wt-tracker?branch=main)# wt-tracker
High-performance WebTorrent tracker.
WebTorrent tracker is a required component of [WebTorrent](https://github.com/webtorrent/webtorrent) and [P2P Media Loader](https://github.com/Novage/p2p-media-loader) (peer-to-peer networks for web browsers) to do [WebRTC](https://en.wikipedia.org/wiki/WebRTC) signaling - exchanging connection data (i.e. [SDP](https://en.wikipedia.org/wiki/Session_Description_Protocol)) between peers - joining them into swarms.
## Features
- handles more than 40k WebSocket Secure (HTTPS) peers on a VPS with only 2 GiB memory and 1 virtual CPU thanks to [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) I/O backend and perfomance optimizations in the code
- handles ws:// (HTTP) and wss:// (HTTPS) connections simultaneously
- IPv4 and IPv6 support
- robust and well-tested: CI, unit tests, static code analyzis, 100% TypeScript
- supports tracker "scrape" extension
- statistics under /stats.json URL## Related projects
- [P2P Media Loader](https://github.com/Novage/p2p-media-loader) - an open-source engine for P2P streaming of live and on demand video directly in a web browser HTML page
- [Novage, LLC](https://novage.com.ua/) - P2P development, support & consulting
- [WebTorrent](https://github.com/webtorrent/webtorrent) - streaming torrent client for the web https://webtorrent.io
- [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) - the Node.js bindings to µWebSockets, one of the most efficient web servers available## Build instructions
Node.js 16+ is required.
```sh
npm install
npm run build
```## Run instructions
```sh
./bin/wt-tracker [config.json]
```or
```sh
node lib/run-uws-tracker.js [config.json]
```or
```sh
npm start [config.json]
```## Configuration
See [config.json](sample/config.json)
| Name | Type | Description |
| ----------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| servers.websockets.path | string | URL pattern for the WebSockets endpoint |
| servers.websockets.maxPayloadLength | number | The maximum length of received message |
| servers.websockets.midleTimeout | number | The maximum amount of seconds that may pass without sending or getting a message. Being idle for more than this, and the connection is severed. |
| servers.websockets.compression | 0,1,2 | 0 = no compression, 1 = shared compressor, 2 = dedicated compressor (see [details](https://github.com/uNetworking/uWebSockets/blob/master/misc/READMORE.md#settings)) |
| servers.websockets.maxConnections | number | The maximum number of WebSocket connections. 0 = no limit. |
| tracker.maxOffers | number | The maximum number of client's WebRTC SDP offers that are processed |
| tracker.announceInterval | number | Desired announce interval in seconds required from the clients |## Index HTML page
You can specify a content of the index page by creating `index.html` file in the working directory.