Commit Graph

31 Commits

Author SHA1 Message Date
Lawrence, Rendall
34c2921be8 add support for no_peer_id HTTP announce parameter
* remove `compact` from req/resp structures, because
it used only in HTTP and only while response write
2023-03-19 18:37:57 +03:00
Lawrence, Rendall
24c1539583 restore udp queryParams implementation
* fix lint warnings
2023-03-18 19:38:14 +03:00
Lawrence, Rendall
a9d1642615 (wip) sanitize and refactor code
* replace bencode calls in http response with static generated values
* move bytepool to shared folder
* change receivers for `Scrapes` and `RequestAddresses` (bored of compile warnings)
2022-10-24 19:07:47 +03:00
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
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
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
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
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
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
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
Leo Balduf
fa19d1125c udp: support both BEP15 and old opentracker v6 announces 2018-02-17 13:41:36 +01:00
Jimmy Zelinskie
ca823e0e5f frontend: update to use non-object sanization 2017-10-17 22:02:45 -04:00
Jimmy Zelinskie
47b5e67345 frontend/udp: add request sanitization 2017-10-08 18:02:34 -04:00
Leo Balduf
3c098c0703 middleware: add sanitization hook 2017-01-20 20:29:59 +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
d66ed27dd9 udp: add support for opentracker-style IPv6 announces 2016-09-03 15:15:11 -04:00
Leo Balduf
c667497c6d udp: implement bep41 2016-09-03 14:06:07 -04:00
Leo Balduf
a4639a1aac udp: clean up 2016-08-18 10:12:04 -04:00
Jimmy Zelinskie
cc6614c474 rename back to chihaya 2016-08-16 22:17:10 -04:00
Jimmy Zelinskie
778773cb81 rm copyright 2016-08-16 22:17:10 -04:00
Leo Balduf
ae18d89627 rename frontends to frontend 2016-08-16 22:17:10 -04:00