Commit Graph

3473 Commits

Author SHA1 Message Date
Matt Joiner 12279621e4
Check that incoming peer request chunk lengths don't exceed the upload rate limiter burst size
Should fix #759.
2022-06-25 23:16:58 +10:00
Matt Joiner ae4eb8569b
Add exatorrent and finish tidying downstream projects 2022-06-25 17:28:23 +10:00
Marco Vidonis 8f711b633f
optimise torrent piece length (#758) 2022-06-23 22:44:06 +10:00
Matt Joiner 05cd58de85
Add Client.PublicIPs 2022-06-22 23:59:18 +10:00
Matt Joiner b232729e0c
Fix typo 2022-06-22 14:19:26 +10:00
FIGBERT fcfc5bb923
Update tidwall/btree (0.7.2 -> 1.3.1) (#757) 2022-06-22 14:16:20 +10:00
Matt Joiner 32cdaf4ada
Update anacrolix/generics 2022-06-21 08:51:33 +10:00
Matt Joiner 58200a304c
Update downstream projects 2022-06-21 08:34:38 +10:00
Matt Joiner 585e062804
torrent serve: Add some reasonable tracker defaults 2022-06-15 14:23:18 +10:00
Matt Joiner f527180873
Bump up the local client reqq
This seems to boost upload speeds to Transmission to 16MB/s. It may require a corresponding amount of buffering in memory, that could require work later.
2022-06-15 14:22:17 +10:00
Matt Joiner 3c54eadf28
torrent serve: Print magnet link 2022-06-14 18:23:00 +10:00
Matt Joiner 0158a830f5
Add comments for #752 and #753 2022-06-14 16:02:43 +10:00
Matt Joiner 1a3508bcbd
Update github.com/frankban/quicktest 2022-06-14 16:02:03 +10:00
Matt Joiner 54665f160a
Rework peer connection writer to keep individual writes smaller
This fixes an issue with WebRTC when the write buffers get too big.
2022-06-14 16:01:47 +10:00
Matt Joiner caf35cd9b8
internal/testutil.Info: Support multi-file Torrents 2022-06-14 16:01:47 +10:00
Matt Joiner 65896d4cec
ExportStatusWriter: take testing.TB instead of *testing.T 2022-06-14 16:01:47 +10:00
Alex Sharov 061407fbc4
github.com/edsrzf/mmap-go v1.1.0 2022-06-14 15:57:08 +10:00
Matt Joiner 8ccacbfd17
Revert "Switch requestState to be a slice"
This reverts commit 9eb80abc29.

Via email I received a report of excessive memory use: Memory use with a slice is proportional to the total size of all torrents loaded into the Client, which can be very large.
2022-06-01 18:24:50 +10:00
Matt Joiner f21aeed90e
Demote webrtc conn error logging level to debug
Fixes #716.
2022-06-01 18:18:37 +10:00
Nathanael Demacon ed1fe91dd2
Implement a public `Peer.DownloadRate` (#750) 2022-05-23 10:42:51 +10:00
Matt Joiner eeb021b134
Use Option for cached Torrent length
Fixes https://github.com/anacrolix/torrent/issues/630.
2022-05-12 13:47:12 +10:00
Matt Joiner 9434fe58a2
Set debug log level for outgoing connection error
Contributed by @tsynik in https://github.com/anacrolix/torrent/issues/702#issuecomment-1010523079.
2022-05-12 13:33:57 +10:00
Matt Joiner 39bd8fc5a0
Use reusable roaring iterators 2022-05-12 10:42:16 +10:00
Matt Joiner 0235dd3801
Add fallback piece ordering for non-readahead priorities 2022-05-12 10:37:50 +10:00
Matt Joiner 9f9b02e3dd
cmd/torrent: Respect default client max unverified bytes 2022-05-12 10:37:36 +10:00
Matt Joiner 669c69faac
Disable update requests timer 2022-05-12 10:37:36 +10:00
Matt Joiner 590d1ac265
Make piece states a slice and reuse it and request indexes between runs 2022-05-12 10:37:36 +10:00
Matt Joiner 4eb6a49f27
Use intermediate t in Peer.getDesiredRequestState 2022-05-12 10:37:36 +10:00
Matt Joiner 9eb80abc29
Switch requestState to be a slice 2022-05-12 10:34:28 +10:00
Matt Joiner f235c8ea51
Reuse piece order state for request ordering 2022-05-12 10:34:28 +10:00
Matt Joiner 88a867ef9c
Default 64 MiB max unverified bytes 2022-05-12 10:34:28 +10:00
Matt Joiner eb7811f909
Cache chunksPerRegularPiece 2022-05-12 10:34:26 +10:00
Matt Joiner 7d4f64ce3c
Combine pending and last requested 2022-05-11 11:33:11 +10:00
Matt Joiner 5fe7007d34
Update ajwerner/btree 2022-05-09 12:53:47 +10:00
Matt Joiner 660d73eb9c
cmd/torrent: Improve context error handling 2022-05-09 12:51:02 +10:00
Matt Joiner 23a0e7f7d3
Remove redundant type conversions 2022-05-09 12:51:02 +10:00
Matt Joiner daff06cf20
Move undirtiedChunksIter into its own file 2022-05-09 12:51:01 +10:00
Matt Joiner e90037216c
Use a generic heap implementation for request selection 2022-05-09 12:05:50 +10:00
Matt Joiner 7e362c0cb3
Order readahead requests by piece index 2022-05-09 12:05:50 +10:00
Matt Joiner a54d2d81e4
Retain peer local request ordering 2022-05-09 12:05:50 +10:00
Matt Joiner 9a9c7dee00
Add and use typed roaring bitmap 2022-05-09 12:05:50 +10:00
Matt Joiner d5d940e643
cmd/torrent download: Fix waiting for pieces when some are already complete 2022-05-09 12:05:12 +10:00
Matt Joiner 78c36e4c2f
Add Torrent.pieceIndexOfRequestIndex 2022-05-09 12:05:12 +10:00
Matt Joiner 9b9a37eee6
Add a test for allocations in undirtiedChunksIter.Iter 2022-05-09 12:05:12 +10:00
Alex Sharov 3a3307632a
Infer pp.Decoder.MaxLength from chunk size (#743) 2022-05-08 11:36:43 +10:00
Matt Joiner 1f6b23d995
cmd/torrent: Export Prometheus metrics 2022-04-28 09:45:49 +10:00
afjoseph 5bcd5d1b13
[client] Handle nil IP in badPeerAddr() 2022-04-26 10:59: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