o
|
o-O-o o--o o-o -o-
| | | | | | | |
o o o o--O o o o
|
o--o
Extensible bittorrent client. Built with webtorrent. Probably a bit buggy, as it's still an early prototype.
Install and usage
$ npm install mgnt -g$ mgnt [path] # default ~/torrents/
Quit with q
.
Extensions
ui
Provides a simple user interface.
list
Active transfer list.
input
Adds support for input (e.g. pasting torrents).
API
Core
core = path options/** * options: { * dht: Boolean|Object, * maxPeers: Number, * nodeId: String|Buffer, * peerId: String|Buffer, * rtcConfig: Object, * tracker: Boolean, * wrtc: Object * } **/
Both path
and options
are optional.
References to torrent
below refers to instances of webtorrent::torrent
.
core.path
Default torrent download path.
core.client
An instance of webtorrent
.
core.package
Contents of this module's package.json
.
core.download(id)
Add id
to client and begin downloading.
core.remove(id)
Remove id
from client.
core.seed(input, options)
Begins seeding input
.
core.extend(Extension)
Extend core with Extension
(has to be a class).
core.round(number, precision)
Rounds number
to precision
. Returns the number as a string.
core.destroy
Destroys the client and exits the process.
Events
add
core;
Emitted when a torrent
has been successfully added to the client.
download
core;
Emitted when a chunk of chunkSize
has been successfully downloaded from torrent
.
wire
core;
Emitted whenever a new peer is connected to torrent
. wire
is an instance of bittorrent-protocol
.
done
core;
Emitted when torrent
has finished downloading.
seed
core;
Emitted when torrent
has begun seeding.
error
core;
Emitted when an error
occurs with the client.
Contribute
If you want to contribute with an extension, create a git repository with your code and send me a link or submit a pull request.
See Extensions above for examples.