]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
4 years agoUpdate README.md
Rob Powell [Sun, 17 May 2020 15:26:59 +0000 (16:26 +0100)]
Update README.md

4 years agoFix panic caused by adding disabled udp trackers
Matt Joiner [Tue, 19 May 2020 02:44:42 +0000 (12:44 +1000)]
Fix panic caused by adding disabled udp trackers

4 years agoFix Client torrent "of %d bytes" in status
Matt Joiner [Wed, 13 May 2020 07:32:16 +0000 (17:32 +1000)]
Fix Client torrent "of %d bytes" in status

4 years agoAdd comment to metainfo.MetaInfo.CreationDate
Matt Joiner [Wed, 13 May 2020 04:33:19 +0000 (14:33 +1000)]
Add comment to metainfo.MetaInfo.CreationDate

4 years agoExpose metainfo.GeneratePieces
Matt Joiner [Wed, 13 May 2020 04:32:20 +0000 (14:32 +1000)]
Expose metainfo.GeneratePieces

4 years agocmd/tracker-announce: Rework for better utility in shell scripts
Matt Joiner [Tue, 12 May 2020 01:31:56 +0000 (11:31 +1000)]
cmd/tracker-announce: Rework for better utility in shell scripts

4 years agodoc comment
Matt Joiner [Mon, 4 May 2020 23:00:43 +0000 (09:00 +1000)]
doc comment

4 years agoFix benchmark failing due to mainReadLoop returning io.EOF
Matt Joiner [Sun, 3 May 2020 09:31:20 +0000 (19:31 +1000)]
Fix benchmark failing due to mainReadLoop returning io.EOF

4 years agoPull fix to panic in pion/ice
Matt Joiner [Sun, 3 May 2020 08:51:09 +0000 (18:51 +1000)]
Pull fix to panic in pion/ice

https://github.com/pion/ice/issues/182

4 years agowebtorrent: Synchronize access to PeerConnection.Close
Matt Joiner [Sun, 3 May 2020 08:45:12 +0000 (18:45 +1000)]
webtorrent: Synchronize access to PeerConnection.Close

4 years agocmd/torrent: Output stats on termination, not just completion
Matt Joiner [Sun, 3 May 2020 08:42:37 +0000 (18:42 +1000)]
cmd/torrent: Output stats on termination, not just completion

4 years agocmd/torrent: Add download -pex flag
Matt Joiner [Sun, 3 May 2020 08:42:03 +0000 (18:42 +1000)]
cmd/torrent: Add download -pex flag

For testing with https://github.com/anacrolix/torrent/issues/402.

4 years agocmd/torrent: Only output progress lines when they change
Matt Joiner [Sun, 3 May 2020 08:41:33 +0000 (18:41 +1000)]
cmd/torrent: Only output progress lines when they change

This stops spamming output when seeding.

4 years agoClose PeerConn.conn synchronously
Matt Joiner [Sun, 3 May 2020 08:40:40 +0000 (18:40 +1000)]
Close PeerConn.conn synchronously

4 years agoPropagate and log more connection read/write errors now that logging is a bit fancier
Matt Joiner [Sun, 3 May 2020 08:40:09 +0000 (18:40 +1000)]
Propagate and log more connection read/write errors now that logging is a bit fancier

4 years agoLimit the write buffer to work around a webrtc datachannel issue
Matt Joiner [Sun, 3 May 2020 08:39:16 +0000 (18:39 +1000)]
Limit the write buffer to work around a webrtc datachannel issue

https://github.com/pion/datachannel/issues/59. Fixes https://github.com/anacrolix/torrent/issues/402.

4 years agoFix PeerConn outgoing field for webrtc
Matt Joiner [Sun, 3 May 2020 08:37:26 +0000 (18:37 +1000)]
Fix PeerConn outgoing field for webrtc

Due to jumping straight into handshakes, outgoing=true was assumed. This didn't actually solve the issue I thought it might, but is important for determining "preferred" connection direction, which may result in dropping connections.

4 years agogo get -u ./... && go mod tidy
Matt Joiner [Sat, 2 May 2020 08:39:03 +0000 (18:39 +1000)]
go get -u ./... && go mod tidy

Not including bazil.org/fuse though.

4 years agoUse anacrolix/log in storage completion
Matt Joiner [Sat, 2 May 2020 08:37:04 +0000 (18:37 +1000)]
Use anacrolix/log in storage completion

4 years agoFix crash when announcing unloaded torrent to websocket
Matt Joiner [Sat, 2 May 2020 08:36:32 +0000 (18:36 +1000)]
Fix crash when announcing unloaded torrent to websocket

4 years agoadd BEP references to documentation of the metadata fields
Yaroslav Kolomiiets [Thu, 30 Apr 2020 19:23:20 +0000 (20:23 +0100)]
add BEP references to documentation of the metadata fields

4 years agoDisable keepalives for http trackers
Matt Joiner [Mon, 27 Apr 2020 23:15:06 +0000 (09:15 +1000)]
Disable keepalives for http trackers

Should work around an issue with S3 trackers holding connections open for very long periods.

4 years agoAdjust websocket tracker logging levels
Matt Joiner [Mon, 27 Apr 2020 23:14:24 +0000 (09:14 +1000)]
Adjust websocket tracker logging levels

4 years agoRework tracker status lines
Matt Joiner [Mon, 27 Apr 2020 23:13:44 +0000 (09:13 +1000)]
Rework tracker status lines

4 years agoUpdate all dependencies
Matt Joiner [Thu, 23 Apr 2020 03:09:27 +0000 (13:09 +1000)]
Update all dependencies

4 years agoExpose ClientConfig.Extensions
Matt Joiner [Thu, 23 Apr 2020 03:03:35 +0000 (13:03 +1000)]
Expose ClientConfig.Extensions

Also run the storage failure test with fast disabled for the seeder. This probably would have tickled some issues in the past, so it seems like a good place to try it out.

4 years agoDon't delete requests if we're choked per BEP 6
Matt Joiner [Thu, 23 Apr 2020 02:36:19 +0000 (12:36 +1000)]
Don't delete requests if we're choked per BEP 6

This should make the expected receive chunk counts match up more correctly. It doesn't seem to affect tests at the moment, but then we don't verify the expected receive chunk counts are correct either.

4 years agoCount expected received chunks instead of flagging them
Matt Joiner [Thu, 23 Apr 2020 02:34:43 +0000 (12:34 +1000)]
Count expected received chunks instead of flagging them

This can be racy. In the TestReceiveChunkStorageFailure, when we have a storage write failure, we request the chunk again, but the peer has sometimes already sent it, and we return from the connection read loop with unexpected chunk after receiving it twice.

4 years agoClose leaked Clients in test
Matt Joiner [Thu, 23 Apr 2020 02:28:48 +0000 (12:28 +1000)]
Close leaked Clients in test

4 years agoUse anacrolix/log in test
Matt Joiner [Thu, 23 Apr 2020 01:30:19 +0000 (11:30 +1000)]
Use anacrolix/log in test

4 years agoUpdate to the most recent bazil.org/fuse that supports MacOS
Matt Joiner [Thu, 23 Apr 2020 01:26:22 +0000 (11:26 +1000)]
Update to the most recent bazil.org/fuse that supports MacOS

4 years agoRename per-torrent ws tracker and output stats
Matt Joiner [Wed, 22 Apr 2020 01:42:31 +0000 (11:42 +1000)]
Rename per-torrent ws tracker and output stats

4 years agoRemove websocket tracker logging level override
Matt Joiner [Wed, 22 Apr 2020 01:41:12 +0000 (11:41 +1000)]
Remove websocket tracker logging level override

4 years agoPool webtorrent tracker websockets at the Client level
Matt Joiner [Tue, 21 Apr 2020 08:08:43 +0000 (18:08 +1000)]
Pool webtorrent tracker websockets at the Client level

4 years agoNew metrics and log change
Matt Joiner [Mon, 20 Apr 2020 04:00:29 +0000 (14:00 +1000)]
New metrics and log change

4 years agoRemove unused outbound offer answered field
Matt Joiner [Mon, 20 Apr 2020 04:00:10 +0000 (14:00 +1000)]
Remove unused outbound offer answered field

4 years agoLog webrtc connection errors and rework webtorrent.TrackerClient
Matt Joiner [Mon, 20 Apr 2020 03:42:25 +0000 (13:42 +1000)]
Log webrtc connection errors and rework webtorrent.TrackerClient

4 years agoUpdate anacrolix/missinggo/v2 import
Matt Joiner [Mon, 20 Apr 2020 03:41:32 +0000 (13:41 +1000)]
Update anacrolix/missinggo/v2 import

4 years agoFix some webtorrent PeerConnection leaks
Matt Joiner [Mon, 20 Apr 2020 00:21:31 +0000 (10:21 +1000)]
Fix some webtorrent PeerConnection leaks

4 years agoReadability
Matt Joiner [Sun, 19 Apr 2020 01:30:48 +0000 (11:30 +1000)]
Readability

4 years agoLogging fixes
Matt Joiner [Sat, 18 Apr 2020 07:45:01 +0000 (17:45 +1000)]
Logging fixes

4 years agoFix transfer test check for seeder piece counts
Matt Joiner [Fri, 17 Apr 2020 01:40:03 +0000 (11:40 +1000)]
Fix transfer test check for seeder piece counts

I suspect that there's a race where a connection is established to the seeder, but we haven't received it's completed piece information yet, and we already finished reading all the data we need from another connection. Probably comes up now because pending peers with the same address aren't clobbering each other since that was fixed.

4 years agocmd/torrent: add -ipv4/-ipv6 options
Yaroslav Kolomiiets [Thu, 16 Apr 2020 12:17:10 +0000 (13:17 +0100)]
cmd/torrent: add -ipv4/-ipv6 options

4 years agoPull anacrolix dht and upnp log level handling updates
Matt Joiner [Thu, 16 Apr 2020 07:51:57 +0000 (17:51 +1000)]
Pull anacrolix dht and upnp log level handling updates

4 years agoFix race in Torrent.PeerConns
Matt Joiner [Thu, 16 Apr 2020 07:21:15 +0000 (17:21 +1000)]
Fix race in Torrent.PeerConns

4 years agoUpdate anacrolix/log
Matt Joiner [Thu, 16 Apr 2020 07:20:58 +0000 (17:20 +1000)]
Update anacrolix/log

4 years agoFix false positive Goland code lint
Matt Joiner [Thu, 16 Apr 2020 04:52:52 +0000 (14:52 +1000)]
Fix false positive Goland code lint

4 years agoFix small cache transfer tests
Matt Joiner [Thu, 16 Apr 2020 04:12:17 +0000 (14:12 +1000)]
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.

4 years agoFix pending peer counts in transfer tests
Matt Joiner [Thu, 16 Apr 2020 04:09:45 +0000 (14:09 +1000)]
Fix pending peer counts in transfer tests

Also expose number of peers successfully added in some method returns.

4 years agoAdjust recently added logging
Matt Joiner [Thu, 16 Apr 2020 02:17:18 +0000 (12:17 +1000)]
Adjust recently added logging

4 years agoOnly announce to DHT if we have dialers or listeners
Matt Joiner [Thu, 16 Apr 2020 02:03:27 +0000 (12:03 +1000)]
Only announce to DHT if we have dialers or listeners

4 years agoSet tracker announce numWant to 0 if we're unable to dial
Matt Joiner [Thu, 16 Apr 2020 02:02:34 +0000 (12:02 +1000)]
Set tracker announce numWant to 0 if we're unable to dial

4 years agoDon't try to do conventional dials if we have no dialers
Matt Joiner [Thu, 16 Apr 2020 02:00:49 +0000 (12:00 +1000)]
Don't try to do conventional dials if we have no dialers

Stops us from consuming all the peers we store for no reason.

4 years agoInclude hashed addr when comparing prioritized peers
Matt Joiner [Thu, 16 Apr 2020 01:59:31 +0000 (11:59 +1000)]
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.

4 years agoUpdate the peersAddedBySource expvar
Matt Joiner [Thu, 16 Apr 2020 01:56:58 +0000 (11:56 +1000)]
Update the peersAddedBySource expvar

4 years agoFix crash with conventional trackers when tcp and utp are disabled
Matt Joiner [Thu, 16 Apr 2020 00:27:17 +0000 (10:27 +1000)]
Fix crash with conventional trackers when tcp and utp are disabled

Fixes #396.

4 years agocmd/torrent: Fix -{utp,tcp}Peers defaults
Matt Joiner [Thu, 16 Apr 2020 00:26:37 +0000 (10:26 +1000)]
cmd/torrent: Fix -{utp,tcp}Peers defaults

Addresses https://github.com/anacrolix/torrent/issues/396#issuecomment-614210103.

4 years agoPEX: integrate with send throttling
Yaroslav Kolomiiets [Wed, 15 Apr 2020 12:02:34 +0000 (13:02 +0100)]
PEX: integrate with send throttling

4 years agoCount outgoing extended messages by extension protocol
Matt Joiner [Wed, 15 Apr 2020 08:09:15 +0000 (18:09 +1000)]
Count outgoing extended messages by extension protocol

4 years agoFix change in Client.newConnection
Matt Joiner [Wed, 15 Apr 2020 07:28:39 +0000 (17:28 +1000)]
Fix change in Client.newConnection

4 years agoMerge branch 'webtorrent'
Matt Joiner [Wed, 15 Apr 2020 07:26:46 +0000 (17:26 +1000)]
Merge branch 'webtorrent'

4 years agoClone the AnnounceList out of Torrent.Metainfo
Matt Joiner [Wed, 15 Apr 2020 03:07:17 +0000 (13:07 +1000)]
Clone the AnnounceList out of Torrent.Metainfo

Should fix a race with Torrent.AddTrackers

4 years agoComments and reduced locking in trackerScraper.Run
Matt Joiner [Wed, 15 Apr 2020 03:05:41 +0000 (13:05 +1000)]
Comments and reduced locking in trackerScraper.Run

4 years agoPEX: add periodic deltas
Yaroslav Kolomiiets [Wed, 8 Apr 2020 16:03:29 +0000 (17:03 +0100)]
PEX: add periodic deltas

4 years agoPEX: add connection tracking
Yaroslav Kolomiiets [Tue, 31 Mar 2020 20:14:43 +0000 (21:14 +0100)]
PEX: add connection tracking

4 years agoShare current connections with peers over PEX (anacrolix#341)
Yaroslav Kolomiiets [Wed, 11 Dec 2019 11:45:04 +0000 (11:45 +0000)]
Share current connections with peers over PEX (anacrolix#341)

4 years agoMore error handling and logging clean up
Matt Joiner [Tue, 14 Apr 2020 00:47:26 +0000 (10:47 +1000)]
More error handling and logging clean up

4 years agoFix locks around Torrent.announceRequest
Matt Joiner [Mon, 13 Apr 2020 09:13:59 +0000 (19:13 +1000)]
Fix locks around Torrent.announceRequest

4 years agowebtorrent logging improvements
Matt Joiner [Mon, 13 Apr 2020 09:13:23 +0000 (19:13 +1000)]
webtorrent logging improvements

4 years agoRename webtorrent.NewClient->NewTrackerClient
Matt Joiner [Mon, 13 Apr 2020 09:12:54 +0000 (19:12 +1000)]
Rename webtorrent.NewClient->NewTrackerClient

4 years agoTidy up the webtorrent package, remove buffer
Matt Joiner [Mon, 13 Apr 2020 04:31:39 +0000 (14:31 +1000)]
Tidy up the webtorrent package, remove buffer

4 years agoImprove webtorrent tracker client logging
Matt Joiner [Mon, 13 Apr 2020 04:17:46 +0000 (14:17 +1000)]
Improve webtorrent tracker client logging

4 years agoFix panic in status for webrtc connections
Matt Joiner [Mon, 13 Apr 2020 04:08:32 +0000 (14:08 +1000)]
Fix panic in status for webrtc connections

4 years agoUse offer_id for webrtc conn string
Matt Joiner [Mon, 13 Apr 2020 04:04:34 +0000 (14:04 +1000)]
Use offer_id for webrtc conn string

4 years agocmd/torrent: Add download -tcpPeers and -utpPeers
Matt Joiner [Sat, 11 Apr 2020 03:03:41 +0000 (13:03 +1000)]
cmd/torrent: Add download -tcpPeers and -utpPeers

4 years agoUpdate anacrolix/tagflag
Matt Joiner [Sat, 11 Apr 2020 03:03:23 +0000 (13:03 +1000)]
Update anacrolix/tagflag

4 years agoMerge branch 'torrent-cli' into webtorrent
Matt Joiner [Sat, 11 Apr 2020 02:58:12 +0000 (12:58 +1000)]
Merge branch 'torrent-cli' into webtorrent

4 years agoAdd announce and download commands to cmd/torrent
Matt Joiner [Fri, 10 Apr 2020 05:27:30 +0000 (15:27 +1000)]
Add announce and download commands to cmd/torrent

4 years agoBig tidy up of webtorrent code
Matt Joiner [Tue, 7 Apr 2020 04:30:27 +0000 (14:30 +1000)]
Big tidy up of webtorrent code

4 years agoRefactoring in webtorrent.Transport
Matt Joiner [Tue, 7 Apr 2020 02:17:21 +0000 (12:17 +1000)]
Refactoring in webtorrent.Transport

4 years agoFix missing return when creating websocket tracker announcer
Matt Joiner [Tue, 7 Apr 2020 02:16:53 +0000 (12:16 +1000)]
Fix missing return when creating websocket tracker announcer

4 years agoCreate peer connections when WebRTC connections obtain a data channel
Matt Joiner [Tue, 7 Apr 2020 00:59:10 +0000 (10:59 +1000)]
Create peer connections when WebRTC connections obtain a data channel

4 years agoStart using the webtorrent package
Matt Joiner [Mon, 6 Apr 2020 06:45:47 +0000 (16:45 +1000)]
Start using the webtorrent package

4 years agoCreate stub for websocket trackers
Matt Joiner [Mon, 6 Apr 2020 05:38:01 +0000 (15:38 +1000)]
Create stub for websocket trackers

4 years agoFix formatting directives
Matt Joiner [Mon, 6 Apr 2020 04:14:13 +0000 (14:14 +1000)]
Fix formatting directives

4 years agoImport code https://github.com/backkem/gowttest
Matt Joiner [Sun, 5 Apr 2020 03:55:14 +0000 (13:55 +1000)]
Import code https://github.com/backkem/gowttest

4 years agoAdd Piece.UpdateCompletion() method
Craig Campbell [Sun, 5 Jan 2020 02:12:02 +0000 (21:12 -0500)]
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.

4 years agocmd/torrent-pick | add missing ticker.Stop() call
ucwong [Fri, 3 Apr 2020 03:06:01 +0000 (03:06 +0000)]
cmd/torrent-pick | add missing ticker.Stop() call

4 years agoSwitch CI to go1.14
Matt Joiner [Sun, 29 Mar 2020 00:38:25 +0000 (11:38 +1100)]
Switch CI to go1.14

4 years agoUse default bbolt package alias v1.15.0
Matt Joiner [Tue, 24 Mar 2020 01:54:57 +0000 (12:54 +1100)]
Use default bbolt package alias

4 years agoFix bbolt compatibility with go1.14
Matt Joiner [Tue, 24 Mar 2020 01:52:33 +0000 (12:52 +1100)]
Fix bbolt compatibility with go1.14

4 years agoReadme: Add downstream project
Alfonso Montero [Fri, 20 Mar 2020 19:16:32 +0000 (20:16 +0100)]
Readme: Add downstream project

4 years agoRewrite file.bytesLeft
Matt Joiner [Tue, 24 Mar 2020 01:15:35 +0000 (12:15 +1100)]
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.

4 years agoRename variables in fileBytesLeft
Matt Joiner [Tue, 24 Mar 2020 00:21:42 +0000 (11:21 +1100)]
Rename variables in fileBytesLeft

4 years agoAdd abstraction and tests for #387
Matt Joiner [Tue, 24 Mar 2020 00:19:11 +0000 (11:19 +1100)]
Add abstraction and tests for #387

4 years agoLogging improvements for DHT
Matt Joiner [Tue, 17 Mar 2020 02:48:09 +0000 (13:48 +1100)]
Logging improvements for DHT

4 years agoUpdate to latest anacrolix/dht
Matt Joiner [Tue, 17 Mar 2020 02:47:53 +0000 (13:47 +1100)]
Update to latest anacrolix/dht

4 years agoAdd doc comments related to #383
Matt Joiner [Mon, 16 Mar 2020 05:30:39 +0000 (16:30 +1100)]
Add doc comments related to #383

4 years agoUse stable bit set for pending pieces PriorityBitmap
Matt Joiner [Thu, 27 Feb 2020 07:33:44 +0000 (18:33 +1100)]
Use stable bit set for pending pieces PriorityBitmap

Fixes #382.

4 years agocmd/torrent: Ditch the progress bar
Matt Joiner [Thu, 27 Feb 2020 05:50:14 +0000 (16:50 +1100)]
cmd/torrent: Ditch the progress bar

I'm not happy with any implementations. The one in use was racy anyway. Helps progress toward fixing #382.