Matt Joiner
fe43ce07c8
Quote UDP tracker response error bodies with %#q
2022-02-20 16:15:45 +11:00
Matt Joiner
a324fbfee3
Make use of the lazylog branch of anacrolix/log
...
This avoids significant allocations and overhead.
2022-01-31 17:22:36 +11:00
Matt Joiner
50fcd908ca
tracker/udp.ConnClient: Make logging configurable
...
Should fix https://github.com/anacrolix/torrent/issues/701#issue-1088130173
2021-12-28 12:05:01 +11:00
Matt Joiner
aaec4dbd80
tracker/udp: Panic on read errors if ConnClient not closed
...
There's nothing exposed to handle this error currently, and if it occurs, it's better not to fail in silence. I'm currently debugging a situation where ConnClients stop working, this would be a condition we'd want to know about.
2021-11-23 08:35:45 +11:00
Matt Joiner
615669ecf8
Improve logging of UDP tracker packet dispatch error
2021-11-23 08:33:29 +11:00
Matt Joiner
aae32e2a31
Wrap UDP tracker response error
2021-11-23 08:32:25 +11:00
Matt Joiner
6cb65f4ecf
Don't dial in UDP tracking
...
This could fix an issue where tracker addresses change, but we're already bound to a particular address and so fail to receive any more responses.
It should also make it easier to share UDP sockets between UDP tracker clients, although that's not currently implemented.
2021-11-22 18:11:09 +11:00
Matt Joiner
8555ab7f21
Doc comments
2021-11-22 18:10:47 +11:00
Bora M. Alper
16176b762e
Add linter CI ( #542 )
...
* Add linter CI
Signed-off-by: Bora M. Alper <bora@boramalper.org>
* Make gosec CI ignore SHA1 and upload sarif
Signed-off-by: Bora M. Alper <bora@boramalper.org>
* Fix formatting of source files
Signed-off-by: Bora M. Alper <bora@boramalper.org>
* Make go vet ignore unkeyed composite literals and fix other warnings
Signed-off-by: Bora M. Alper <bora@boramalper.org>
* Make staticcheck ignore unused methods and fix other warnings
Signed-off-by: Bora M. Alper <bora@boramalper.org>
* Use golangci-lint
Signed-off-by: Bora M. Alper <bora@boramalper.org>
2021-08-16 11:11:31 +10:00
Matt Joiner
83749028ec
Trim UDP tracker client read allocations
2021-07-26 10:18:24 +10:00
Matt Joiner
4fb13a1868
Fix race in concurrent connects in UDP tracker
2021-06-27 11:57:28 +10:00
Matt Joiner
9c81516139
Check that udp conn ID age is non-zero
2021-06-25 15:00:39 +10:00
Matt Joiner
d4bf547801
Add udp tracker scrape support
2021-06-24 23:13:35 +10:00
Matt Joiner
a3159e6b11
Cancel writer after request
2021-06-24 23:13:35 +10:00
Matt Joiner
4bcf71c729
Don't log dispatch errors
2021-06-24 23:13:35 +10:00
Matt Joiner
98a1423732
Extract protocol agnostic tracker Client
2021-06-24 23:13:35 +10:00
Matt Joiner
101a269873
Rewrite udp announce to use udp client
2021-06-24 23:13:35 +10:00
Matt Joiner
42a2fb445f
Rearrange some tracker tests and files
2021-06-22 23:32:27 +10:00
Matt Joiner
333c878d2b
Rewrite UDP tracker client
2021-06-22 22:36:43 +10:00
Matt Joiner
5f7ad4c769
Merge all the tracker packages, why would anyone want them separately?
2015-03-27 15:12:15 +11:00
Matt Joiner
842a32ae0c
Rewrite import paths for migration from Bitbucket
2015-03-20 16:37:44 +11:00
Matt Joiner
b3c4afbe25
Add BEP 41 support
2015-03-12 20:07:10 +11:00
Matt Joiner
ba1367536c
tracker/udp: Tidy up tests
2014-12-03 12:51:49 -06:00
Matt Joiner
c75f79b097
Speed up tests, allow -short for some UDP tracker stuff
2014-12-02 14:23:01 -06:00
Matt Joiner
aff0999ddf
Skip on errors testing UDP tracker, need to implement a fake server
2014-12-01 14:29:08 -06:00
Matt Joiner
285ecb8418
tracker: Add an explicit URL() method
...
Needed for merging tracker lists.
2014-11-20 23:39:56 -06:00
Matt Joiner
ae28507f30
tracker/udp: Triage errors in tests to real hosts
2014-11-20 16:24:49 -06:00
Matt Joiner
e947ce2ee4
Run go vet on everything
2014-07-10 02:59:37 +10:00
Matt Joiner
f45d397e41
udp_tracker: If a read deadline occurs, writes were failing with i/o timeout
2014-06-23 20:30:31 +10:00
Matt Joiner
0f3c4cb3ec
Add some String methods and contextual information in log messages
2014-05-21 00:52:49 +10:00
Matt Joiner
1415c0d824
goimports decided to reorganise imports
2014-04-08 19:39:34 +10:00
Matt Joiner
9e7caacbe3
Tidy up
2014-03-20 22:02:15 +11:00
Matt Joiner
31530899e4
Make use of trackers
2014-03-17 02:30:10 +11:00
Matt Joiner
e68d5fec1f
Simplify the tracker.New interface, just take a string
2013-12-16 18:47:23 +11:00
Matt Joiner
5f093c3803
Fixes and tests for UDP tracker protocol
2013-12-14 22:21:45 +11:00
Matt Joiner
8baadf0af3
Fix parsing of UDP announce response peers
2013-12-14 22:20:13 +11:00
Matt Joiner
843c954c09
Implementing UDP tracker in its own module
2013-11-07 01:55:29 +11:00