All Projects → SamuelFisher → torrentcore

SamuelFisher / torrentcore

Licence: LGPL-3.0 License
BitTorrent for .NET Core

Programming Languages

C#
18002 projects
typescript
32286 projects

Projects that are alternatives of or similar to torrentcore

videostream
Video Streaming site using Laravel and WebTorrent
Stars: ✭ 36 (-58.14%)
Mutual labels:  bittorrent
go-libutp
Go wrapper of libutp reference uTP C implementation
Stars: ✭ 75 (-12.79%)
Mutual labels:  bittorrent
swarm-peer-server
🖧 A network swarm for creating secure P2P connections over BitTorrent DHT, DNS, and mDNS.
Stars: ✭ 41 (-52.33%)
Mutual labels:  bittorrent
MlDHT
MLDHT is an elixir package that provides a mainline DHT implementation according to BEP 05.
Stars: ✭ 88 (+2.33%)
Mutual labels:  bittorrent
ut pex
Implementation of ut_pex bittorrent protocol (PEX) for webtorrent
Stars: ✭ 54 (-37.21%)
Mutual labels:  bittorrent
CheckWebPeer
Check WebRTC peers of torrents.
Stars: ✭ 19 (-77.91%)
Mutual labels:  bittorrent
bencode
PHP Bencode (BitTorrent) Encoder/Decoder
Stars: ✭ 19 (-77.91%)
Mutual labels:  bittorrent
IPS-BitTracker
Bit Torrent Tracker application for IPS 4.5x Community Suite
Stars: ✭ 18 (-79.07%)
Mutual labels:  bittorrent
webtorrent-webui
Web user interface for Webtorrent, based on the Transmission web UI
Stars: ✭ 41 (-52.33%)
Mutual labels:  bittorrent
bencoder.pyx
A fast bencode implementation in Cython
Stars: ✭ 26 (-69.77%)
Mutual labels:  bittorrent
torrent-hound
Search torrents from multiple websites via the CLI
Stars: ✭ 28 (-67.44%)
Mutual labels:  bittorrent
autobrr
Automation for downloads.
Stars: ✭ 288 (+234.88%)
Mutual labels:  bittorrent
dottorrent-cli
Command-line tool for creating .torrent files, powered by dottorrent
Stars: ✭ 20 (-76.74%)
Mutual labels:  bittorrent
PeerflixServerZH
🚀 Peerflix Server(BT) 汉化、美化
Stars: ✭ 32 (-62.79%)
Mutual labels:  bittorrent
torrent-spider
基于DHT的p2p网络资源爬虫
Stars: ✭ 65 (-24.42%)
Mutual labels:  bittorrent
Katastrophe
Command Line Tool to download torrents
Stars: ✭ 85 (-1.16%)
Mutual labels:  bittorrent
uWebTorrentTracker
🔆 Simple, robust, WebTorrent tracker server implementation
Stars: ✭ 58 (-32.56%)
Mutual labels:  bittorrent
CuteTorrent
BitTorrent client based on libtorrent-rasterbar with user-friendly interface
Stars: ✭ 27 (-68.6%)
Mutual labels:  bittorrent
ocelot
Alternative compiled announcer (ocelot)
Stars: ✭ 14 (-83.72%)
Mutual labels:  bittorrent
I2P-in-Private-Browsing-Mode-Firefox
I2P in Private Browsing mode for Firefox, built using Webextensions and Contextual Identities
Stars: ✭ 31 (-63.95%)
Mutual labels:  bittorrent

TorrentCore

Build Status Build status NuGet

A BitTorrent library that runs on all platforms supporting .NET Standard 2.0.

Feature Progress

This project is currently work-in-progress and there are likely to be bugs and missing features.

  • Open .torrent files
  • Upload/download torrents
  • Contact HTTP trackers
  • Compact peer lists BEP 23
  • UDP trackers BEP 15
  • Peer ID conventions BEP 20
  • Multitracker metadata extension BEP 12
  • Extension protocol BEP 10
  • Peer exchange BEP 11
  • Extension for Peers to Send Metadata Files BEP 9
  • UPnP port forwarding
  • IPv6 trackers BEP 7
  • DHT for trackerless torrents BEP 5
  • uTorrent Transport Protocol BEP 29

Usage

TorrentCore is designed to be easy to use, while supporting more advanced features if required.

There are no stable releases yet, but you can reference TorrentCore from NuGet, or directly from AppVeyor. For more information, see getting started.

var client = TorrentClient.Create();
var download = client.Add("sintel.torrent",
                          @"C:\Downloads\sintel");
download.Start();
await download.WaitForDownloadCompletionAsync();

For more customisation of the TorrentClient, use TorrentClientBuilder:

var client = TorrentClientBuilder.CreateDefaultBuilder()
    .UsePort(8000)
    .Build();

See the examples directory for more in-depth examples.

Extensible and Modular

TorrentCore is designed to allow custom extensions to be added and parts of the built-in functionality to be swapped out. TorrentCore uses the same dependency injection framework as ASP.NET Core to make this possible. Below are some examples of the ways in which functionality can be added or changed.

The public interface for extensions is unstable and subject to change while TorrentCore is under pre-release development.

Custom Transport Protocol

TorrentCore includes built-in support for communicating with peers over TCP. You can add support for any custom communication protocol that is able to expose connections to peers as a System.IO.Stream. (Of course, protocols other than TCP and uTP are incompatible with other BitTorrent clients.)

For more information, see custom transport protocols.

The CustomTransportProtocol example demonstrates a custom transport protocol by sending data as files on disk without any use of TCP or sockets.

BitTorrent Extension Protocol

Custom BEP 10 message handlers can be provided by implementing an IExtensionProtocolMessageHandler. You can then register your custom extension message handler to handle custom message types.

For more information, see custom extension protocol messages.

Modules

Modules are a general-purpose low-level mechanism to add functionality by hooking into events. Examples of things that modules can do include:

  • Modify the connection handshake sent to peers
  • Add a new type of message
  • Send raw BitTorrent messages to peers
  • Override the behaviour of messages built into the BitTorrent protocol itself

Some of the core functionality is implemented through modules, including the core protocol messages and the BEP 10 extension protocol. For more information, see custom modules.

Pipeline Stages

When a torrent is started, it is managed by a number of sequential stages in a pipeline that take it from checking the existing downloaded data to seeding to other peers. New stages can be added to the pipeline and built-in stages can be swapped for custom implementations.

For more information, see pipeline stages.

Data Storage

The file data for torrents is usually stored on disk. TorrentCore includes mechanisms to store the data on disk and in-memory, but you can provide custom storage mechanisms by implementing an IFileHandler.

For more information, see data storage.

Piece Picking Algorithms

A custom algorithm for deciding which pieces to request from peers can be used by implementing an IPiecePicker.

For more information, see piece picking.

Web UI

Web UI is work in progress. Package not currently published.

TorrentCore includes an optional web UI that can be used for detailed monitoring of Torrent downloads. It does not provide any functionality to control downloads.

It can be enabled by referencing TorrentCore.Web and calling:

client.EnableWebUI();

This starts a web interface on http://localhost:5001/.

/webui-screenshot.png

Command-Line Client

In addition to a library, TorrentCore provides a basic command-line client for downloading torrents. Usage is as follows:

torrentcorecli --help

usage: torrentcorecli [-p <arg>] [-o <arg>] [-v] [--ui [arg]] [--]
                      <input>

    -p, --port <arg>      Port to listen for incoming connections on.
    -o, --output <arg>    Path to save downloaded files to.
    -v, --verbose         Show detailed logging information.
    --ui [arg]            Run a web UI, optionally specifying the port
                          to listen on (default: 5001).
    <input>               Path of torrent file to download.

Contributing

Contributions are welcome! Please submit a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].