2
0
mirror of synced 2025-02-24 06:38:14 +00:00

3340 Commits

Author SHA1 Message Date
Matt Joiner
68e47c4bea Include peer net.Conn endpoint addresses in webrtc conn string 2022-01-27 15:24:48 +11:00
Matt Joiner
b68ab1db12 When banning an IP drop peers that match 2022-01-27 15:12:26 +11:00
Matt Joiner
f1e250672f Fix v4 in v6 IPs from being banned as IPv4 2022-01-27 15:11:01 +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
b5edd9ce89 Merge branch 'lazylog' into smartban 2022-01-27 14:06:45 +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
52e793ff6d Resolve deps 2022-01-23 14:59:31 +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
f4d4b59d89 Add some generic map helpers 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
245c728762 Use gotip for CI build 2022-01-22 18:40:33 +11:00
Matt Joiner
935dc3da0a Switch to ajwerner/btree in piece request ordering 2022-01-22 18:40:33 +11:00
Matt Joiner
934944e498 Add AjwernerBtree as an alternative btree backing for piece request order
Also add some scans to benchmarks. Make a few changes to reduce allocations using piece request order.
2022-01-22 18:40:33 +11:00
Matt Joiner
c54dc22592 Benchmark PieceRequestOrder with varying styles of path hint usage
Add per-piece piece request order path hints
2022-01-22 18:39:36 +11:00
Matt Joiner
62060fb897 Use tidwall/btree generics for piece request ordering 2022-01-22 18:39:36 +11:00
Matt Joiner
c47e6b1f60 Use webrtc selected ICE candidate for peer addresses 2022-01-22 18:35:06 +11:00
Matt Joiner
b668c826e2 Rename webtorrent source files 2022-01-22 18:34:35 +11:00
Matt Joiner
f074b30bcb Use tagged anacrolix/squirrel 2022-01-14 09:22:08 +11:00
Matt Joiner
c17186bf85 Switch from missinggo/MultiLess to anacrolix/multiless 2022-01-12 15:07:26 +11:00
Matt Joiner
83a8284d6a Add tests for preferred network direction 2022-01-12 15:01:33 +11:00
Matt Joiner
0c7754da63 Add const noCacheBlobs in sqlite storage benchmarks 2022-01-10 16:20:03 +11:00
Matt Joiner
31243ad4fd go mod tidy 2022-01-07 19:15:59 +11:00
Matt Joiner
726eec2f8d bencode: Support decoding "" as dict key 2022-01-07 19:11:41 +11:00
Matt Joiner
071ade67ae bencode: Return ErrUnexpectedEOF instead of EOF in the middle of values 2022-01-07 19:11:41 +11:00
Matt Joiner
32097526fc Add bencode.Decoder.MaxStrLen 2022-01-07 19:11:41 +11:00
Matt Joiner
e8bd16257c fs/test.sh: Use go run instead of godo 2021-12-28 12:06:29 +11:00
Matt Joiner
50fcd908ca tracker/udp.ConnClient: Make logging configurable
Should fix https://github.com/anacrolix/torrent/issues/701#issue-1088130173
2021-12-28 12:05:01 +11:00
Matt Joiner
2e9ecd5a32 Reject peer requests on data read failures 2021-12-27 22:19:04 +11:00
Matt Joiner
f7494791d0 Reduce some logging 2021-12-27 22:06:52 +11:00
Matt Joiner
14d636ec50 Fix TestTorrentDroppedDuringResponsiveRead flakiness 2021-12-27 21:16:51 +11:00
Matt Joiner
fc857d4557 Allow stealing from slower connections within priority classes 2021-12-24 08:56:10 +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
89b8b78980 Include requests pending cancel in current request count
This fix a situation where peers might be dropping our requests, and since we depend on all requests being satisfied before re-requesting, we get stuck waiting for the request to be filled.
2021-12-23 18: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
dbbe2fa71e Revert go directive to 1.16 2021-12-23 14:00:01 +11:00
Matt Joiner
9f2e2e39fa cmd/torrent: Add --linear-discard 2021-12-23 14:00:01 +11:00
Matt Joiner
9739afce93 Fix panic in webseeds updating requests when Torrent is closed
I think this was caused by PieceRequestOrder being removed if all pieces in a storage capacity key are deleted.
2021-12-23 14:00:01 +11:00
Matt Joiner
7772d50f74 cmd/torrent: Lower burst when there's a download rate limit 2021-12-23 14:00:01 +11:00
Matt Joiner
cc0d223a65 Apply download rate limiter to webseeds 2021-12-23 14:00:00 +11:00
Matt Joiner
87dfef7778 Don't wait for DHT pings
Fixes a growing backlog of pings if DHT servers are rate-limited in their queries.
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
bdb33ef9f7 gofumpt -extra 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
Preston
b831060d6e
fix http tracker arg position (#700)
Co-authored-by: Bot Git <bot@example.com>
2021-12-23 12:34:16 +11:00