]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
5 years agoUse a tagged version of anacrolix/log v1.0.1
Matt Joiner [Tue, 19 Feb 2019 03:48:02 +0000 (14:48 +1100)]
Use a tagged version of anacrolix/log

Fixes #312

5 years agocmd/torrent: Add -publicIp flag v1.0.0
Matt Joiner [Tue, 8 Jan 2019 04:47:01 +0000 (15:47 +1100)]
cmd/torrent: Add -publicIp flag

5 years agoSwitch to Client read locks for a few methods
Matt Joiner [Tue, 8 Jan 2019 04:46:03 +0000 (15:46 +1100)]
Switch to Client read locks for a few methods

5 years agoUpdate go mod turds
Matt Joiner [Tue, 8 Jan 2019 04:45:25 +0000 (15:45 +1100)]
Update go mod turds

5 years agoImprove bootstrap result log message
Matt Joiner [Thu, 29 Nov 2018 07:33:33 +0000 (18:33 +1100)]
Improve bootstrap result log message

5 years agotracker: Fix some comments
Matt Joiner [Wed, 28 Nov 2018 01:02:25 +0000 (12:02 +1100)]
tracker: Fix some comments

5 years agotracker: Add Announce.Context
Matt Joiner [Wed, 28 Nov 2018 01:02:12 +0000 (12:02 +1100)]
tracker: Add Announce.Context

Use it to rewrite a test that fails with recent go versions due to logging after test completion.

5 years agoUpdate go module files
Matt Joiner [Tue, 27 Nov 2018 23:32:53 +0000 (10:32 +1100)]
Update go module files

5 years agoSimplify single case select
Matt Joiner [Tue, 27 Nov 2018 23:32:44 +0000 (10:32 +1100)]
Simplify single case select

5 years agoDiscount dial errors that won't affect connection tracking
Matt Joiner [Tue, 27 Nov 2018 23:32:08 +0000 (10:32 +1100)]
Discount dial errors that won't affect connection tracking

This will reduce pressure on the conntrack instance.

5 years agoImprove network handling and only listen networks we will use
Matt Joiner [Tue, 27 Nov 2018 23:30:21 +0000 (10:30 +1100)]
Improve network handling and only listen networks we will use

Fixes #290.

5 years agoRemove unused type
Matt Joiner [Tue, 27 Nov 2018 23:26:13 +0000 (10:26 +1100)]
Remove unused type

5 years agoRemove unused code
Matt Joiner [Tue, 27 Nov 2018 12:57:17 +0000 (23:57 +1100)]
Remove unused code

5 years agoUse new conntrack priorities
Matt Joiner [Tue, 27 Nov 2018 12:22:24 +0000 (23:22 +1100)]
Use new conntrack priorities

Fixes #295

5 years agometainfo: Fix test
Matt Joiner [Tue, 27 Nov 2018 00:05:32 +0000 (11:05 +1100)]
metainfo: Fix test

[]byte(nil) now correctly bencodes to a string

5 years agobencode: Fix marshalling of []byte(nil)
Matt Joiner [Mon, 26 Nov 2018 21:57:17 +0000 (08:57 +1100)]
bencode: Fix marshalling of []byte(nil)

Also fixes #293.

5 years agoUpdate go module files
Matt Joiner [Wed, 21 Nov 2018 06:25:09 +0000 (17:25 +1100)]
Update go module files

5 years agoBump protocol strings
Matt Joiner [Wed, 21 Nov 2018 06:06:31 +0000 (17:06 +1100)]
Bump protocol strings

5 years agoLog initial DHT bootstrap results
Matt Joiner [Wed, 21 Nov 2018 06:05:56 +0000 (17:05 +1100)]
Log initial DHT bootstrap results

5 years agoRemove log that used missinggo.CryHeard
Matt Joiner [Wed, 21 Nov 2018 06:05:30 +0000 (17:05 +1100)]
Remove log that used missinggo.CryHeard

5 years agoUpdate go module files
Matt Joiner [Wed, 21 Nov 2018 06:04:27 +0000 (17:04 +1100)]
Update go module files

5 years agoAdd initial connection tracking
Matt Joiner [Wed, 21 Nov 2018 06:02:22 +0000 (17:02 +1100)]
Add initial connection tracking

5 years agoUpdate missinggo dep
Matt Joiner [Mon, 19 Nov 2018 10:03:33 +0000 (21:03 +1100)]
Update missinggo dep

5 years agoImprove error handling for listening
Matt Joiner [Mon, 19 Nov 2018 09:35:21 +0000 (20:35 +1100)]
Improve error handling for listening

Will help with #290.

5 years agoMove IpPort to missinggo
Matt Joiner [Thu, 15 Nov 2018 23:35:30 +0000 (10:35 +1100)]
Move IpPort to missinggo

5 years agoconnection.remoteIpPort is correct
Matt Joiner [Sun, 4 Nov 2018 05:59:06 +0000 (16:59 +1100)]
connection.remoteIpPort is correct

5 years agoStore remoteAddr with each connection
Matt Joiner [Sun, 4 Nov 2018 05:56:55 +0000 (16:56 +1100)]
Store remoteAddr with each connection

It would appear net.Conns returned from proxies don't have a RemoteAddr the client expects.

5 years agoPromote ipPort to its own file
Matt Joiner [Sun, 4 Nov 2018 05:56:02 +0000 (16:56 +1100)]
Promote ipPort to its own file

5 years agoFix benchmark broken by changes to client listeners
Matt Joiner [Sun, 4 Nov 2018 06:51:32 +0000 (17:51 +1100)]
Fix benchmark broken by changes to client listeners

5 years agoAdd default DHT servers when UTP disabled
Matt Joiner [Sun, 4 Nov 2018 06:43:47 +0000 (17:43 +1100)]
Add default DHT servers when UTP disabled

Also ensures that UDP and TCP sockets are reserved, even if not used, and fixes tests. Fixes #289.

5 years agoAdd test for dht servers when utp disabled
Matt Joiner [Sun, 4 Nov 2018 06:42:12 +0000 (17:42 +1100)]
Add test for dht servers when utp disabled

#289

5 years agoAdd establish outgoing connection expvar
Matt Joiner [Sun, 4 Nov 2018 05:12:16 +0000 (16:12 +1100)]
Add establish outgoing connection expvar

5 years agoSwitch to goimports import sorting
Matt Joiner [Fri, 2 Nov 2018 12:12:01 +0000 (23:12 +1100)]
Switch to goimports import sorting

Used to use sortimports, but it's old, and goimports seems to have an opinion now.

5 years agoAdd dial rate limiting
Matt Joiner [Fri, 2 Nov 2018 12:09:52 +0000 (23:09 +1100)]
Add dial rate limiting

Fixes #273.

5 years agoreverting usage of proxy for http requests
Denis Kuzmenok [Tue, 30 Oct 2018 22:32:33 +0000 (23:32 +0100)]
reverting usage of proxy for http requests

5 years agoFix timer leak in tracker announces when peers are wanted
Matt Joiner [Sun, 21 Oct 2018 07:24:22 +0000 (18:24 +1100)]
Fix timer leak in tracker announces when peers are wanted

Fixes #281.

5 years agoAdd go.sum file
Matt Joiner [Thu, 18 Oct 2018 00:11:32 +0000 (11:11 +1100)]
Add go.sum file

5 years agoRemove unused tracker.defaultClient
Matt Joiner [Thu, 18 Oct 2018 00:11:17 +0000 (11:11 +1100)]
Remove unused tracker.defaultClient

5 years agoFix TLS handshake failures with https trackers
Matt Joiner [Thu, 18 Oct 2018 00:09:56 +0000 (11:09 +1100)]
Fix TLS handshake failures with https trackers

Fixes #276

5 years agoAlways announce to trackers every interval, and announce earlier if short on peers
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

5 years agosortimports
Matt Joiner [Tue, 16 Oct 2018 09:23:43 +0000 (20:23 +1100)]
sortimports

5 years agoAdd a prefix to logonce logger output
Matt Joiner [Mon, 3 Sep 2018 01:48:31 +0000 (11:48 +1000)]
Add a prefix to logonce logger output

5 years agoAdd comments to some ClientConfig fields
Matt Joiner [Mon, 3 Sep 2018 01:48:11 +0000 (11:48 +1000)]
Add comments to some ClientConfig fields

5 years agoRevert "Make requestStrategy 3 the default"
Matt Joiner [Sat, 25 Aug 2018 06:43:28 +0000 (16:43 +1000)]
Revert "Make requestStrategy 3 the default"

This reverts commit 60dd0eed538361490cbf29a1734e6cd8d21f794f.

5 years agoImprove tracker failure reason error
Matt Joiner [Mon, 13 Aug 2018 10:28:02 +0000 (20:28 +1000)]
Improve tracker failure reason error

5 years agocmd/tracker-announce: Add a port flag
Matt Joiner [Mon, 13 Aug 2018 10:27:42 +0000 (20:27 +1000)]
cmd/tracker-announce: Add a port flag

5 years agocmd/tracker-announce: Provide a http.Client for announces
Matt Joiner [Mon, 13 Aug 2018 10:27:16 +0000 (20:27 +1000)]
cmd/tracker-announce: Provide a http.Client for announces

5 years agocmd/tracker-announce: Was using empty AnnounceRequest
Matt Joiner [Mon, 13 Aug 2018 10:26:47 +0000 (20:26 +1000)]
cmd/tracker-announce: Was using empty AnnounceRequest

5 years agoIgnore unused trailing bytes in HTTP tracker responses
Matt Joiner [Mon, 13 Aug 2018 10:24:15 +0000 (20:24 +1000)]
Ignore unused trailing bytes in HTTP tracker responses

5 years agoImprove log message
Matt Joiner [Wed, 8 Aug 2018 01:26:00 +0000 (11:26 +1000)]
Improve log message

5 years agoReplace glycerine/goconvey with smartystreets/goconvey
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.

5 years agoMerge branch 'master' into vgo-ci
Matt Joiner [Sun, 29 Jul 2018 09:52:41 +0000 (19:52 +1000)]
Merge branch 'master' into vgo-ci

5 years agoGo module install/get make no sense
Matt Joiner [Fri, 27 Jul 2018 00:44:26 +0000 (10:44 +1000)]
Go module install/get make no sense

5 years agoWhen Accept gives an error, don't use the Conn
Matt Joiner [Fri, 27 Jul 2018 00:18:56 +0000 (10:18 +1000)]
When Accept gives an error, don't use the Conn

5 years agoUse go run instead of godo
Matt Joiner [Wed, 25 Jul 2018 10:34:19 +0000 (20:34 +1000)]
Use go run instead of godo

5 years agoAnd install godo too
Matt Joiner [Wed, 25 Jul 2018 09:24:00 +0000 (19:24 +1000)]
And install godo too

5 years agoI think go get becomes go install for arbitrary commands
Matt Joiner [Wed, 25 Jul 2018 09:10:08 +0000 (19:10 +1000)]
I think go get becomes go install for arbitrary commands

5 years agoUse go modules
Matt Joiner [Wed, 25 Jul 2018 08:57:49 +0000 (18:57 +1000)]
Use go modules

5 years agoUpdate go.mod
Matt Joiner [Wed, 25 Jul 2018 08:27:43 +0000 (18:27 +1000)]
Update go.mod

5 years agoTrack received handshake encryption activity
Matt Joiner [Wed, 25 Jul 2018 07:11:56 +0000 (17:11 +1000)]
Track received handshake encryption activity

5 years agoUse the new firewall callback support in go-libutp
Matt Joiner [Wed, 25 Jul 2018 07:11:09 +0000 (17:11 +1000)]
Use the new firewall callback support in go-libutp

5 years agoLaw of Demeter Client.mu
Matt Joiner [Wed, 25 Jul 2018 03:41:50 +0000 (13:41 +1000)]
Law of Demeter Client.mu

5 years agobencode: Remove a lot of expensive allocations
Matt Joiner [Mon, 23 Jul 2018 03:12:14 +0000 (13:12 +1000)]
bencode: Remove a lot of expensive allocations

5 years agoMerge pull request #269 from JyBP/master
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

5 years agoattempt to close the client on signal
jb [Tue, 24 Jul 2018 07:34:06 +0000 (09:34 +0200)]
attempt to close the client on signal

5 years agobencode: Avoid an extra getTags call
Matt Joiner [Mon, 23 Jul 2018 01:09:42 +0000 (11:09 +1000)]
bencode: Avoid an extra getTags call

5 years agobencode: Cache struct fields
Matt Joiner [Mon, 23 Jul 2018 00:50:58 +0000 (10:50 +1000)]
bencode: Cache struct fields

5 years agobencode.Marshal: Get rid of the intermediate buffer
Matt Joiner [Mon, 23 Jul 2018 00:50:18 +0000 (10:50 +1000)]
bencode.Marshal: Get rid of the intermediate buffer

5 years agobencode: Add benchmark for krpc.Msg
Matt Joiner [Mon, 23 Jul 2018 00:32:19 +0000 (10:32 +1000)]
bencode: Add benchmark for krpc.Msg

5 years agoSet Torrent.pieces cap too
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.

5 years agoAdd iplist/cmd/iplist
Matt Joiner [Sun, 22 Jul 2018 09:51:30 +0000 (19:51 +1000)]
Add iplist/cmd/iplist

5 years agoFix iplist.Range.String, and a comment
Matt Joiner [Sun, 22 Jul 2018 02:59:02 +0000 (12:59 +1000)]
Fix iplist.Range.String, and a comment

5 years agoDon't return if there's an error accepting
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.

5 years agoWake connections that could send a request for a deleted piece
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.

5 years agoSwitch pieceIndex back to an int
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.

5 years agobencode: Avoid Value.Interface call testing for big.Int
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.

5 years agoDon't randomize chunk order for requestStrategy 3
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.

5 years agoReduce default handshake timeout to 3s
Matt Joiner [Sun, 15 Jul 2018 03:01:22 +0000 (13:01 +1000)]
Reduce default handshake timeout to 3s

5 years agoCalculate peer priority lazily for worse conn comparison
Matt Joiner [Sun, 15 Jul 2018 02:57:52 +0000 (12:57 +1000)]
Calculate peer priority lazily for worse conn comparison

5 years agoFix doc comment
Matt Joiner [Sun, 15 Jul 2018 02:56:28 +0000 (12:56 +1000)]
Fix doc comment

5 years agoFix connection.utp
Matt Joiner [Sun, 15 Jul 2018 02:55:49 +0000 (12:55 +1000)]
Fix connection.utp

5 years agoTrack metadata chunks read with its own Count
Matt Joiner [Sun, 15 Jul 2018 00:09:58 +0000 (10:09 +1000)]
Track metadata chunks read with its own Count

5 years agoRewrite piece data decoding and relax test
Matt Joiner [Sat, 14 Jul 2018 01:50:43 +0000 (11:50 +1000)]
Rewrite piece data decoding and relax test

5 years agopeer_protocol: Add a test for receiving overlong piece data
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.

5 years agoSend extended message before fast/bitfield
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.

5 years agoFix peer_protocol.Message.RequestSpec for Type Piece
Matt Joiner [Fri, 13 Jul 2018 11:33:21 +0000 (21:33 +1000)]
Fix peer_protocol.Message.RequestSpec for Type Piece

5 years agoAdd a test that short pieces are decoded correctly
Matt Joiner [Wed, 11 Jul 2018 23:54:06 +0000 (09:54 +1000)]
Add a test that short pieces are decoded correctly

5 years agoComments and trivial tweaks
Matt Joiner [Wed, 11 Jul 2018 23:42:00 +0000 (09:42 +1000)]
Comments and trivial tweaks

5 years agoAdd peer_protocol.Integer.Uint32
Matt Joiner [Wed, 11 Jul 2018 23:16:40 +0000 (09:16 +1000)]
Add peer_protocol.Integer.Uint32

5 years agoAdd peer_protocol.RequestSpec
Matt Joiner [Wed, 11 Jul 2018 23:16:17 +0000 (09:16 +1000)]
Add peer_protocol.RequestSpec

5 years agoChange pieceIndex to peer_protocol.Integer
Matt Joiner [Wed, 11 Jul 2018 23:15:15 +0000 (09:15 +1000)]
Change pieceIndex to peer_protocol.Integer

5 years agoMove back to net.IP for extended handshake message IPs
Matt Joiner [Wed, 11 Jul 2018 14:00:07 +0000 (00:00 +1000)]
Move back to net.IP for extended handshake message IPs

5 years agoDon't error on bencode dicts that can't be marshalled
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.

5 years agoSupport marshalling bencode strings into byte arrays
Matt Joiner [Wed, 11 Jul 2018 05:22:29 +0000 (15:22 +1000)]
Support marshalling bencode strings into byte arrays

5 years agoDecide where to set proxy for HTTP trackers
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).

5 years agoRemove debug log
Matt Joiner [Tue, 10 Jul 2018 03:14:39 +0000 (13:14 +1000)]
Remove debug log

5 years agoUse half open limit directly from Config
Matt Joiner [Tue, 10 Jul 2018 02:23:00 +0000 (12:23 +1000)]
Use half open limit directly from Config

5 years agoMake extended handshake a struct, and move a bunch of extended stuff into peer_protocol
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

5 years agoMove PEX stuff into peer_protocol
Matt Joiner [Tue, 10 Jul 2018 01:21:24 +0000 (11:21 +1000)]
Move PEX stuff into peer_protocol

5 years agoReinstate the reduce dial timeout and update some values
Matt Joiner [Tue, 10 Jul 2018 01:19:14 +0000 (11:19 +1000)]
Reinstate the reduce dial timeout and update some values

Fixes #263