WebTorrent

From VuzeWiki
Jump to: navigation, search

WebTorrent allows direct browser-to-browser Bittorrent downloads by utilizing a WebSocket based tracker protocol and WebRTC peer connections. The peer-to-peer protocol is based directly on the Bittorrent protocol (once an RTC connection is established) while the tracker protocol flow is modified to allow the exchange of WebRTC offers and answers to facilitate the peer connection process.

Vuze uses a plugin to implement support for this, see http://plugins.vuze.com/details/azwebtorrent. This can be installed either automatically on detection of a WebTorrent tracker, or manually using the plugin installation wizard within Vuze.

For availability, see below.

WebTorrent Client

When you add a torrent to Vuze that uses a WebTorrent tracker you will be prompted to install the plugin - once complete there is nothing else that you need to do to be able to connect to WebTorrent peers.

Here is a test torrent that only includes WebTorrent trackers. It is the same torrent used by https://webtorrent.io/ but has the normal trackers and webseed removed for demonstration purposes. Note however that if you leave 'decentralized tracking' enabled for this then you will connect to 'classic' Bittorrent peers as well as WebTorrent ones.

WebTorrent Tracker

The plugin also contains a built-in WebTorrent tracker that you can configure if you want to create your own WebTorrent enabled downloads. See the plugin configuration page for the various options. If you want the tracker to be publicly available you will need to either obtain a static IP address (and preferably a domain to assign to it) or use a 'dynamic DNS' solution to ensure that your tracker is publicly available.

Alternatively you can use an open tracker. The following is a list of open WebTorrent trackers that can be used when creating torrents.

wss://tracker.openwebtorrent.com/

Download Enhancement

You can make an existing download available to WebTorrent peers by adding a WebTorrent tracker to it and then publishing either the modified download's Magnet URI or the modified Torrent file. The Library views have a right-click context menu item to add either your own WebTorrent tracker's URL (when configured), or the open trackers listed under the plugin configuration, to a download:

Webtorrent menu.png

Once done you will see the WebTorrent tracker URL in the Sources tab of the download.

You can then use a WebTorrent client such as βTorrent (https://btorrent.xyz/ - note, only WSS tracker URLs are supported) to download the file in your browser (for example)

Technical Details

Implementation

To leverage existing WebRTC implementations a dedicated instance of a Chromium browser is used. This 'bridge' mediates communication between Vuze and WebTorrent peers.

For the original implementation see https://webtorrent.io/

Availability

Support for this is introduced in Vuze 5701_B13+ and requires Java 7 or higher.

Windows, OSX (64-bit only) and Linux (32-bit and 64-bit) are supported.