Coder Social home page Coder Social logo

wt-tracker's Introduction

Build Status Coverage Status

wt-tracker

High-performance WebTorrent tracker.

WebTorrent tracker is a required component of WebTorrent and P2P Media Loader (peer-to-peer networks for web browsers) to do WebRTC signaling - exchanging connection data (i.e. SDP) 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 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

Build instructions

Node.js 10+ is required.

npm install
npm run build

Run instructions

./bin/wt-tracker [config.json]

or

node dist/run-uws-tracker.js [config.json]

or

npm start [config.json]

Configuration

See 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)
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.

wt-tracker's People

Contributors

mrlika avatar antonshchemelev avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.