2
0
mirror of synced 2025-02-24 14:48:27 +00:00

611 Commits

Author SHA1 Message Date
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
Matt Joiner
b196fe7765 Wanting peers is a subset of wanting conns 2021-11-28 22:40:55 +11:00
Matt Joiner
f621f0f5a8 Don't want conns for seeding unless we have a piece 2021-11-28 22:40:53 +11:00
Matt Joiner
560b463983 Comment out pending requests tests and asserts
These need to be updated. BSI for pending requests removes an enormous amount of memory use for very large torrents.
2021-11-25 22:59:20 +11:00
Matt Joiner
0f81e0011f Avoid calling net.Conn methods with the Client mutex locked
The utp firewall callback might want to use it. I can't think of a better way to determine with an incoming connection request should be blocked.
2021-11-17 14:00:50 +11:00
Matt Joiner
a90ae5aed4 Pass HTTP Proxy config into webseeding HTTP client 2021-11-12 14:16:14 +11:00
Matt Joiner
dea0e41e29 Boost webseed max requests 2021-11-12 13:51:58 +11:00
Matt Joiner
2fd928b918 Don't use non-directory webseed URLs for multi-file torrents 2021-11-12 12:37:40 +11:00
Matt Joiner
c6ee03f449 gofumpt 2021-11-08 14:47:01 +11:00
Matt Joiner
8d193edb7e Remove unused Torrent.numActivePeers 2021-11-01 11:49:36 +11:00