Lawrence, Rendall
96653c45a3
add filter_private_ips option to discard private IPs.
...
Might be used when tracker is behind reverse proxy and one of provided
addresses in `real_ip_header` is private/local address.
Additional changes:
* check if provided address is not multicast/broadcast
* configure `http.Server.ReadHeaderTimeout` with `http.ReadTimeout` to mitigate Slowloris
* update dependencies
* minor docs fixes
2022-07-23 15:49:22 +03:00
Lawrence, Rendall
9d8440667c
(tested) Add reuseport feauture.
...
SO_REUSEPORT allows multipple instances to use same port.
It might be used for better scalability and performance.
* update dependencies
* fix data race of http's srv and tlsSrv variables
2022-07-11 13:38:37 +03:00
Lawrence, Rendall
c50a532181
(tested) complete replace logrus with zerolog
...
* remove cobra dependency and split execs to mochi and e2e
* add log init synchronization
2022-05-02 03:13:58 +03:00
Lawrence, Rendall
4d646f7c09
(wip) migrate to zerolog
2022-05-01 01:39:21 +03:00
Lawrence, Rendall
64b27c2df6
(tested) preserve all addresses of peer
...
* add multiple addresses in request structures and frontend parsers
* move per-ip peer fetch/store from storage to internal hooks
* fetch/store both v1 and v2 info hashes
2022-04-27 00:52:17 +03:00
Lawrence, Rendall
b365abd296
(untested) sanitize code
...
* remove peer argument from scrape swarm storage call
* replace Peer field with netip.Addr in ScrapeRequest
* add man for keydb storage
* update readme
2022-04-25 19:05:41 +03:00
Lawrence, Rendall
081d3752d8
(tested) fix static check warnings
...
* UDP writer: defer buffer close
* HTTP writer: remove duplicated compact4/6
2022-04-25 16:05:19 +03:00
Lawrence, Rendall
0d4a2a751e
(tested) fix wait group race in udp frontend
2022-04-24 21:37:57 +03:00
Lawrence, Rendall
ef03291efe
(tested) rollback to separate v4 and v6 keys in redis/keydb
...
* sanitize log fields
* remove miniredis dependency
* store/collect information about hybrid (v2to1) hashes
2022-04-24 20:32:15 +03:00
Lawrence, Rendall
3bc2276fb3
(tested) Refactor code
...
* merge 9d04e4c from https://github.com/jzelinskie/chihaya
* sanitize ip address on Scrape requests
* remove NewConnectionID and ValidConnectionID functions from production code
2022-04-21 21:57:18 +03:00
Lawrence, Rendall
f9c72341c0
(minor) refactor redis GC and fix TX calls,
...
add indicator that metrics are running
2022-04-17 00:57:30 +03:00
Lawrence, Rendall
965df2a9c3
(untested) Merge commit 24ab4ae from https://github.com/jzelinskie/chihaya
2022-04-16 01:22:24 +03:00
Lawrence, Rendall
8cd8343757
(tested) refactor code
...
* add sentinel master parameter into driver config
* replace yaml double deserialization with `mapstructure` in initializers
* replace struct initializers with registered functions
* add torrent approval MD and a sanitize rest MDs
2022-04-16 00:51:48 +03:00
Lawrence, Rendall
397e106396
(tested) fix redis to pass tests
...
* delete info hash count key from redis (replaced with SCARD on infohash set)
* add GC test
* add peer.Addr() functio to always return unwrapped address if 4to6 appear
2022-04-15 01:33:45 +03:00
Lawrence, Rendall
5c2471ca9b
(untested) Merge commit e56ad81 from https://github.com/jzelinskie/chihaya
...
* rename/replace redis keys
2022-04-14 19:14:12 +03:00
Lawrence, Rendall
781fa9440f
(done) replace redigo with go-redis
...
* replace redis keys with RawString encoded values (delete SerializedPeer)
* merge peers got from pre-hools with store data
2022-04-14 01:13:18 +03:00
Lawrence, Rendall
c9e0af8b1e
fix lint errors
2022-04-12 21:48:54 +03:00
Lawrence, Rendall
64eaf9d733
Fix lint gosec and ifshort issues
2022-04-12 18:51:03 +03:00
Širhoe Biazhkovič
c7edbb52f2
Merge commits 129aac230aa..828edb8fd8b from https://github.com/chihaya/chihaya
2022-04-12 15:58:14 +03:00
Lawrence, Rendall
4dbbb4ad83
Rename to MoChi
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
5a1ac73a3d
Update dependencies, fix invalid directory config parse
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
360ac9d08d
Add man to exported functions/fields
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
beb4736b86
Implement simple PGDC methods for storage
...
* sanitize code a little
* move e2e build to 'e2e' tag
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
566d99fcd7
Gegin work on shared store for handlers
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
2f092bad45
Initial torrentV2 hash support
2021-12-21 15:24:11 +03:00
Leo Balduf
87c72bc516
config: update example config
2019-10-17 12:38:08 +09:00
Leo Balduf
cb88a11d6a
frontend: add defaults for parser options
2019-10-12 12:52:16 +09:00
Cenk Alti
0de1d25448
fix listenAndServe comment
2018-12-27 15:17:43 +03:00
Cenk Alti
b345eb3899
split listenAndServe into 2 functions
2018-12-26 18:15:05 +03:00
Cenk Alti
2a26215f2a
Revert "protect socket variable with mutex; fix #437 "
...
This reverts commit 1b7ce4c378 .
2018-12-26 18:10:48 +03:00
Cenk Alti
1b7ce4c378
protect socket variable with mutex; fix #437
2018-12-25 11:23:47 +03:00
Cenk Alti
fcbc168ae6
add test case for demonstrating panic
2018-12-25 11:23:08 +03:00
onestraw
e09d11e4b9
fix goimports error
...
Change-Id: I0f6e383ec1081cc47c690fdaab3fd35590a2634b
2018-12-17 16:59:44 +08:00
Justin Li
3c80ed8a8e
Fix goimports violations
2018-10-24 09:25:03 -04:00
Leo Balduf
495f2c2734
frontend/udp: pool connection ID generation state
2018-09-18 11:25:54 +02:00
Leo Balduf
96d0c3d829
frontend/udp: debug log connection ID generation/validation
2018-09-16 22:36:47 +02:00
Justin Li
d95120c817
Return []error from Stop() channel, allow recursive stop groups
2018-09-09 11:30:15 -04:00
Jimmy Zelinskie
f0780ad9cc
frontend: isolate prometheus logic to one file
2018-06-15 13:33:26 -04:00
Leo Balduf
fa19d1125c
udp: support both BEP15 and old opentracker v6 announces
2018-02-17 13:41:36 +01:00
Jimmy Zelinskie
2004489016
*: add subtests for all table driven tests
...
Because we use testify, this is less useful than normal, but this is
still best practice for table-driven tests.
2017-12-29 17:44:45 -05:00
Leo Balduf
fa6e360da4
udp: set address family for connect metrics
2017-12-06 23:00:36 +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
ca823e0e5f
frontend: update to use non-object sanization
2017-10-17 22:02:45 -04: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
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