Skip to content

Releases: alanmcgovern/monotorrent

v1.0.24

12 Aug 22:43
Compare
Choose a tag to compare

General

  • Fixes an issue with Local Peer Discovery where the announce was being sent to the wrong endpoint.
  • Fixes a rare race condition when using encrypted connections which could sometimes cause two concurrent SendAsync calls to be made using the same IConnection.

v1.0.23

06 Jul 23:50
Compare
Choose a tag to compare

General

  • Fixed a bug where some connections and some piece pickers would not be correctly reset after changing from metadata downloading mode to regular mode.
  • Small memory improvements.
  • The user agent is guaranteed to be set for announce/scrape requests.

v1.0.22

26 May 21:51
Compare
Choose a tag to compare

General

  • Update the Mono.Nat and ReusableTasks dependency to the latest release.
  • Small performance improvement handling incoming connections.
  • Moved the HttpTracker code to use HttpClient instead of a plain old HttpWebRequest. This was mostly due to HttpWebRequest.Abort being buggy under .NET Core which caused some HttpTracker tests to fail.
  • If a magnet link is used to download a torrent, and the magent link specifies trackers, those trackers are stored in the generated torrent metadata for future use.
  • When in metadata downloading mode, the engine will no longer throw an exception if a BitfieldMessage is received from other peers. The impact of this bug was that metadata used to only be downloaded from seeders or leechers with 0% of the data downloaded. Now metadata can be downloaded from peers with partial data.

v1.0.21

24 Apr 15:08
Compare
Choose a tag to compare

General

  • Fixed an issue where incremental hashing mode could mix up data between two torrents.
  • Increase the minimum piece requests for a new peer from 2 to 8. A minimum of 128kB of queued data seems reasonable nowadays. This may help a little when higher latency connections are starting off, but should have negligible real-world impact.
  • Fixed an issue where PeerListener could go into an infinite loop and then fail.

v1.0.20

13 Apr 11:39
Compare
Choose a tag to compare

General

  • Applied a small fix to ExtendedHandshakeMessage to ensure the correct value for MaxRequests is sent. The new default is 192 requests, which corresponds to 3 megabytes of data. Bug discovered by @Jashik
  • A second small fix from @vlasenkoalexey to ensure partial seeding mode correctly updates to 'Downloading' status if files are no longer marked 'DoNotDownload'

v1.0.19

27 Mar 20:51
Compare
Choose a tag to compare

New Features

MonoTorrent now uses Mono.Nat to automatically forward ports it uses. This requires a compatible uPnP or NAT-PMP based router.

An example usage is:

var engine = new ClientEngine ();
engine.EnablePortForwardingAsync (CancellationToken.None);

The status of the port mappings can be checked using: engine.PortMappings

Bug fixes

  • Fixed several small issues in the unchoking algorithm and drastically improved test coverage.
  • Setting EngineSettings.UploadSlots = 0 is now correctly interpreted as 'Unlimited'.

v1.0.18

16 Mar 16:54
Compare
Choose a tag to compare

New Features

Added MonoTorrent.Streaming.StreamProvider. This class allows files in a torrent to be accessed using a readable and seekable Stream while the Torrent is still being downloaded. The Stream instance returned by StreamProvider.CreateStreamAsync uses a special PiecePicker so that it downloads data sequentially starting at the current Stream.Position. In other words - if you are streaming a video file you can seek to the middle of the file and MonoTorrent will immediately start downloading pieces from that point onwards.

An example usage is:

var engine = new ClientEngine ();
var provider = new StreamProvider (engine, downloadsPath, Torrent.Load (@"path\to\media.torrent"));
await provider.StartAsync ();
var httpStream = await provider.CreateHttpStreamAsync (provider.Manager.Torrent.Files[0]);
Process.Start (@"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe", httpStream.Uri.ToString ());

Bug fixes

  • Fixed an issue where calling TorrentManager.StopAsync could result in a NullReference being thrown. This should not result in any user visible issues, but could result in a Task with an unobserved Exception.

v1.0.17

09 Mar 00:55
Compare
Choose a tag to compare

General

  • Patch from @vlasenkoalexey to fix how uploaded protocol bytes are counted. Additional tests were added to ensure protocol and data bytes are correctly calculated for incoming and outgoing messages, for both the peers and TorrentManager itself.
  • Added a new simpler way to download .torrent metadata. Task<byte[]> ClientEngine.DownloadMetadataAsync (MagnetLink magnetLink, CancellationToken token). This will get peers from any trackers contained in the MagnetLink and it will also use the active Dht engine to locate additional peers.
  • Improved support for clients which randomise their PeerIds. Clients, such as uTorrent, can randomise their PeerId every time they make a new connection when they download a public torrent. MonoTorrent will no longer reject connections when the PeerId does not match as long as it's for a public torrent. Private torrents will continue to enforce that the PeerId sent to the tracker must be the same as the PeerId received in the HandshakeMessage.

v1.0.16

03 Mar 00:05
Compare
Choose a tag to compare

General

  • Hashing a torrent now exposes has a Progress property in the PieceHashedEventArgs. This takes files marked DoNotDownload into account.
  • Some optimisations in the BEncode class to make parsing faster and allocate less memory.
  • Unknown parameters are now ignored when parsing MagnetLinks.
  • Optimised allocations when invoking events asynchronously
  • Fixed a potential performance issue when hashing torrents with thousands of files. The per-file bitfield was updating using a linear search instead of a binary search.
  • Ensured that cryptographic operations run as part of connecting to a peer happen on a threadpool thread.
  • Ensured DNS looks for UdpTrackers happen on a threadpool thread.
  • MonoTorrent now announces to all tracker tiers concurrently.

v1.0.16-alpha

05 Feb 07:22
Compare
Choose a tag to compare
v1.0.16-alpha Pre-release
Pre-release

General

  • Integrated a way to allow media players to access media files contained within a torrent while the torrent is actively downloading. A TorrentFile can either be exposed as a standard System.IO.Stream as follows:
async Task<Stream> GetStreamAsync (TorrentManager manager, TorrentFile file)
{
    var provider = new StreamProvider(manager);
    return await provider.CreateStreamAsync(file);
}

Or it can be exposed over HTTP so that media players such as VLC can stream the content.

async Task<IUriStream> GetStreamAsync (TorrentManager manager, TorrentFile file)
{
    var provider = new StreamProvider(manager);
    return await provider.CreateHttpStreamAsync(file);
}

The Uri which should be passed to the external media player is stored on the IUriStream object.

Warning

This is still an alpha level feature and the API is subject to change.