Matt Joiner
e8ff870994
dht: Except local network addresses from security checks
2015-12-17 23:51:50 +11:00
Matt Joiner
127fad47dd
dht: Move security tests into separate file
2015-12-17 23:36:57 +11:00
Matt Joiner
f09c0cd2ec
dht: Move security functions into new file
2015-12-17 23:22:39 +11:00
Matt Joiner
565fb20139
Add OnQuery hook, thanks to Cathal Garvey
2015-12-16 15:20:37 +11:00
Matt Joiner
6d8310d2df
Test improvements
2015-12-16 15:16:53 +11:00
Matt Joiner
44ec4d9bdb
Add NodeIdHex config option
2015-12-16 15:15:59 +11:00
Matt Joiner
4798907da4
Add NoDefaultBootstrap and use it and testify in a few tests
2015-12-16 15:13:32 +11:00
Matt Joiner
86b0c02eac
Use testify for some tests
2015-12-16 15:06:23 +11:00
Matt Joiner
8a6ae76686
Standardize Torrent method receivers
2015-12-12 14:03:25 +11:00
Matt Joiner
86c4c609f1
Expose Torrent.SetDisplayName
2015-12-12 14:03:04 +11:00
Matt Joiner
83045db3e5
Docs
2015-12-12 14:00:07 +11:00
Matt Joiner
b66aa07a4d
data/pieceStore: Improve error message when pieces fail to write
2015-12-11 03:05:40 +11:00
Matt Joiner
672e3c4136
Don't consider a peer to have touched a piece if a chunk isn't written successfully
...
This prevents peers being banned when there are issues with the data service locally.
2015-12-11 03:04:04 +11:00
Matt Joiner
8c37ff73af
CopyURL moved to httptoo
2015-12-11 03:02:45 +11:00
Matt Joiner
5aca9d3563
Rewrite cmd/dht-ping
2015-12-08 00:45:42 +11:00
Dmitry Borzov
353e0d90ff
Fix package-docstring for dht package
2015-12-08 00:14:13 +11:00
Dmitry Borzov
b42fc90674
Fix name ambiguity for dht-ping, too many things are called pingResponses
2015-12-08 00:13:50 +11:00
Matt Joiner
54853c11cc
sortimports
2015-12-07 23:11:39 +11:00
Matt Joiner
ff835db955
Actually fix #41 properly; and several big changes
...
bencode:
* Handle omitempty on non-trivial types.
cmd/dht-ping:
* Handle timeouts in ping transactions.
dht:
* Propagate failed transaction responses properly.
* Msg related tests are moved into their own file.
* In some places, IPs in binary form are shorted to 4 bytes if IPv4.
2015-12-07 03:28:28 +11:00
Matt Joiner
b86253c80d
Fix #41
2015-12-07 02:39:00 +11:00
Matt Joiner
b13444f12e
Merge pull request #42 from dborzov/dht
...
Nicer godoc strings for dht package, and breaking source up into different files
2015-12-07 01:23:19 +11:00
Dmitry Borzov
87c9697a26
Move dht.Server defs to a separate file
2015-12-06 17:56:46 +03:00
Dmitry Borzov
1adae8cb47
Move Transaction & nodeInfo defs to dedicated files
2015-12-06 00:34:46 +03:00
Dmitry Borzov
3f228d9f3b
Fix godoc strings for dht package
2015-12-05 23:40:41 +03:00
Matt Joiner
5886fa1d6b
cmd/torrent-infohash: Switch to tagflag
2015-11-22 18:49:44 +11:00
Matt Joiner
9230a1b9df
Use uiprogress to display a progress bar per torrent
2015-11-22 18:45:06 +11:00
Matt Joiner
2bdb6a14da
Expose torrent.Seeding
2015-11-22 18:44:33 +11:00
Matt Joiner
79eb1ca0d5
torrent.DisplayName should not be exported
2015-11-22 18:44:08 +11:00
Matt Joiner
b10c992171
Test announcing to third party servers shouldn't fail if none respond
2015-11-13 23:36:38 +11:00
Matt Joiner
306013eba6
Add coverage badge to README
2015-11-13 22:51:20 +11:00
Matt Joiner
b3ed8ca09e
data/pieceStore/dataBackend: ErrNotFound now aliases os.ErrNotExist
2015-11-13 22:35:18 +11:00
Matt Joiner
fdf46e00b7
dht: Don't log KRPC unmarshal errors, there's a expvar for this
2015-11-13 22:34:29 +11:00
Matt Joiner
9f38d212e4
Blocking IPv6 addresses is not so interesting
2015-11-13 22:33:50 +11:00
Matt Joiner
55cae072f5
Add method File.Torrent
2015-11-12 03:25:04 +11:00
Matt Joiner
1a01ea87df
TODO
2015-11-12 03:24:41 +11:00
Matt Joiner
cb782aa303
internal/cmd/bloom-false-positives: Switch to tagflag
...
Was looking at using github.com/tylertreat/BoomFilters instead of github.com/willf/bloom
2015-11-09 23:05:52 +11:00
Matt Joiner
6d7dd06b47
Add comment doc for File.PrioritizeRegion
2015-11-09 22:27:38 +11:00
Matt Joiner
bc5d79e1d3
Make torrent.Reader reads fail when the torrent is closed instead of stalling
2015-11-06 00:40:47 +11:00
Matt Joiner
d01c6221e6
Remove sync.Cond from piece
...
It's not trivial to ensure that anyone waiting on the piece Cond will wake on events like the torrent being dropped from the client.
2015-11-06 00:40:16 +11:00
Matt Joiner
c7f9bfccc1
Ditch go-flags for tagflag
...
Fixes #37
2015-11-05 23:21:39 +11:00
Matt Joiner
5f4fdfbd3d
bencode: Improve unknown value type error
2015-11-03 23:21:10 +11:00
Matt Joiner
4f03dd3fc7
httpfile.Open can now return an error
2015-10-30 22:21:48 +11:00
Matt Joiner
f9c600b264
metainfo: Add alternative "builder" API
...
The existing builder API is gross and heavy-handed. I won't rip it out just yet.
2015-10-30 01:21:09 +11:00
Matt Joiner
61798cd94c
dht: Handle bad responses to get_peers
2015-10-30 01:18:29 +11:00
Matt Joiner
f8fb480817
Avoid copying mutex in piece
2015-10-30 01:16:52 +11:00
Matt Joiner
5372375bd5
Fix #35
2015-10-29 23:47:13 +11:00
Matt Joiner
e912ac5293
Add test for issue 35
2015-10-29 23:46:47 +11:00
Matt Joiner
db3ec698e9
Some missing io.EOFs
2015-10-23 12:45:51 +11:00
Matt Joiner
4c4eae20a2
data/pieceStore: Expose flags in Open method
2015-10-23 12:45:11 +11:00
Matt Joiner
ea0ccf6a23
Tidy
2015-10-23 12:42:57 +11:00