Commit graph

249 commits

Author SHA1 Message Date
Igor Katson
e4845e2368
Add a clarifying comment 2024-12-07 11:51:58 +00:00
Igor Katson
0fabb453aa
Storing torrent name in ManagedTorrentShared 2024-12-06 12:57:26 +00:00
Igor Katson
0a92cf1d65
cleanup a couple unnecessary drop(g) calls 2024-12-06 12:37:53 +00:00
Igor Katson
5df342e442
Nothing: move a comment 2024-12-06 12:25:16 +00:00
Igor Katson
4c654a0631
Tiny optimisation for code size 2024-12-06 12:17:52 +00:00
Igor Katson
5f07872725
Docs for _start() 2024-12-06 12:14:34 +00:00
Igor Katson
38fec48879
Reorganize _start() a bit 2024-12-06 12:08:03 +00:00
Igor Katson
7ed037cba8
comments 2024-12-06 11:30:04 +00:00
Igor Katson
100b7116df
Split out TorrentMetadata 2024-12-05 23:12:46 +00:00
Igor Katson
e440f03970
spawn_peer_adder: Option<PeerStream> -> PeerStream 2024-12-05 22:05:04 +00:00
Igor Katson
8131ba0482
Store initial_peers in state 2024-12-05 21:47:37 +00:00
Igor Katson
fb760b282e
Only successful outgoing connections marked 2024-12-04 10:39:37 +00:00
Igor Katson
ac775affef
nit: decrease branch nesting 2024-12-04 10:21:10 +00:00
Igor Katson
9d71eb4872
Remove PeerStateNoMut 2024-12-04 10:17:42 +00:00
Igor Katson
956e6d4f08
Move all methods to Peer, not PeerStateNoMut 2024-12-04 10:12:44 +00:00
Igor Katson
85b65dcef5
Rename a couple methods 2024-12-04 10:08:51 +00:00
Igor Katson
fa3e8d949b
Peer struct knows its addr 2024-12-04 10:06:08 +00:00
Igor Katson
adc2ca97b3
A bit of refactoring to store live_peers 2024-12-04 10:03:08 +00:00
Igor Katson
7a52721af9
Refactor for readability 2024-12-04 09:13:39 +00:00
Igor Katson
c8cd17ce8e
Format comments 2024-12-04 09:13:39 +00:00
Ivan
90a823b3ed
Small fixes base on comments in PR #261 2024-12-04 09:13:39 +00:00
Ivan
42d184ff6b
Logging 2024-12-04 09:13:39 +00:00
Ivan
1fa05837fb
Include only addresses with known working connections 2024-12-04 09:13:39 +00:00
Ivan
1129d5b6e6
Fix missing fn 2024-12-04 09:13:39 +00:00
Ivan
3c470e1670
Sending PEX - initial concept 2024-12-04 09:13:38 +00:00
Igor Katson
e5c11e778a
Trying to fix rust compat 2024-11-20 16:17:32 +00:00
Igor Katson
1dbdeb5bbe
Replace leaky_bucket with governor crate 2024-11-18 17:34:50 +00:00
Igor Katson
25b309867b
Initial impl of up/down ratelimits 2024-11-18 17:34:50 +00:00
Igor Katson
af7a0ddb4f
do not read/write/set_len to padding files 2024-11-07 13:46:12 +00:00
Igor Katson
a90f245dc9 Add with_stats=true to torrents list 2024-11-07 08:57:16 +00:00
Igor Katson
30bfb3ea19 Unify API types a bit (remove list item) 2024-11-07 08:57:16 +00:00
Igor Katson
990c5f866b
Disable upload: do not expose in default builds, move under a feature flag. 2024-10-03 09:07:19 +01:00
Ivan
7640218488 Make outgoing addr Option 2024-09-30 19:55:37 +02:00
Ivan
23bd537dd7 Remove commented code 2024-09-28 19:47:48 +02:00
Ivan
1ce5971f07 Add debug and remove unneeded 2024-09-28 19:36:54 +02:00
Ivan
cd7349121c Queuing only peers that will be retried 2024-09-26 21:30:25 +02:00
Ivan
aec1eeef34 Enum pro outgoing addr and some fixes 2024-09-26 19:15:16 +02:00
Ivan
4bd757173d Set outgoing IP address for incomming peers after Ext. handshake 2024-09-26 18:11:05 +02:00
Ivan
a483bc6586 Update outgoing address for incoming peers 2024-09-25 22:32:38 +02:00
Ivan Zderadicka
f7a812439b
Change to restarting of dead peers (#239)
* Logging died peers

* Ignore incoming for retry,  cancel retries after download is complete

* Remove cancel

* Add incoming flag to PeerHandler

* Cleaning up, plus debug

* Fix debug style
2024-09-22 08:31:57 +01:00
Igor Katson
dedee2ef08
Watching works fine 2024-09-13 12:58:09 +01:00
Igor Katson
a73f921c5f
one line anyhow error formatting 2024-09-13 12:36:32 +01:00
Igor Katson
8974a013ce
Move on_piece_completed() to a more appropriate place 2024-09-13 09:25:52 +01:00
Igor Katson
88c8e51ab8
Merge pull request #233 from izderadicka/pex2
In PEX we should also look at dropped peers
2024-09-13 09:01:54 +01:00
Igor Katson
816838cdf0
Fastresume: check at least one piece from each file 2024-09-12 23:59:50 +01:00
Ivan
bf7f78b602 In PEX we should also look at dropped peers 2024-09-08 14:30:36 +02:00
Igor Katson
206bcde06f
Attempting to connect even if we have full torrent (as other clients do, to attempt upload) 2024-08-31 12:56:47 +01:00
Igor Katson
b60ec6d919
peer has full torrent debug message 2024-08-31 12:53:56 +01:00
Igor Katson
b60850946e
Fix: unchoke now sent after Bitfield properly, not before 2024-08-31 12:15:22 +01:00
Igor Katson
3f014ee80a
Sending your ip as part of peer_connection.rs 2024-08-31 12:15:22 +01:00