Matt Joiner
3581b7c15a
Add go.sum file
2018-10-18 11:11:32 +11:00
Matt Joiner
d953ebf3ca
Remove unused tracker.defaultClient
2018-10-18 11:11:17 +11:00
Matt Joiner
ad0c33a50c
Fix TLS handshake failures with https trackers
...
Fixes #276
2018-10-18 11:09:56 +11:00
Matt Joiner
5e3f9893f3
Always announce to trackers every interval, and announce earlier if short on peers
2018-10-18 10:35:38 +11:00
Matt Joiner
c1d583d721
sortimports
2018-10-16 20:23:43 +11:00
Matt Joiner
3ed340c0e0
Add a prefix to logonce logger output
2018-09-03 11:48:31 +10:00
Matt Joiner
d493604adc
Add comments to some ClientConfig fields
2018-09-03 11:48:11 +10:00
Matt Joiner
a8787e6632
Revert "Make requestStrategy 3 the default"
...
This reverts commit 60dd0eed53
.
2018-08-25 16:43:28 +10:00
Matt Joiner
4431464fd6
Improve tracker failure reason error
2018-08-13 20:28:02 +10:00
Matt Joiner
3ae66f3693
cmd/tracker-announce: Add a port flag
2018-08-13 20:27:42 +10:00
Matt Joiner
975fa8f143
cmd/tracker-announce: Provide a http.Client for announces
2018-08-13 20:27:16 +10:00
Matt Joiner
8b4a4193a8
cmd/tracker-announce: Was using empty AnnounceRequest
2018-08-13 20:26:47 +10:00
Matt Joiner
066809403a
Ignore unused trailing bytes in HTTP tracker responses
2018-08-13 20:24:15 +10:00
Matt Joiner
3ffacb117f
Improve log message
2018-08-08 11:26:00 +10:00
Matt Joiner
e76f7fe571
Replace glycerine/goconvey with smartystreets/goconvey
...
It went missing, and some dependency wants it.
2018-07-30 12:43:51 +10:00
Matt Joiner
85a26c7d32
Merge branch 'master' into vgo-ci
2018-07-29 19:52:41 +10:00
Matt Joiner
0fdd31b6f3
Go module install/get make no sense
2018-07-27 10:44:26 +10:00
Matt Joiner
81e6061a53
When Accept gives an error, don't use the Conn
2018-07-27 10:18:56 +10:00
Matt Joiner
7ab51ee283
Use go run instead of godo
2018-07-25 20:34:19 +10:00
Matt Joiner
68bf3cb34b
And install godo too
2018-07-25 19:24:00 +10:00
Matt Joiner
823e810d8b
I think go get becomes go install for arbitrary commands
2018-07-25 19:10:08 +10:00
Matt Joiner
5baf7e0e4a
Use go modules
2018-07-25 18:57:49 +10:00
Matt Joiner
e8a4a52e00
Update go.mod
2018-07-25 18:27:43 +10:00
Matt Joiner
2f14e5dbc0
Track received handshake encryption activity
2018-07-25 17:11:56 +10:00
Matt Joiner
2940f27f9f
Use the new firewall callback support in go-libutp
2018-07-25 17:11:09 +10:00
Matt Joiner
6dd3b9c12c
Law of Demeter Client.mu
2018-07-25 13:42:28 +10:00
Matt Joiner
bf5552ae3c
bencode: Remove a lot of expensive allocations
2018-07-25 13:42:28 +10:00
Matt Joiner
57a5955f15
Merge pull request #269 from JyBP/master
...
cmd/torrent: Listen to termination signals
2018-07-24 18:20:23 +10:00
jb
5a09866db4
attempt to close the client on signal
2018-07-24 09:34:06 +02:00
Matt Joiner
61d5902786
bencode: Avoid an extra getTags call
2018-07-23 11:09:42 +10:00
Matt Joiner
341501bf93
bencode: Cache struct fields
2018-07-23 10:50:58 +10:00
Matt Joiner
2eb98189ff
bencode.Marshal: Get rid of the intermediate buffer
2018-07-23 10:50:18 +10:00
Matt Joiner
ea65ed0c2a
bencode: Add benchmark for krpc.Msg
2018-07-23 10:32:19 +10:00
Matt Joiner
631e18d231
Set Torrent.pieces cap too
...
We know exactly how many we want, and don't want to use any more memory.
2018-07-23 10:28:11 +10:00
Matt Joiner
2d6888cb97
Add iplist/cmd/iplist
2018-07-22 19:51:30 +10:00
Matt Joiner
3a7152ca21
Fix iplist.Range.String, and a comment
2018-07-22 12:59:02 +10:00
Matt Joiner
8479f215e0
Don't return if there's an error accepting
...
This happens if there's too many file descriptors, and left the client unresponsive.
2018-07-22 12:58:41 +10:00
Matt Joiner
d575877a5d
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.
2018-07-17 21:29:54 +10:00
Matt Joiner
6d6197b0a1
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.
2018-07-17 21:28:01 +10:00
Matt Joiner
b00711bb68
bencode: Avoid Value.Interface call testing for big.Int
...
Was resulting in significant allocation.
2018-07-17 21:25:15 +10:00
Matt Joiner
216cb7e356
Don't randomize chunk order for requestStrategy 3
...
This should also reduce a lot of allocation.
2018-07-17 15:08:46 +10:00
Matt Joiner
4db3870836
Reduce default handshake timeout to 3s
2018-07-15 13:01:22 +10:00
Matt Joiner
f22be3892f
Calculate peer priority lazily for worse conn comparison
2018-07-15 12:57:52 +10:00
Matt Joiner
bd5ae2cb6d
Fix doc comment
2018-07-15 12:56:28 +10:00
Matt Joiner
5fb5010762
Fix connection.utp
2018-07-15 12:55:49 +10:00
Matt Joiner
d4d3e24c6f
Track metadata chunks read with its own Count
2018-07-15 10:09:58 +10:00
Matt Joiner
91730696cf
Rewrite piece data decoding and relax test
2018-07-14 11:50:43 +10:00
Matt Joiner
01380adac3
peer_protocol: Add a test for receiving overlong piece data
...
The chunk buffer pool decides the upper bound on chunk data len.
2018-07-14 11:37:56 +10:00
Matt Joiner
d4d8f78906
Send extended message before fast/bitfield
...
This is how Transmission does it.
2018-07-14 11:28:54 +10:00
Matt Joiner
cc6441a791
Fix peer_protocol.Message.RequestSpec for Type Piece
2018-07-13 21:33:21 +10:00