Matt Joiner
08c403ea52
Fix logging reported in #841
2023-05-28 12:04:49 +10:00
Matt Joiner
17930ef460
Print peer ID in ASCII-only
2023-05-21 19:30:39 +10:00
Matt Joiner
5fa3710d7f
Report ltep extensions in status output
2023-05-19 17:10:03 +10:00
Matt Joiner
a491fdccbc
Move PeerClientName and PeerExtensionIDs to PeerConn
2023-05-19 14:41:27 +10:00
Matt Joiner
c3622dea3d
Fix TestSeedAfterDownloading when cgo is disabled
2023-05-19 12:33:54 +10:00
Matt Joiner
5f2b09a818
Use netip.AddrPort in PEX code and filter unusable addrs much sooner
2023-05-16 17:55:53 +10:00
Matt Joiner
3a92268f10
Handle more PeerRemoteAddr variants when calculating dial addr
...
This should fix https://github.com/anacrolix/torrent/issues/820 .
2023-05-16 16:35:03 +10:00
Matt Joiner
c202126a62
Add many more extension bit definitions
2023-05-09 15:46:53 +10:00
Matt Joiner
5703f9b5eb
Locate target peer using dial addr when receiving a holepunch rendezvous
2023-05-09 15:46:51 +10:00
Matt Joiner
b290350ba2
Prefer outgoing connections from higher to lower peer IDs
...
I think it may have been wrong all this time.
2023-05-09 15:45:52 +10:00
Matt Joiner
267fab622d
Break PeerConn status into more lines and improve pex status
2023-05-09 15:45:52 +10:00
Matt Joiner
06a1aa0769
Synchronize holepunch connect messages with existing rendezvous
2023-05-09 15:45:50 +10:00
Matt Joiner
e86e624415
WIP support for ut_holepunch
2023-05-01 10:19:26 +10:00
Matt Joiner
6818a9f773
Rate limit received PEX messages per connection
2023-05-01 10:19:26 +10:00
Matt Joiner
1e13625c73
Misc debug status, pex conn tracking improvements
2023-05-01 10:19:24 +10:00
Matt Joiner
d3b3d2d9bf
Finish moving all Peer types and methods into peer.go
2023-03-01 12:34:16 +11:00
Matt Joiner
e8971ea0f1
Add unit test for relative availability after HaveNone
...
Could help with https://github.com/anacrolix/torrent/issues/813 .
2023-02-19 13:24:25 +11:00
Matt Joiner
2cb7121a93
Limit peer request data allocation
...
This follows up from abb5cbc96e301a4ca1f5df698b105ae8553ce1e9. We currently limit how many requests peers can send us, but didn't really check that peers didn't make us allocate huge amounts of space to buffer their requests. I'm sure there's some rough edges here.
2023-02-14 12:46:49 +11:00
Matt Joiner
abb5cbc96e
Check for chunks overflowing piece bounds on request read
...
Test for integer overflow in when checking read requests are within the bounds of the associated piece. Another fix is required to limit the amount of memory that can be allocated for such requests.
2023-02-13 23:27:15 +11:00
Matt Joiner
14cf045b6a
Sleep webseed peers after unhandled errors
2022-12-31 11:27:47 +11:00
Matt Joiner
f75989863c
Validate received chunks before conversion to indexes
...
https://github.com/anacrolix/torrent/issues/791
2022-12-11 15:21:23 +11:00
Matt Joiner
3e0f34934d
gorond ./...
2022-11-15 23:31:27 +11:00
Alex Sharov
caa9400c52
use rLock where can, part2 ( #767 )
2022-07-13 20:04:03 +10:00
Matt Joiner
214fe6b93c
Use webrtc local addr for webrtc conn peer priority
...
WebRTC conns are providing the correct IP for peer priority calculations, so use that instead of trying to guess (which doesn't work if there are no regular conn listeners attached to the Client.
(cherry picked from commit e86bb5fee3958dc90a3d012469b1352005d6c9ad)
2022-07-12 15:52:03 +10:00
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
32cdaf4ada
Update anacrolix/generics
2022-06-21 08:51:33 +10:00
Matt Joiner
0158a830f5
Add comments for #752 and #753
2022-06-14 16:02:43 +10:00
Matt Joiner
8ccacbfd17
Revert "Switch requestState to be a slice"
...
This reverts commit 9eb80abc29498ecc8ba2b174457b46ca75296dec.
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
Nathanael Demacon
ed1fe91dd2
Implement a public Peer.DownloadRate
( #750 )
2022-05-23 10:42:51 +10:00
Matt Joiner
669c69faac
Disable update requests timer
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
7d4f64ce3c
Combine pending and last requested
2022-05-11 11:33:11 +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
78c36e4c2f
Add Torrent.pieceIndexOfRequestIndex
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
FIGBERT
529d97b5eb
Use PeerConn logger instead of default logger ( #736 )
2022-04-14 19:02:45 +10:00
Matt Joiner
32501740f2
Support banning webseeds
2022-03-11 13:33:34 +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
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
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
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
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
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
9d9556c97f
Add Peer.cancelAllRequests for webseedPeer
2021-12-13 12:11:38 +11:00