]>
Sergey Matveev's repositories - btrtrc.git/log
Matt Joiner [Thu, 18 Oct 2018 00:11:17 +0000 (11:11 +1100)]
Remove unused tracker.defaultClient
Matt Joiner [Thu, 18 Oct 2018 00:09:56 +0000 (11:09 +1100)]
Fix TLS handshake failures with https trackers
Fixes #276
Matt Joiner [Wed, 17 Oct 2018 23:35:38 +0000 (10:35 +1100)]
Always announce to trackers every interval, and announce earlier if short on peers
Matt Joiner [Tue, 16 Oct 2018 09:23:43 +0000 (20:23 +1100)]
sortimports
Matt Joiner [Mon, 3 Sep 2018 01:48:31 +0000 (11:48 +1000)]
Add a prefix to logonce logger output
Matt Joiner [Mon, 3 Sep 2018 01:48:11 +0000 (11:48 +1000)]
Add comments to some ClientConfig fields
Matt Joiner [Sat, 25 Aug 2018 06:43:28 +0000 (16:43 +1000)]
Revert "Make requestStrategy 3 the default"
This reverts commit
60dd0eed538361490cbf29a1734e6cd8d21f794f .
Matt Joiner [Mon, 13 Aug 2018 10:28:02 +0000 (20:28 +1000)]
Improve tracker failure reason error
Matt Joiner [Mon, 13 Aug 2018 10:27:42 +0000 (20:27 +1000)]
cmd/tracker-announce: Add a port flag
Matt Joiner [Mon, 13 Aug 2018 10:27:16 +0000 (20:27 +1000)]
cmd/tracker-announce: Provide a http.Client for announces
Matt Joiner [Mon, 13 Aug 2018 10:26:47 +0000 (20:26 +1000)]
cmd/tracker-announce: Was using empty AnnounceRequest
Matt Joiner [Mon, 13 Aug 2018 10:24:15 +0000 (20:24 +1000)]
Ignore unused trailing bytes in HTTP tracker responses
Matt Joiner [Wed, 8 Aug 2018 01:26:00 +0000 (11:26 +1000)]
Improve log message
Matt Joiner [Mon, 30 Jul 2018 02:43:51 +0000 (12:43 +1000)]
Replace glycerine/goconvey with smartystreets/goconvey
It went missing, and some dependency wants it.
Matt Joiner [Sun, 29 Jul 2018 09:52:41 +0000 (19:52 +1000)]
Merge branch 'master' into vgo-ci
Matt Joiner [Fri, 27 Jul 2018 00:44:26 +0000 (10:44 +1000)]
Go module install/get make no sense
Matt Joiner [Fri, 27 Jul 2018 00:18:56 +0000 (10:18 +1000)]
When Accept gives an error, don't use the Conn
Matt Joiner [Wed, 25 Jul 2018 10:34:19 +0000 (20:34 +1000)]
Use go run instead of godo
Matt Joiner [Wed, 25 Jul 2018 09:24:00 +0000 (19:24 +1000)]
And install godo too
Matt Joiner [Wed, 25 Jul 2018 09:10:08 +0000 (19:10 +1000)]
I think go get becomes go install for arbitrary commands
Matt Joiner [Wed, 25 Jul 2018 08:57:49 +0000 (18:57 +1000)]
Use go modules
Matt Joiner [Wed, 25 Jul 2018 08:27:43 +0000 (18:27 +1000)]
Update go.mod
Matt Joiner [Wed, 25 Jul 2018 07:11:56 +0000 (17:11 +1000)]
Track received handshake encryption activity
Matt Joiner [Wed, 25 Jul 2018 07:11:09 +0000 (17:11 +1000)]
Use the new firewall callback support in go-libutp
Matt Joiner [Wed, 25 Jul 2018 03:41:50 +0000 (13:41 +1000)]
Law of Demeter Client.mu
Matt Joiner [Mon, 23 Jul 2018 03:12:14 +0000 (13:12 +1000)]
bencode: Remove a lot of expensive allocations
Matt Joiner [Tue, 24 Jul 2018 08:20:23 +0000 (18:20 +1000)]
Merge pull request #269 from JyBP/master
cmd/torrent: Listen to termination signals
jb [Tue, 24 Jul 2018 07:34:06 +0000 (09:34 +0200)]
attempt to close the client on signal
Matt Joiner [Mon, 23 Jul 2018 01:09:42 +0000 (11:09 +1000)]
bencode: Avoid an extra getTags call
Matt Joiner [Mon, 23 Jul 2018 00:50:58 +0000 (10:50 +1000)]
bencode: Cache struct fields
Matt Joiner [Mon, 23 Jul 2018 00:50:18 +0000 (10:50 +1000)]
bencode.Marshal: Get rid of the intermediate buffer
Matt Joiner [Mon, 23 Jul 2018 00:32:19 +0000 (10:32 +1000)]
bencode: Add benchmark for krpc.Msg
Matt Joiner [Mon, 23 Jul 2018 00:28:11 +0000 (10:28 +1000)]
Set Torrent.pieces cap too
We know exactly how many we want, and don't want to use any more memory.
Matt Joiner [Sun, 22 Jul 2018 09:51:30 +0000 (19:51 +1000)]
Add iplist/cmd/iplist
Matt Joiner [Sun, 22 Jul 2018 02:59:02 +0000 (12:59 +1000)]
Fix iplist.Range.String, and a comment
Matt Joiner [Sun, 22 Jul 2018 02:58:41 +0000 (12:58 +1000)]
Don't return if there's an error accepting
This happens if there's too many file descriptors, and left the client unresponsive.
Matt Joiner [Tue, 17 Jul 2018 11:29:54 +0000 (21:29 +1000)]
Wake connections that could send a request for a deleted piece
I'm not sure this is entirely correct, but not doing it is probably less correct. It should help prevent stalls where writers aren't requesting because they're starved out of opportunities by other connections.
Matt Joiner [Tue, 17 Jul 2018 11:28:01 +0000 (21:28 +1000)]
Switch pieceIndex back to an int
I suspect that interface conversions using packet iter are causing a lot of allocation. Either way, with the casting this adds, we should be able to change pieceIndex's type alias now with minimal code change.
Matt Joiner [Tue, 17 Jul 2018 11:25:15 +0000 (21:25 +1000)]
bencode: Avoid Value.Interface call testing for big.Int
Was resulting in significant allocation.
Matt Joiner [Tue, 17 Jul 2018 05:08:46 +0000 (15:08 +1000)]
Don't randomize chunk order for requestStrategy 3
This should also reduce a lot of allocation.
Matt Joiner [Sun, 15 Jul 2018 03:01:22 +0000 (13:01 +1000)]
Reduce default handshake timeout to 3s
Matt Joiner [Sun, 15 Jul 2018 02:57:52 +0000 (12:57 +1000)]
Calculate peer priority lazily for worse conn comparison
Matt Joiner [Sun, 15 Jul 2018 02:56:28 +0000 (12:56 +1000)]
Fix doc comment
Matt Joiner [Sun, 15 Jul 2018 02:55:49 +0000 (12:55 +1000)]
Fix connection.utp
Matt Joiner [Sun, 15 Jul 2018 00:09:58 +0000 (10:09 +1000)]
Track metadata chunks read with its own Count
Matt Joiner [Sat, 14 Jul 2018 01:50:43 +0000 (11:50 +1000)]
Rewrite piece data decoding and relax test
Matt Joiner [Sat, 14 Jul 2018 01:37:56 +0000 (11:37 +1000)]
peer_protocol: Add a test for receiving overlong piece data
The chunk buffer pool decides the upper bound on chunk data len.
Matt Joiner [Sat, 14 Jul 2018 01:28:54 +0000 (11:28 +1000)]
Send extended message before fast/bitfield
This is how Transmission does it.
Matt Joiner [Fri, 13 Jul 2018 11:33:21 +0000 (21:33 +1000)]
Fix peer_protocol.Message.RequestSpec for Type Piece
Matt Joiner [Wed, 11 Jul 2018 23:54:06 +0000 (09:54 +1000)]
Add a test that short pieces are decoded correctly
Matt Joiner [Wed, 11 Jul 2018 23:42:00 +0000 (09:42 +1000)]
Comments and trivial tweaks
Matt Joiner [Wed, 11 Jul 2018 23:16:40 +0000 (09:16 +1000)]
Add peer_protocol.Integer.Uint32
Matt Joiner [Wed, 11 Jul 2018 23:16:17 +0000 (09:16 +1000)]
Add peer_protocol.RequestSpec
Matt Joiner [Wed, 11 Jul 2018 23:15:15 +0000 (09:15 +1000)]
Change pieceIndex to peer_protocol.Integer
Matt Joiner [Wed, 11 Jul 2018 14:00:07 +0000 (00:00 +1000)]
Move back to net.IP for extended handshake message IPs
Matt Joiner [Wed, 11 Jul 2018 05:33:41 +0000 (15:33 +1000)]
Don't error on bencode dicts that can't be marshalled
Have seen metainfo announce-lists that are lists of dicts. Possibly ignoring type errors with a tag would be smarter but I'm undecided.
Matt Joiner [Wed, 11 Jul 2018 05:22:29 +0000 (15:22 +1000)]
Support marshalling bencode strings into byte arrays
Matt Joiner [Wed, 11 Jul 2018 05:10:58 +0000 (15:10 +1000)]
Decide where to set proxy for HTTP trackers
Remove old ClientConfig.setProxyURL, set this directly now through ClientConfig.TrackerHttpClient.Transport.Proxy (if your Client allows it).
Matt Joiner [Tue, 10 Jul 2018 03:14:39 +0000 (13:14 +1000)]
Remove debug log
Matt Joiner [Tue, 10 Jul 2018 02:23:00 +0000 (12:23 +1000)]
Use half open limit directly from Config
Matt Joiner [Tue, 10 Jul 2018 02:20:36 +0000 (12:20 +1000)]
Make extended handshake a struct, and move a bunch of extended stuff into peer_protocol
Matt Joiner [Tue, 10 Jul 2018 01:21:24 +0000 (11:21 +1000)]
Move PEX stuff into peer_protocol
Matt Joiner [Tue, 10 Jul 2018 01:19:14 +0000 (11:19 +1000)]
Reinstate the reduce dial timeout and update some values
Fixes #263
Matt Joiner [Tue, 10 Jul 2018 01:14:23 +0000 (11:14 +1000)]
bep40Priority: Include error in return
Matt Joiner [Mon, 9 Jul 2018 23:50:39 +0000 (09:50 +1000)]
Add more worseConn comparisons
Should fix #264.
Matt Joiner [Sat, 7 Jul 2018 01:40:06 +0000 (11:40 +1000)]
More sortimports
Matt Joiner [Sat, 7 Jul 2018 01:36:58 +0000 (11:36 +1000)]
sortimports
Matt Joiner [Sat, 7 Jul 2018 01:35:47 +0000 (11:35 +1000)]
Fix panic when failing to parse tracker URL
Matt Joiner [Sat, 7 Jul 2018 01:33:48 +0000 (11:33 +1000)]
Comments and readability
Matt Joiner [Sat, 7 Jul 2018 01:32:52 +0000 (11:32 +1000)]
Add torrent.InfoHash type alias
Matt Joiner [Sat, 7 Jul 2018 01:31:29 +0000 (11:31 +1000)]
Expose handshake stuff in peer_protocol
Matt Joiner [Sat, 30 Jun 2018 12:03:29 +0000 (22:03 +1000)]
fs/test.sh: Add sudo before happy path umount again
Matt Joiner [Sat, 30 Jun 2018 11:10:48 +0000 (21:10 +1000)]
Change the duplicateRequestTimeout to 1s
Matt Joiner [Sat, 30 Jun 2018 11:10:23 +0000 (21:10 +1000)]
Assume connections have half the download bandwidth than calculated
Matt Joiner [Fri, 29 Jun 2018 14:10:31 +0000 (00:10 +1000)]
Use timers for duplicate requests
Nothing was triggering request updates when timeouts expired. This is the simplest fix, no performance considered.
Matt Joiner [Fri, 29 Jun 2018 14:08:01 +0000 (00:08 +1000)]
Run fs/test.sh in a temporary directory and make it clean up
Matt Joiner [Fri, 29 Jun 2018 12:10:21 +0000 (22:10 +1000)]
Merge messageTypes{Sent,Posted} into torrent expvar
Matt Joiner [Thu, 28 Jun 2018 02:06:21 +0000 (12:06 +1000)]
Make requestStrategy 3 the default
Fixes #253.
Matt Joiner [Thu, 28 Jun 2018 01:12:49 +0000 (11:12 +1000)]
Fix panic in connection.iterPendingPieces when the info isn't available
Triggered by connection.iterUnbiasedPieceRequestOrder calling Torrent.numPieces. We shouldn't be iterating pieces when there's no info anyway, so don't yield any. Mentioned in https://github.com/anacrolix/torrent/issues/253#issuecomment-
400350386 .
Matt Joiner [Tue, 26 Jun 2018 11:19:49 +0000 (21:19 +1000)]
Missed deferring release of an exported status writer
Matt Joiner [Tue, 26 Jun 2018 10:47:21 +0000 (20:47 +1000)]
Fix racy Torrent.wantConns check when adding connections
Matt Joiner [Tue, 26 Jun 2018 10:24:39 +0000 (20:24 +1000)]
Add more context to an error
Matt Joiner [Tue, 26 Jun 2018 09:54:48 +0000 (19:54 +1000)]
Rework status export in tests to allow count > 1 without a server for every test
Matt Joiner [Tue, 26 Jun 2018 04:51:55 +0000 (14:51 +1000)]
Do requests synchronously, and don't request from hashing or queued pieces
Calculating the desired state was a nice idea, but too hard to debug. This way should also be faster.
Matt Joiner [Tue, 26 Jun 2018 03:04:15 +0000 (13:04 +1000)]
Check that chunks we request aren't being hashed or queued for hash
Matt Joiner [Mon, 25 Jun 2018 04:09:08 +0000 (14:09 +1000)]
Fix BenchmarkConnectionMainReadLoop
Matt Joiner [Mon, 25 Jun 2018 04:06:30 +0000 (14:06 +1000)]
Rework stats for receiving chunks
Related to #253.
Matt Joiner [Mon, 25 Jun 2018 04:03:22 +0000 (14:03 +1000)]
Remove premature initialization of Torrent.lastRequested
Matt Joiner [Sun, 24 Jun 2018 10:35:46 +0000 (20:35 +1000)]
Drop connections that send chunks we shouldn't receive
Matt Joiner [Sun, 24 Jun 2018 10:04:31 +0000 (20:04 +1000)]
Add requestStrategy 3, which duplicates requests only after a timeout
Possible solution for #253.
Matt Joiner [Sun, 24 Jun 2018 09:40:53 +0000 (19:40 +1000)]
Write received chunks that we don't have
Chunks were discarded if they belong to unprioritized pieces, even if those pieces were previously prioritized. May be contributing to #253.
Matt Joiner [Sat, 23 Jun 2018 12:32:11 +0000 (22:32 +1000)]
Retain interest if requests are outstanding and don't clear peer requests if they send not_interested
Apparent shortcomings found when trying new request algorithms.
Matt Joiner [Sat, 23 Jun 2018 08:33:56 +0000 (18:33 +1000)]
Ensure 64-bit alignment of ConnStats fields
Fixes #262.
Matt Joiner [Fri, 22 Jun 2018 07:43:51 +0000 (17:43 +1000)]
Merge branch 'dev'
Matt Joiner [Fri, 22 Jun 2018 07:43:02 +0000 (17:43 +1000)]
Update accept limit parameters
Matt Joiner [Thu, 21 Jun 2018 13:22:13 +0000 (23:22 +1000)]
Use scope timer in Torrent.writeChunk
Denis Kuzmenok [Tue, 19 Jun 2018 12:49:20 +0000 (15:49 +0300)]
moving upnp to a separate repository
Matt Joiner [Sun, 17 Jun 2018 11:21:24 +0000 (21:21 +1000)]
Improve logging in a test
Matt Joiner [Sun, 17 Jun 2018 11:20:41 +0000 (21:20 +1000)]
Disable accept rate limiting by default in tests
Matt Joiner [Sun, 17 Jun 2018 11:11:01 +0000 (21:11 +1000)]
Fix multiLess.StrictNext