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

2447 Commits

Author SHA1 Message Date
Matt Joiner
5b0c46cd54 Fix false positive Goland code lint 2020-04-16 14:52:52 +10:00
Matt Joiner
e5f7765dfa Fix small cache transfer tests
Since hashing Peer Addrs in the Torrent pending peers, clients are getting more than one connection to the seeder in the tests and failing.
2020-04-16 14:12:17 +10:00
Matt Joiner
c2210c058c Fix pending peer counts in transfer tests
Also expose number of peers successfully added in some method returns.
2020-04-16 14:09:45 +10:00
Matt Joiner
070e11a0dd Adjust recently added logging 2020-04-16 12:17:18 +10:00
Matt Joiner
730cebf5aa Only announce to DHT if we have dialers or listeners 2020-04-16 12:03:27 +10:00
Matt Joiner
eec337d4bc Set tracker announce numWant to 0 if we're unable to dial 2020-04-16 12:02:34 +10:00
Matt Joiner
74986db9ed Don't try to do conventional dials if we have no dialers
Stops us from consuming all the peers we store for no reason.
2020-04-16 12:00:49 +10:00
Matt Joiner
6a86e9e999 Include hashed addr when comparing prioritized peers
In particular, fixes the issue where peers where can't calculate a priority and fallback on 0 clobber each other.
2020-04-16 11:59:31 +10:00
Matt Joiner
5f47e808fb Update the peersAddedBySource expvar 2020-04-16 11:56:58 +10:00
Matt Joiner
d4430e89b6 Fix crash with conventional trackers when tcp and utp are disabled
Fixes #396.
2020-04-16 10:27:17 +10:00
Matt Joiner
8cf3ce187d cmd/torrent: Fix -{utp,tcp}Peers defaults
Addresses https://github.com/anacrolix/torrent/issues/396#issuecomment-614210103.
2020-04-16 10:26:37 +10:00
Yaroslav Kolomiiets
26071eaad0 PEX: integrate with send throttling 2020-04-16 09:37:38 +10:00
Matt Joiner
3d87c20766 Count outgoing extended messages by extension protocol 2020-04-15 18:09:15 +10:00
Matt Joiner
166f878bdc Fix change in Client.newConnection 2020-04-15 17:28:39 +10:00
Matt Joiner
c27e3f8de3 Merge branch 'webtorrent' 2020-04-15 17:26:46 +10:00
Matt Joiner
92162295af Clone the AnnounceList out of Torrent.Metainfo
Should fix a race with Torrent.AddTrackers
2020-04-15 17:26:02 +10:00
Matt Joiner
bb3ae90cd2 Comments and reduced locking in trackerScraper.Run 2020-04-15 17:26:02 +10:00
Yaroslav Kolomiiets
2b2c480706 PEX: add periodic deltas 2020-04-15 17:24:44 +10:00
Yaroslav Kolomiiets
93430aa01a PEX: add connection tracking 2020-04-15 17:24:44 +10:00
Yaroslav Kolomiiets
634edd2875 Share current connections with peers over PEX (anacrolix#341) 2020-04-15 17:24:44 +10:00
Matt Joiner
0123f5e6f6 More error handling and logging clean up 2020-04-14 10:47:26 +10:00
Matt Joiner
f90cbcce20 Fix locks around Torrent.announceRequest 2020-04-13 19:13:59 +10:00
Matt Joiner
05e448d132 webtorrent logging improvements 2020-04-13 19:13:23 +10:00
Matt Joiner
93366bb63a Rename webtorrent.NewClient->NewTrackerClient 2020-04-13 19:12:54 +10:00
Matt Joiner
e5fd9ede54 Tidy up the webtorrent package, remove buffer 2020-04-13 14:31:39 +10:00
Matt Joiner
1b3cbc1287 Improve webtorrent tracker client logging 2020-04-13 14:17:46 +10:00
Matt Joiner
8f04efa2db Fix panic in status for webrtc connections 2020-04-13 14:08:32 +10:00
Matt Joiner
f45dac1e38 Use offer_id for webrtc conn string 2020-04-13 14:04:34 +10:00
Matt Joiner
3e5c6d3d44 cmd/torrent: Add download -tcpPeers and -utpPeers 2020-04-11 13:03:41 +10:00
Matt Joiner
d592d139bf Update anacrolix/tagflag 2020-04-11 13:03:23 +10:00
Matt Joiner
b90e23a22b Merge branch 'torrent-cli' into webtorrent 2020-04-11 12:58:12 +10:00
Matt Joiner
d3b6bcef97 Add announce and download commands to cmd/torrent 2020-04-10 15:27:30 +10:00
Matt Joiner
6f2c65fe33 Big tidy up of webtorrent code 2020-04-07 14:30:27 +10:00
Matt Joiner
bcdccb1ff3 Refactoring in webtorrent.Transport 2020-04-07 12:17:21 +10:00
Matt Joiner
c5bb913c9e Fix missing return when creating websocket tracker announcer 2020-04-07 12:16:53 +10:00
Matt Joiner
27bfdd0dbf Create peer connections when WebRTC connections obtain a data channel 2020-04-07 10:59:10 +10:00
Matt Joiner
77cbbec926 Start using the webtorrent package 2020-04-06 16:45:47 +10:00
Matt Joiner
4d516ddadd Create stub for websocket trackers 2020-04-06 15:38:01 +10:00
Matt Joiner
ae4e5270c2 Fix formatting directives 2020-04-06 14:14:13 +10:00
Matt Joiner
fe2fb69ed8 Import code https://github.com/backkem/gowttest 2020-04-05 13:55:14 +10:00
Craig Campbell
6920298770 Add Piece.UpdateCompletion() method
This should be all that is needed to handle pieces that are evicted or
removed from storage if you are using a storage implementation such as an LRU
cache.
2020-04-05 08:57:58 +10:00
ucwong
c435d713c4 cmd/torrent-pick | add missing ticker.Stop() call 2020-04-03 17:02:16 +10:00
Matt Joiner
2c00258e70 Switch CI to go1.14 2020-03-29 11:38:25 +11:00
Matt Joiner
2ea04e9083 Use default bbolt package alias 2020-03-24 12:55:03 +11:00
Matt Joiner
7175dba614 Fix bbolt compatibility with go1.14 2020-03-24 12:55:03 +11:00
Alfonso Montero
f7002cb860 Readme: Add downstream project 2020-03-24 11:30:15 +10:00
Matt Joiner
364d3dd208 Rewrite file.bytesLeft
Avoids iteration, and should handle files that are entirely inside a single piece, as well as zero-sized at the beginning of a torrent. Should fix #387.
2020-03-24 12:15:35 +11:00
Matt Joiner
4be8b12207 Rename variables in fileBytesLeft 2020-03-24 11:21:42 +11:00
Matt Joiner
3507ff1a69 Add abstraction and tests for #387 2020-03-24 11:19:11 +11:00
Matt Joiner
378ccd0932 Logging improvements for DHT 2020-03-17 13:48:09 +11:00