Commit Graph

620 Commits

Author SHA1 Message Date
Matt Joiner 9a9c7dee00
Add and use typed roaring bitmap 2022-05-09 12:05:50 +10:00
Matt Joiner 78c36e4c2f
Add Torrent.pieceIndexOfRequestIndex 2022-05-09 12:05:12 +10:00
Matt Joiner a3a5a81e84
Support custom path escaping for WebSeeds 2022-04-26 10:57:40 +10:00
Matt Joiner d2d8125eea
WebSeed PathEscaper API tweaks 2022-04-26 10:46:01 +10:00
FIGBERT 2c8a3219db
Use Torrent logger instead of default logger (#740) 2022-04-25 18:49:59 +10:00
afjoseph a79c3bd5d3 fixup! [webseed] Add a custom URL encoder for webseeds 2022-04-22 04:23:43 +02:00
afjoseph 02cc723750 [webseed] Add a custom URL encoder for webseeds 2022-04-21 16:21:29 +02:00
Matt Joiner d8611ecf2d
Fix races around Reader and Torrent.Drop when Torrent is closed 2022-04-11 15:44:24 +10:00
Matt Joiner dd1ca6f514
Use Info.BestName in a few more places 2022-03-18 09:15:50 +11:00
Matt Joiner e801f8518f
Merge branch 'go1.18' 2022-03-17 15:16:04 +11:00
Matt Joiner 32d89830ed
Use generic pubsub 2022-03-17 14:55:55 +11:00
Matt Joiner 39af2fe8f2
Merge branch 'http-proxying' 2022-03-15 12:41:22 +11:00
Matt Joiner a319506dda
Expose Torrent.AddWebSeeds 2022-03-11 14:23:05 +11:00
Matt Joiner ec2b1b2073
Support banning webseeds 2022-03-11 14:05:31 +11:00
Matt Joiner 32501740f2
Support banning webseeds 2022-03-11 13:33:34 +11:00
Matt Joiner d06f990b81 Use HTTP proxy config for torrent sources 2022-02-25 19:59:16 +11:00
Matt Joiner a324fbfee3 Make use of the lazylog branch of anacrolix/log
This avoids significant allocations and overhead.
2022-01-31 17:22:36 +11:00
Matt Joiner 68e47c4bea Include peer net.Conn endpoint addresses in webrtc conn string 2022-01-27 15:24:48 +11:00
Matt Joiner 60057327b3 Ban peers for dirtying pieces if they are solely responsible 2022-01-27 15:09:05 +11:00
Matt Joiner 7b7f1207b2 Merge branch 'master' into lazylog 2022-01-27 13:49:16 +11:00
Matt Joiner 1512857348 Include peer net.Conn endpoint addresses in webrtc conn string 2022-01-27 13:45:36 +11:00
Matt Joiner 7a20e9fe8a Lazy logging 2022-01-23 09:37:11 +11:00
Matt Joiner 1cff4fe95e Switch to external anacrolix/generics 2022-01-22 18:43:04 +11:00
Matt Joiner 9e5dac9514 Forget smart ban blocks after piece passes hash check 2022-01-22 18:43:04 +11:00
Matt Joiner 4fb4541297 Apply smart bans under Client lock 2022-01-22 18:43:04 +11:00
Matt Joiner 4a8611b23e Do smart banning on existing badPeerIPs 2022-01-22 18:43:04 +11:00
Matt Joiner 53cf508061 Implement smart ban using generics 2022-01-22 18:43:04 +11:00
Matt Joiner c47e6b1f60 Use webrtc selected ICE candidate for peer addresses 2022-01-22 18:35:06 +11:00
Matt Joiner 83a8284d6a Add tests for preferred network direction 2022-01-12 15:01:33 +11:00
Matt Joiner f7494791d0 Reduce some logging 2021-12-27 22:06:52 +11:00
Matt Joiner 1bae62fd22 Dynamic outbound max requests
This might be one solution to https://github.com/anacrolix/torrent/issues/698.
2021-12-24 08:55:57 +11:00
Matt Joiner 9d07f3ea77 Replace piece availability with frequencies in Torrent status 2021-12-23 17:01:39 +11:00
Matt Joiner cc0d223a65 Apply download rate limiter to webseeds 2021-12-23 14:00:00 +11:00
Matt Joiner 80aec73cb5 Make Torrent.cancelRequestsForPiece more efficient 2021-12-23 14:00:00 +11:00
Matt Joiner 506ff8d037 Use relative availabilities to determine piece request order
Most overhead comes from peers that connect that have everything, and we just increment every single piece's availability. There may be some unresolved determinism with torrents that share the same ordering.
2021-12-23 14:00:00 +11:00
Matt Joiner 74c70d852a Add TestHaveAllThenBitfield
The result of a misguided attempt to reduce piece peer availability increment and decrement overhead for have all/full-bitfield and conn closes.
2021-12-23 14:00:00 +11:00
Matt Joiner ffb98097fa Fix BenchmarkUpdatePiecePriorities 2021-12-16 14:00:19 +11:00
Matt Joiner 98f188dcbe Update requests after deleting all in some corner cases
Choked by non-fast PeerConn, deleted PeerConn. They're not exactly guarded as strictly as they could be, so there's plenty of room for performance improvements here.
2021-12-13 12:09:12 +11:00
Matt Joiner a671c06b94 Update peer requests if not interested when piece priorities change
This should fix a starvation issue where we don't signal interest to a peer that has us choked.
2021-12-13 11:55:47 +11:00
Matt Joiner 04beb8937f More consistent cancellation management 2021-12-12 18:35:02 +11:00
Matt Joiner 1bc84e316f Don't group Torrent piece request orders without a storage capacity together 2021-12-12 18:35:02 +11:00
Matt Joiner ddf41fc2f1 Add Torrent-level request cancel for consistency 2021-12-12 18:35:01 +11:00
Matt Joiner 117ae28b38 Try request stealing 2021-12-12 18:35:01 +11:00
Matt Joiner 99a64bcf63 Wait between duplicate requests 2021-12-12 18:35:01 +11:00
Matt Joiner 94bb5d40ba Implement piece request ordering with retained state 2021-12-12 18:35:01 +11:00
Matt Joiner ba592028e5 Filter update requests on piece priority change by peer choking and allowed fast 2021-12-12 15:01:50 +11:00
Matt Joiner a2c50ea2bd Handle 503 returns from webseed peer endpoints 2021-12-06 15:24:28 +11:00
Matt Joiner 0f495ce97d Optimize the use of worstConnSlice again 2021-11-29 10:07:48 +11:00
Matt Joiner 4f3db19ca3 Optimize Torrent.haveAnyPieces 2021-11-29 00:44:24 +11:00
Matt Joiner 97e1e2469b Announce to DHT if we want conns, not just peers 2021-11-28 22:46:45 +11:00