Commit graph

66 commits

Author SHA1 Message Date
Leo Balduf
2f58e98832 http: add option for legacy PHP URLs 2017-12-05 10:41:43 +01:00
Jimmy Zelinskie
80558648d7 Merge pull request #363 from jzelinskie/req-san
Request Sanitizer via library
2017-10-18 12:45:25 -04:00
Jimmy Zelinskie
df0de94337 frontend/http: bandwidth are in bytes not pieces 2017-10-18 11:51:19 -04:00
Jimmy Zelinskie
1a0b5c56a6 frontend/http: disambiguate NumWantProvided 2017-10-17 22:06:03 -04:00
Jimmy Zelinskie
ca823e0e5f frontend: update to use non-object sanization 2017-10-17 22:02:45 -04:00
mrd0ll4r
e7b8264e50 Merge pull request #361 from mrd0ll4r/timecache
Timecache: cache time
2017-10-15 21:47:05 +02:00
Leo Balduf
6dfdb7e192 udp: clean up connection ID generation 2017-10-15 20:05:39 +02:00
Leo Balduf
89bc479a3b *: make use of timecache 2017-10-15 20:05:39 +02:00
Jimmy Zelinskie
47b5e67345 frontend/udp: add request sanitization 2017-10-08 18:02:34 -04:00
Jimmy Zelinskie
6dee48ce17 frontend/http: add request sanitization 2017-10-08 18:02:33 -04:00
Leo Balduf
7d9166e003 http: add default ReadTimeout, WriteTimeout 2017-09-30 14:26:02 +02:00
Leo Balduf
8ed171b0ea pkg/log: create wrapper around logrus 2017-06-26 20:46:40 +02:00
Cedric Charly
f7becf952b frontend: TrackerLogic interface returns modified context
HandleAnnounce and HandleScrape must return the modified context changed
by the hooks. These contexts are passed to AfterAnnounce and AfterScrape
for further use.

Closes #304
2017-06-07 19:25:12 -05:00
Leo Balduf
f61e7a9281 frontend: make request timing optional 2017-05-12 20:27:31 +02:00
Jimmy Zelinskie
cb55019ab8 *: add structured logging 2017-05-07 04:30:22 -04:00
Jimmy Zelinskie
ea0dba3a3d cmd/chihaya: refactor root run command
This change refactors a bunch of the state of execution into its own
object. It also attempts to simplify stopping and adjusts some other
packages to integrate with the stopper interface.

Fixes #309.
2017-05-01 15:56:38 -04:00
tom
cdb0ff3612 http: make numWant optional
The default numwant value should be used if either numwant is zero or omitted from the announce request.
2017-04-21 13:17:58 +01:00
Leo Balduf
2e625af44d http: fix HTTP shutdown panicking 2017-04-04 22:34:53 +02:00
mrd0ll4r
ea1324602e Merge pull request #299 from mrd0ll4r/bump1.8
http: use go1.8 graceful shutdown
2017-02-18 21:04:33 +01:00
Leo Balduf
233c355526 udp: remove read deadline 2017-02-18 13:17:45 +01:00
Leo Balduf
300b9c12ab http: use go1.8 graceful shutdown 2017-02-18 13:08:12 +01:00
Jimmy Zelinskie
bb93e478b8 Merge pull request #295 from jzelinskie/prom-errs
frontend/*: only record ClientErrors to Prometheus
2017-02-17 11:54:41 -05:00
Jimmy Zelinskie
215f33d862 frontend/*: only record ClientErrors to Prometheus
All ClientErrors are constant and should not cause Prometheus streams to
be generated for all possible failure scenarios in the program.

Fixes #294.
2017-02-16 01:01:38 -05:00
Jimmy Zelinskie
517fb4044e tests: replace last usage of assert with require
Fixes #239.
2017-02-15 00:58:52 -05:00
Leo Balduf
fdf4ed8169 frontend: fix recording of address family 2017-02-05 17:24:53 +01:00
Jimmy Zelinskie
0e07b33827 prometheus: record IP AddressFamily 2017-02-02 19:19:33 -05:00
Jimmy Zelinskie
6884a8f527 frontend/http: add TLS support
Fixes #283.
2017-02-02 02:01:51 -05:00
Jimmy Zelinskie
4aad0e992b Merge pull request #282 from mrd0ll4r/udp-scrapes
udp: fix ordering of scrapes
2017-01-31 20:17:01 -05:00
Jimmy Zelinskie
6deebdd6d4 frontend/udp: generate private key when empty 2017-01-31 19:53:36 -05:00
Leo Balduf
102b032c43 udp: fix ordering of scrapes 2017-01-30 13:07:14 +01:00
Leo Balduf
3e1cd77405 udp: make connection ID handling faster 2017-01-26 10:11:02 +01:00
Jimmy Zelinskie
8b1ab73894 Merge pull request #275 from jzelinskie/rmaction
frontend/udp: rm copypasta metric recording
2017-01-23 14:30:42 -05:00
Jimmy Zelinskie
acc051bcc4 frontend: rm copypasta metric recording
Fixes #271.
2017-01-23 14:06:32 -05:00
Leo Balduf
0702755d0b http: fix prometheus timings
Fixes #272.
2017-01-23 16:24:29 +01:00
Leo Balduf
3ae3843944 bittorrent: add AddressField to ScrapeRequest 2017-01-20 20:34:39 +01:00
Leo Balduf
3c098c0703 middleware: add sanitization hook 2017-01-20 20:29:59 +01:00
Leo Balduf
e4e6ef4bfd http: fix godoc 2016-11-27 10:56:51 +01:00
Leo Balduf
5866d96cb0 udp: fix IP bytes not being copied out of the packet
Fixes #243
2016-10-04 18:23:25 +02:00
Leo Balduf
365a6caf43 http/bencode: add missing []Dict case
Fixes #238
2016-10-01 08:10:34 -04:00
Leo Balduf
d463b235b6 http: log internal server errors 2016-09-29 18:48:35 -04:00
Leo Balduf
203248425a http: fix IPv4 addresses not 4 bytes long
Fixes #230
2016-09-29 18:46:01 -04:00
Jimmy Zelinskie
fcfe5a2c2d frontend: add yaml tags to UDP and HTTP configs
This change also adds the missing fields to the example config.

Fixes #228.
2016-09-29 13:25:17 -04:00
Leo Balduf
b51bdd69ec bencode: fix unsupported type error message 2016-09-27 17:56:09 -04:00
Leo Balduf
331dbe34d7 http: add scrape address length to context 2016-09-08 16:02:03 -04:00
Leo Balduf
1bd28b097c udp: add scrape address length to context 2016-09-08 16:02:03 -04:00
Leo Balduf
3ec6f10e93 hooks: add response hook
Fixes #216
2016-09-08 16:02:01 -04:00
Jimmy Zelinskie
2415bc71c6 bencode: add missing error handling
In addition, this PR attempts to simplify some functions according to
the output of `gocyclo -n 15`.
2016-09-06 23:43:22 -04:00
Leo Balduf
d794f92c14 http: fix encoding of IPv4 peers with 16-byte addresses 2016-09-05 14:55:15 -04:00
mrd0ll4r
f6e362e506 Merge pull request #209 from jzelinskie/logrus
misc fixes for #207
2016-09-05 13:40:52 -04:00
Jimmy Zelinskie
57ee2d0c90 bytepool: enforce equal length and cap 2016-09-05 12:32:38 -04:00