]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
3 years agoFix webseed requests for non-trivial path components v1.17.1
Matt Joiner [Tue, 6 Oct 2020 23:22:55 +0000 (10:22 +1100)]
Fix webseed requests for non-trivial path components

3 years agoFix PeerConn conn status string v1.17.0
Matt Joiner [Mon, 5 Oct 2020 22:50:47 +0000 (09:50 +1100)]
Fix PeerConn conn status string

3 years agoFix unused import
Matt Joiner [Thu, 1 Oct 2020 01:50:42 +0000 (11:50 +1000)]
Fix unused import

3 years agoSet tracker announce timeout back to default
Matt Joiner [Thu, 1 Oct 2020 01:45:47 +0000 (11:45 +1000)]
Set tracker announce timeout back to default

Add lots of comments about how this works and why.

3 years agoExpose Client.ConnStats
Matt Joiner [Thu, 1 Oct 2020 01:20:44 +0000 (11:20 +1000)]
Expose Client.ConnStats

3 years agoInclude ip param in http announces
Matt Joiner [Thu, 1 Oct 2020 00:46:27 +0000 (10:46 +1000)]
Include ip param in http announces

3 years agoPass key param in http announces
Matt Joiner [Thu, 1 Oct 2020 00:45:29 +0000 (10:45 +1000)]
Pass key param in http announces

3 years agoRework HTTP announce timeouts
Matt Joiner [Thu, 1 Oct 2020 00:45:05 +0000 (10:45 +1000)]
Rework HTTP announce timeouts

Use Request.Context to implement timeouts, set the default to 3s for announces from the Client.

3 years agoLimit simultaneous announces to the same URL
Matt Joiner [Thu, 1 Oct 2020 00:43:10 +0000 (10:43 +1000)]
Limit simultaneous announces to the same URL

3 years agoLimit half-open connections at the Client level
Matt Joiner [Wed, 30 Sep 2020 06:56:27 +0000 (16:56 +1000)]
Limit half-open connections at the Client level

3 years agoRename struct size test
Matt Joiner [Tue, 29 Sep 2020 06:42:52 +0000 (16:42 +1000)]
Rename struct size test

3 years agoOptimize padding on Piece
Matt Joiner [Tue, 29 Sep 2020 06:37:58 +0000 (16:37 +1000)]
Optimize padding on Piece

3 years agoAdd a test for Piece size
Matt Joiner [Tue, 29 Sep 2020 06:24:43 +0000 (16:24 +1000)]
Add a test for Piece size

3 years agoFix conn status string for WebRTC connections
Matt Joiner [Tue, 29 Sep 2020 06:21:54 +0000 (16:21 +1000)]
Fix conn status string for WebRTC connections

3 years agoFix panic for unexpected piece rejections v1.16.0
Matt Joiner [Thu, 3 Sep 2020 04:34:06 +0000 (14:34 +1000)]
Fix panic for unexpected piece rejections

Should fix #419.

3 years agoAdd to downstream projects in README
Matt Joiner [Tue, 11 Aug 2020 01:43:12 +0000 (11:43 +1000)]
Add to downstream projects in README

CortexFoundation/torrentfs

3 years agoAdd ReadExtendedHandshake callback
Matt Joiner [Wed, 15 Jul 2020 06:16:09 +0000 (16:16 +1000)]
Add ReadExtendedHandshake callback

3 years agoExpose peer.RemoteAddr
Matt Joiner [Wed, 15 Jul 2020 06:15:38 +0000 (16:15 +1000)]
Expose peer.RemoteAddr

3 years agoSwitch to crawshaw.io/sqlite
Matt Joiner [Wed, 15 Jul 2020 06:13:26 +0000 (16:13 +1000)]
Switch to crawshaw.io/sqlite

I'm using it elsewhere, and it seems to conflict when linking with github.com/mattn/go-sqlite3.

3 years agoAdd some client callbacks
Matt Joiner [Wed, 15 Jul 2020 04:00:47 +0000 (14:00 +1000)]
Add some client callbacks

3 years agoAdd PkgGoDev badge
Matt Joiner [Tue, 14 Jul 2020 22:39:44 +0000 (08:39 +1000)]
Add PkgGoDev badge

3 years agoPull in go-libutp fix for race
Matt Joiner [Fri, 10 Jul 2020 03:24:08 +0000 (13:24 +1000)]
Pull in go-libutp fix for race

3 years agoSupport -testPeer addresses that need resolving
Matt Joiner [Fri, 10 Jul 2020 03:21:24 +0000 (13:21 +1000)]
Support -testPeer addresses that need resolving

Fixes #395.

3 years agoHandle errors in webseed peers for bad URLs
Matt Joiner [Fri, 10 Jul 2020 03:18:33 +0000 (13:18 +1000)]
Handle errors in webseed peers for bad URLs

3 years agoUpdate bbolt
Matt Joiner [Fri, 19 Jun 2020 02:24:03 +0000 (12:24 +1000)]
Update bbolt

3 years agoDon't filter context cancel errors
Matt Joiner [Fri, 19 Jun 2020 01:41:26 +0000 (11:41 +1000)]
Don't filter context cancel errors

The caller thinks this means it succeeded, when it fact it was cancelled and it should interpret that appropriately.

3 years agoTidy up webseed peer naming and unused types
Matt Joiner [Thu, 4 Jun 2020 01:58:18 +0000 (11:58 +1000)]
Tidy up webseed peer naming and unused types

3 years agoFix panic in webseed request rejection logging
Matt Joiner [Thu, 4 Jun 2020 01:50:20 +0000 (11:50 +1000)]
Fix panic in webseed request rejection logging

Also use a new helper in Logger to simplify things.

3 years agotorrent : add udp scheme to 'switch case'
ucwong [Wed, 3 Jun 2020 04:35:52 +0000 (04:35 +0000)]
torrent : add udp scheme to 'switch case'

3 years agoAdd DisallowDataDownload/Upload to TorrentSpec and small log cleanup
Maxb [Wed, 3 Jun 2020 19:17:47 +0000 (12:17 -0700)]
Add DisallowDataDownload/Upload to TorrentSpec and small log cleanup

3 years agoMerge pull request #410 from anacrolix/webseeds
Matt Joiner [Wed, 3 Jun 2020 01:25:08 +0000 (11:25 +1000)]
Merge pull request #410 from anacrolix/webseeds

* Rename Peer to PeerInfo, and unexport PeerInfos

* Break peer out from PeerConn

* Abstract out segments mapping and use it in mmap storage

* Got file storage working with segment index

* Fix race in webtorrent.TrackerClient.Run

* storage file implementation: Error on short writes

* Remove debug logging from storage file implementation

* cmd/torrent-verify: Fix piece hash output

* Support disabling webtorrent

* Further progress on webseeding

* Handle webseed Client events

* Rename fastestConn->fastestPeer

* Add webseeds from magnet links

* Remove events from webseed

Manage this stuff inside the webseed peer instead.

* Make use of magnet source fields and expose Torrent.MergeSpec

* Add option to disable webseeds

* Fix webseeds when info isn't available immediately

* Handle webseed request errors

* Tidy up the interface changes

3 years agoTidy up the interface changes
Matt Joiner [Tue, 2 Jun 2020 07:41:59 +0000 (17:41 +1000)]
Tidy up the interface changes

3 years agoHandle webseed request errors
Matt Joiner [Tue, 2 Jun 2020 06:41:49 +0000 (16:41 +1000)]
Handle webseed request errors

3 years agoFix webseeds when info isn't available immediately
Matt Joiner [Tue, 2 Jun 2020 06:18:25 +0000 (16:18 +1000)]
Fix webseeds when info isn't available immediately

3 years agoAdd option to disable webseeds
Matt Joiner [Tue, 2 Jun 2020 06:17:32 +0000 (16:17 +1000)]
Add option to disable webseeds

3 years agoMake use of magnet source fields and expose Torrent.MergeSpec
Matt Joiner [Tue, 2 Jun 2020 05:06:05 +0000 (15:06 +1000)]
Make use of magnet source fields and expose Torrent.MergeSpec

3 years agoRemove events from webseed
Matt Joiner [Tue, 2 Jun 2020 03:54:26 +0000 (13:54 +1000)]
Remove events from webseed

Manage this stuff inside the webseed peer instead.

3 years agoAdd webseeds from magnet links
Matt Joiner [Tue, 2 Jun 2020 03:53:25 +0000 (13:53 +1000)]
Add webseeds from magnet links

3 years agoAdd per-torrent ability to disable uploading
Maxb [Sat, 30 May 2020 19:42:51 +0000 (12:42 -0700)]
Add per-torrent ability to disable uploading

3 years agoRename fastestConn->fastestPeer
Matt Joiner [Mon, 1 Jun 2020 09:09:17 +0000 (19:09 +1000)]
Rename fastestConn->fastestPeer

3 years agoHandle webseed Client events
Matt Joiner [Mon, 1 Jun 2020 08:41:21 +0000 (18:41 +1000)]
Handle webseed Client events

3 years agoFurther progress on webseeding
Matt Joiner [Mon, 1 Jun 2020 08:25:45 +0000 (18:25 +1000)]
Further progress on webseeding

3 years agoSupport disabling webtorrent
Matt Joiner [Mon, 1 Jun 2020 08:24:46 +0000 (18:24 +1000)]
Support disabling webtorrent

3 years agocmd/torrent-verify: Fix piece hash output
Matt Joiner [Mon, 1 Jun 2020 01:16:17 +0000 (11:16 +1000)]
cmd/torrent-verify: Fix piece hash output

3 years agoRemove debug logging from storage file implementation
Matt Joiner [Mon, 1 Jun 2020 01:12:51 +0000 (11:12 +1000)]
Remove debug logging from storage file implementation

3 years agostorage file implementation: Error on short writes
Matt Joiner [Mon, 1 Jun 2020 01:12:33 +0000 (11:12 +1000)]
storage file implementation: Error on short writes

3 years agoFix race in webtorrent.TrackerClient.Run
Matt Joiner [Mon, 1 Jun 2020 01:11:41 +0000 (11:11 +1000)]
Fix race in webtorrent.TrackerClient.Run

3 years agoGot file storage working with segment index
Matt Joiner [Sun, 31 May 2020 14:14:51 +0000 (00:14 +1000)]
Got file storage working with segment index

3 years agocmd/torrent-verify now needs to call InitIndex
Matt Joiner [Sun, 31 May 2020 14:04:15 +0000 (00:04 +1000)]
cmd/torrent-verify now needs to call InitIndex

3 years agoconnLessTrusted takes peer instead of PeerConn
Matt Joiner [Sun, 31 May 2020 14:03:51 +0000 (00:03 +1000)]
connLessTrusted takes peer instead of PeerConn

3 years agowebseed Client skeleton
Matt Joiner [Sun, 31 May 2020 11:00:44 +0000 (21:00 +1000)]
webseed Client skeleton

3 years agoAbstract out segments mapping and use it in mmap storage
Matt Joiner [Sun, 31 May 2020 11:00:19 +0000 (21:00 +1000)]
Abstract out segments mapping and use it in mmap storage

3 years agoExport PeerImpl and all its methods
Matt Joiner [Sun, 31 May 2020 03:22:36 +0000 (13:22 +1000)]
Export PeerImpl and all its methods

3 years agoGot things compiling
Matt Joiner [Sun, 31 May 2020 03:09:56 +0000 (13:09 +1000)]
Got things compiling

3 years agoSave progress
Matt Joiner [Sat, 30 May 2020 07:52:27 +0000 (17:52 +1000)]
Save progress

3 years agoSeperate peer and PeerConn
Matt Joiner [Sat, 30 May 2020 05:18:28 +0000 (15:18 +1000)]
Seperate peer and PeerConn

3 years agoBreak peer out from PeerConn
Matt Joiner [Sat, 30 May 2020 00:14:20 +0000 (10:14 +1000)]
Break peer out from PeerConn

3 years agoRename Peer to PeerInfo, and unexport PeerInfos
Matt Joiner [Fri, 29 May 2020 09:44:48 +0000 (19:44 +1000)]
Rename Peer to PeerInfo, and unexport PeerInfos

3 years agoBEP27 isn't implemented
Matt Joiner [Sun, 24 May 2020 07:47:16 +0000 (17:47 +1000)]
BEP27 isn't implemented

https://github.com/anacrolix/torrent/issues/406

4 years agotorrent-metainfo-pprint: include the 'nodes' field into the output when non-empty
Yaroslav Kolomiiets [Wed, 20 May 2020 16:18:00 +0000 (17:18 +0100)]
torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty

4 years agoFix panic closing torrent that failed to open storage
Matt Joiner [Thu, 21 May 2020 02:17:10 +0000 (12:17 +1000)]
Fix panic closing torrent that failed to open storage

4 years agoImprove cmd/tracker-announce output
Matt Joiner [Wed, 20 May 2020 02:04:53 +0000 (12:04 +1000)]
Improve cmd/tracker-announce output

4 years agoDon't error on setting info when we already have it
Matt Joiner [Tue, 19 May 2020 05:22:58 +0000 (15:22 +1000)]
Don't error on setting info when we already have it

4 years agoFix https://github.com/anacrolix/torrent/issues/388
Matt Joiner [Tue, 19 May 2020 05:00:08 +0000 (15:00 +1000)]
Fix https://github.com/anacrolix/torrent/issues/388

4 years agoAdd tests for https://github.com/anacrolix/torrent/issues/388
Matt Joiner [Tue, 19 May 2020 04:59:45 +0000 (14:59 +1000)]
Add tests for https://github.com/anacrolix/torrent/issues/388

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