Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/alanmcgovern/monotorrent

The official repository for MonoTorrent, a bittorrent library for .NET
https://github.com/alanmcgovern/monotorrent

Update TorrentCreator to create V2 torrents

Delete all the bespoke hashing logic and replace it with
DiskManager.GetHashAsync.

DiskManager ...

a9d93708d2e7e16981dcc01edfd8ba63c85c6934 authored over 2 years ago by Alan McGovern <[email protected]>
[piecewriter] Add a cache policy so reads can be cached

This will be useful when creating torrents. In this scenario
we want to be able to read a piece ...

8ee82edc9a44b1341b7c1afe43f283533f8f862d authored over 2 years ago by Alan McGovern <[email protected]>
[webseed] Make some timeouts configurable

Increase some timeouts as some web servers, specifically some
from internet archive, take longer...

35c1c437b00a9ed3117ccf9800e97cbbcc717c90 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Use const instead of static readonly

These are internal variables so there's no concern about
exposing consts as public API.

There w...

052a0e808e1bb2b4558058c02663a4381ccc1972 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Add a validation to ensure PieceIndex is always positive

Error out if this is ever negative.

cc8273e89883d5cb6d1f9130a4d132b3718273cc authored over 2 years ago by alan.mcgovern <[email protected]>
[bep47] Account for padding when loading padded torrents

b9bbb7a9f53935214a179276657d32efd2dc674c authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Fix some final bugs with hashing v2 torrents

The bep52 spec is woefully unclear about what happens when a
file is a lot smaller than the piec...

ea832220ea2227c30751bf8baa5fc0f0f5c1d5b5 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Small optimisation for bundled messages

HaveBundle and RequestBundle are cached/reused, so we should just
instantiate a HaveMessage/Requ...

c754f1a0406af1592817217be1695ebdf7430403 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Port hashes and metadatamode to IPiecePicker

The engine now uses the exact same logic for 'picking'
bittorrent v2 hashes, fetching the metada...

b73d3dd718cc44e441701db8769e5f3a4001a910 authored over 2 years ago by alan.mcgovern <[email protected]>
Pick anything, everywhere, all of the time!

Move piece picker so it relies on two things.
1) The concept of a 'Piece'. Each piece is a thing...

d3bf8213a23dd887acdad4ff714a6ec14beaaa29 authored over 2 years ago by alan.mcgovern <[email protected]>
[bep52] Filter out torrents with only 1 piece

When fetching hashes from other peers, we'll never need to request
hashes for files which have o...

fa5c1223889eb0dd27e83fdfac5fdd2e3c647130 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] When requesting metadata, check V1 and V2 hashes

If we are downloading a V2 only torrent we will only have
the V2 infohash in the engine, as such...

f93e60f20a925d6e0cfadf3689b6f8e67833bd59 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Pass the correct subset of the buffer for the proof layers

Missing a conversion from index -> bytelength here.

9c370024a2b615e2dfd6b383e2c2d368f1a4aefe authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Add a helper method for tests

5526963b38dec4977204529f7666090704af9fb2 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Reinitialize the piece picker before changing mode

This ensures Modes never see a potentially incorrect picker.

f0e3516f522338843e3fd77d386444492e1d6bb4 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Add equality impls for MerkleRoot

ded8b36d1e4b5309f528f325054445e621610eef authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Work with hash indices, not byte offsets

This is a bit easier to reason through for most of the math.

8956ddd09020404f25f61c0dca55f74155117d2f authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Add merkle tree support

Add the core classes used to create and operate merkle trees
This would've been better as a seri...

9060b5dcf3c34e0bbe8adc6327cc93a3f00cd627 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Remove junk from the csproj

Oops?

777e1ab73758679f0c142fd426182f8be7d05f36 authored over 2 years ago by alan.mcgovern <[email protected]>
[core] ifdef fallback methods to just .net 4.7.2

c14cdd02f58b638510e98faf425459e707c8084c authored over 2 years ago by alan.mcgovern <[email protected]>
[core] Single file torrents need the correct end piece index

t

6432900ec137d294d2d7bd83bb529f88f465887b authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #526 from jpmikkers/bep0047

bep47

c17222899a45b2def535225c3bdb7b18d1452aba authored over 2 years ago by Alan McGovern <[email protected]>
[bep47] Fix padding when file length == piecelength

09345a0d7c088f30e898e514e37f91d631ce41f2 authored over 2 years ago by Alan McGovern <[email protected]>
[bep52] Fix an off-by-one calculation in end piece index

Whoops :) Tests are always important!

96fa486754adaebbf6217df4a90ca2aafb433e24 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Apply standard formatting to all files

8dee08b6303d36e354dea2a55ca0cc5b7bb5ccce authored over 2 years ago by Alan McGovern <[email protected]>
Merge branch 'alanmcgovern:master' into bep0047

e043c938dce1a464c525120be64037eba5a54c1b authored over 2 years ago by Jean-Paul Mikkers <[email protected]>
do md5sum for padding files

017a9eba03f7f2c717938a49ead597b750ed4899 authored over 2 years ago by jpmikkers <[email protected]>
[core] Fix MD5 hashing

This will unblock bep 0047 from merging as md5 hashes are computed
correctly now.

The sha sums ...

527d3c1d7b52e6220efc62dfa48e2910fea724a8 authored over 2 years ago by Alan McGovern <[email protected]>
[client] Fix a null warning

70ce1d049b4f084a704982cc49820c5f5775555d authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #527 from alanmcgovern/bep52-hashes

Add the beginnings of a 'FetchHashes' mode.

a0e4aa8381bfb4ab83ad5c7017d8c923ac6b1652 authored over 2 years ago by Alan McGovern <[email protected]>
Add the beginnings of a 'FetchHashes' mode.

There's some cleanup for this PR already, but the gist of it is.

1) The torrent metadata is no ...

c0c094d9c3069b77f901c5d8f96c67f3d27fa5c7 authored over 2 years ago by Alan McGovern <[email protected]>
[tests] Fix a bug getting an unused port

Don't reinstantiate the Random or it'll choose the
same port repeatedly because it's seeded from...

ceb249e7af3fa4b518fc54a150bd91a9b63f19aa authored over 2 years ago by Alan McGovern <[email protected]>
Merge branch 'alanmcgovern:master' into bep0047

af4b6b2aec4269201167f19b800fa904b6c9caff authored over 2 years ago by Jean-Paul Mikkers <[email protected]>
Maintain the invariant that empty files are part of the same piece

as the previous file in the torrent.

Ensures empty files at the end of a torrent are never the o...

5a4ad14bdbeeaa7d01b767df41f1781ff93c34cc authored over 2 years ago by Alan McGovern <[email protected]>
copy over the pieces root hash too

4c3d77cbbfe3275bd49a2558256be18de513f946 authored over 2 years ago by Alan McGovern <[email protected]>
[piecepicking] Allow configuring piecepickers

Simplify the way different pickers are enabled/disabled. The engine will
now create a standard p...

702286509808fdb750eb33bf61d83d1e2dc20a50 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Cache wrappers as originally intended

Whoops :)

7cd38d10c74aff02c5f2b247fca896889b7caeea authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #531 from alanmcgovern/readonlybitfield

[core] Better read-only bitfield support

a650bacefee854c26daef0795f586a237b8d2361 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Better read-only bitfield support

By having 'MutableBitfield' be a subclass of 'BitField' it's possible
for users of the library t...

6ccac025ef1998b08fb2aada96f605fe43f11650 authored over 2 years ago by Alan McGovern <[email protected]>
md5sum test.

Fails because md5sum isn't present in the torrent

c4845e20ce24b8988a309648fc072c020845bcb5 authored over 2 years ago by jpmikkers <[email protected]>
[core] Fast-path the 'NAnd' method

We can fast path some things here which may slightly improve the
performance of this code at run...

6864555b690eec83e45f34077ae8182f832a5a44 authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #530 from alanmcgovern/handle-missing-v2-piece-hashes

[bep52] Ensure nothing is downloaded before piece hashes are available

34ae67cd40843eeffd96e907517c80f8b2a285af authored over 2 years ago by Alan McGovern <[email protected]>
[bep52] Ensure nothing is downloaded before piece hashes are available

The addition of this bitfield ensures no pieces are downloaded by the
engine until V2 piece hash...

3bb072310c788cda8575ccf04f8ec77b900fa0ed authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #529 from alanmcgovern/bep-52-create-piecehashes-dynamically

[bep52] Modify the API to support dynamically retrieving Bep52 hashes

5bce6963365accf338a3030a88a14b2cdf632a93 authored over 2 years ago by Alan McGovern <[email protected]>
[bep52] Handle when both v1 and v2 hashes are missing

We should treat this as having no hash data, and ensure
'isvalid' always returns false. This sho...

0757602fc00931393677e38c68355eb1a64b7267 authored over 2 years ago by Alan McGovern <[email protected]>
[bep52] Modify the API to support dynamically retrieving Bep52 hashes

The torrent metadata is no longer the source of truth for piece
hashes. Piece hashes are optiona...

dcece5dee6228ae47048d547e892a00712d805b3 authored over 2 years ago by Alan McGovern <[email protected]>
Hybrid loading and validation

e927d6e58bcb3dc4bbbf287f5b5b832cec5a75ec authored over 2 years ago by jpmikkers <[email protected]>
TorrentFileTuple to internal

002708a4220eb4c2d2b6d950c35d5bdae7712184 authored over 2 years ago by jpmikkers <[email protected]>
Detect and reject pathological padding cases

d11dfef5ae5403877eb84b4454988647e6332873 authored over 2 years ago by jpmikkers <[email protected]>
IPieceWriter implementations should only have to worry about non-padded read/writes

9c169c71f0a2bed1993a48307b44f79037420719 authored over 2 years ago by jpmikkers <[email protected]>
Empty files don't need padding

d4b7bf8a43709218867cb4b0be28539550886dac authored over 2 years ago by jpmikkers <[email protected]>
Try to fix hashing for padded files

022aa32a396ca50aaf9514eed77448285955a91f authored over 2 years ago by jpmikkers <[email protected]>
Correct padding property documentation

091e4039d91507dbfa7e427025c6ff506bf235e5 authored over 2 years ago by jpmikkers <[email protected]>
make padding files invisible to the higher layers, hashing not correct yet

d4e9d7a9332ac39f500f9d91a31f383d961c7ea0 authored over 2 years ago by jpmikkers <[email protected]>
Don't pad the last file

19e15bebbb0879f9ce6223b14c2b707aea232c6d authored over 2 years ago by jpmikkers <[email protected]>
Also test pad file path

3494a02ad1d8a0ace46da7720127f4ddb15391d9 authored over 2 years ago by jpmikkers <[email protected]>
Faster way to zero out padding buffers

476c5f59b931c836cac4b5d40f9eb70d8274576a authored over 2 years ago by jpmikkers <[email protected]>
Fix pad length calculation and unit test

4035c26d63b7f63621123b17bf8d8dccac74a458 authored over 2 years ago by jpmikkers <[email protected]>
WIP: poking at bep0047

eddd97b4ebd9e374d857fcc84f2428e5493a4001 authored over 2 years ago by jpmikkers <[email protected]>
Fix the repository url

48778b785842108945cf2db5ac818bc6c3afa63c authored over 2 years ago by Alan McGovern <[email protected]>
[client] Add a test for hybrid torrents

This test covers the fix merged as part of
ed563b6da29a01d2a7deb5096d2db2f5460c75b9

1abc8dd0dcc17d852dc27245f1750890d169fae5 authored over 2 years ago by Alan McGovern <[email protected]>
[client] Truncate V2 hashes when announcing to trackers

5f554dbfb054c817afea6aaae73375c36970cd1d authored over 2 years ago by Alan McGovern <[email protected]>
[core] Load hybrid torrents correctly

Hybrid torrents aren't fully supported (yet). To support these the
engine will load them as eith...

ed563b6da29a01d2a7deb5096d2db2f5460c75b9 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Clean up some unusual API

piece length is only available when the torrent metadata has been
loaded, so don't expose it on ...

022c5a9fa3c7f746c152bf6cd3086211e3d317c9 authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #521 from jpmikkers/v2magnetlink

V2 only magnetlink support

1eff6105f75aba8fb35beaf9997aa2170b74ba9b authored over 2 years ago by Alan McGovern <[email protected]>
small code style fix

5827f9dfe1fb409b8df38cb270edd245d2d822b4 authored over 2 years ago by jpmikkers <[email protected]>
dedupe hex string conversion

798b080e0deab7be1e68b040c4a850a184833f86 authored over 2 years ago by jpmikkers <[email protected]>
Handle multihash and hybrid magnet links

ac8bb0b3548bb6417d6ff4f35507d6866ef67dcd authored over 2 years ago by jpmikkers <[email protected]>
[core] Some misc API renames

Consolidate on 'DownloadRate' and 'UploadRate' for everything to
do with sending/receiving data.

03027ca84316e0af69ffd358a4e6de198231cbbe authored over 2 years ago by Alan McGovern <[email protected]>
[core] Make saving/loading fastresume data async operations

This is a bit more threadsafe. While it is usually automatically
handled by ClientEngine, users ...

94b474f8117d68de721bac5aebc5da983b9065d5 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Rename ToByteArray -> ToBytes

This is a bit more consistent.

9f12f952ab6bd2458c1d3059e6297a49e10af845 authored over 2 years ago by Alan McGovern <[email protected]>
[client] Fully wrap IDhtEngine

ClientEngine automatically starts/stops many things, including the
Dht engine registered with th...

3788a843cc967841d2fdcd70d7d5777e4b48c58b authored over 2 years ago by Alan McGovern <[email protected]>
[Client] Allow Factories to be used with ClientEngine.RestoreStateAsync

e04f5d56e5abd11f291f50d9954671f570bd083a authored over 2 years ago by Alan McGovern <[email protected]>
[Client] Remove ChangePieceWriterAsync

This can only be changed when the engine isn't running, and at that
point it should only really ...

bf3816aaca6693924eb2fd1be56f034fb9e6ed05 authored over 2 years ago by Alan McGovern <[email protected]>
Update Mono.Nat

e7eb78181dfabbfd6d147e63d8717643ca673fbc authored over 2 years ago by Alan McGovern <[email protected]>
[core] Use Span<T> a bit more

d486ff316d87a50272ffee5cc5a71350680ce3b2 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Clean up sending the initial handshake message

We can pop this in a reusable buffer.

625286745c475f1a8286fce1e67021e1d7567bff authored over 2 years ago by Alan McGovern <[email protected]>
[core] Fix all the new nullability warnings

This cropped up as netcoreapp3.0 and net5.0 targets were added
to all the libs which compiled pr...

9095e775ab06c16a83d7a5f35298fc8c6a9725b2 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Control the chunk size when rate limiting

If the rate limit is high enough then peer connections can/should
always receive in 16kB slices....

3c419567c9c06701732482ebf4fc996bd3d243a2 authored over 2 years ago by Alan McGovern <[email protected]>
[client] Clean up how MaxConnections are handled

Be a little more thorough checking for both the overall max
and the per-torrent max open connect...

a79f26e0bf53caf2b1cd78037966c56fa1f89d22 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Used shared buffers between ArraySegment and Memory

We don't need to segregate these i suppose. I've found more uses
for ArraySegment<byte> buffers ...

fe3e1871dbbc5bf7a993a003e2104fcd5685708d authored over 2 years ago by Alan McGovern <[email protected]>
[core] Replace SocketMemory with Memory<byte>

There's a negligible performance difference when assigning
a buffer to a SocketAsyncEventArgs an...

e6fedac085dcc11589c4600142df9b18abf7750b authored over 2 years ago by Alan McGovern <[email protected]>
[core] Update the samples to use newer deps

ReusableTasks 2.0.2 has some perf improvements.

105baf6db5148f4f126edde2ccb099d081b40cee authored over 2 years ago by Alan McGovern <[email protected]>
[core] Fast path for hashing mode when all files are downloaded

We can completely skip this check if no files are set to
'DoNotDownload'

2c8f879d060fc5f9894018822e06e3ef7047dbf9 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Optimise enqueuing items in the threadpool

IThreadPoolWorkItem allocates less data and does less work.

ef04ed7c731b9748bdda41918d4fd73a14a5747a authored over 2 years ago by Alan McGovern <[email protected]>
[core] Compile everything net5.0+ and netcoreapp3.0+

There are optimisations scattered in many files now,
for example ThreadSwitcher.

43771de3d689c4fcc6d6e532d6dded65174d83be authored over 2 years ago by Alan McGovern <[email protected]>
[core] Properly cache a delegate for scheduled tasks

The original code accidentally created a new delegate every
time the timer expired. This iterati...

efa0e244829fc52e18972459bad8f3367b3a0c6c authored over 2 years ago by Alan McGovern <[email protected]>
[PieceWriter] Don't use the RandomAccess file option

Apparently this has negative performance implications on
windows, and it's probably not that muc...

c83a7685ff64a518b9cd7858336bb8e8adf74fd6 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Add a test ensuring empty strings are discarded

95deac2ee94cf4dd293432c03678aef7529812ad authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #518 from issueg2k4g34j2g/patch-1

Disregard empty path segments

3fa4fed98f3d2af95dd347edbb689293750e84fd authored over 2 years ago by Alan McGovern <[email protected]>
Update src/MonoTorrent.Client/MonoTorrent/Torrent.cs

3cf19fbd96c5aedd5111ff8bdaf7f85c84a0cb3f authored over 2 years ago by Alan McGovern <[email protected]>
Update src/MonoTorrent.Client/MonoTorrent/Torrent.cs

78df1333d01153081957c500bcfea5b1b7ff96f0 authored over 2 years ago by Alan McGovern <[email protected]>
Merge pull request #519 from alanmcgovern/nullable-reference-types

Nullable reference types

d3d742ce01476c47c13303e71d6cbd55744a689d authored over 2 years ago by Alan McGovern <[email protected]>
[core] Remove some unused API from IPeerConnection

1f9aeaa90c333b4ea2987c18ca7014a94a6997c1 authored over 2 years ago by Alan McGovern <[email protected]>
[Client] Enble nullable reference types

9ded661d93b13a1d3ec5eb4a49baccd6730c7d4e authored over 2 years ago by Alan McGovern <[email protected]>
[Trackers] Enable nullable reference types

671551acf9c616bb71295757afa0791b25554d72 authored over 2 years ago by Alan McGovern <[email protected]>
[Dht] Enable nullable reference types

5a26356967cc8bc7d7daf90b33476c91393a8645 authored over 2 years ago by Alan McGovern <[email protected]>
[Connections] Enable nullable reference types

19c485c43fc1efa36554f375091f07a3d705280c authored over 2 years ago by Alan McGovern <[email protected]>
[BEncoding] Enable nullable reference types

e80ab1637fd07fdee677114cef134d11de80c18f authored over 2 years ago by Alan McGovern <[email protected]>
[core] Enable nullable reference types

e0bbf6067545e5c10243ff7f5377e70d9bf3c14b authored over 2 years ago by Alan McGovern <[email protected]>