Commit Graph

119 Commits

Author SHA1 Message Date
Lawrence, Rendall 5513f1357d fix lint warnings
replace naked returns with arguments (gofumpt@v0.9.1)
2025-09-22 17:11:05 +03:00
Lawrence, Rendall 994b25721e update e2e dependencies 2024-12-12 11:41:36 +03:00
Lawrence, Rendall 9fc94617ce set mochi-2e2 as submodule
* update go version to 1.23
* remove sha256-simd dependency
* fix logger file path
2024-10-01 16:17:42 +03:00
Lawrence, Rendall 61760722a6 add cmd argument to print version 2024-09-01 16:20:05 +03:00
Lawrence, Rendall b92c9103b9 (WIP) implement LMDB peer storage
todo: GC
2024-06-14 18:56:44 +03:00
Lawrence, Rendall 2f01a7cfc8 (untested) refactor code, add separate call to create KV-store 2024-05-20 18:28:40 +03:00
Lawrence, Rendall 1a243b94c5 (minor) unify log keys 2024-03-12 15:29:58 +03:00
Lawrence, Rendall 95b7f5530f change math/rand to crypto/rand in non-test code 2024-03-05 11:01:18 +03:00
Lawrence, Rendall 665899017e (untested) move unsafe string conversion to pkg
* fix invalid UDP f/e start when no workers provided
* add bench for entire server
2023-03-22 17:51:13 +03:00
Lawrence, Rendall 63e0b93db4 remove randseed package 2023-03-19 20:13:44 +03:00
Lawrence, Rendall 3e5a26dd50 fix lint warnings, update wf go version 2023-03-03 12:21:57 +03:00
Lawrence, Rendall 234c65333e Add workers config parameter to start concurrent listeners 2022-11-25 13:58:04 +03:00
Lawrence, Rendall ef6d820c5b Add cmd option for quick start w/o config file 2022-11-18 18:28:19 +03:00
Lawrence, Rendall d8d6f2cf4b refactor code for context fallthrough 2022-11-01 17:02:24 +03:00
Lawrence, Rendall dff0ba6da8 (wip) rework configuration to support multiple frontends 2022-10-21 17:53:03 +03:00
Širhoe Biazhkovič 3506865329 add download count number while scrape
* remove storage configuration print
* change test for pg storage
2022-10-17 18:37:07 +03:00
Lawrence, Rendall 694592f881 fix list warnings
* remove deprecated lint checks
* reformat files
* update dependencies
2022-09-06 13:34:57 +03:00
Lawrence, Rendall 73d8922c74 (partially tested) add pg storage configuration and man
* update test query for `pg`
* attach `pg` to supported storages
* fix lint warnings
* update dependencies
2022-06-21 18:01:08 +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 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 7716aa828a (minor) Merge commits 7a4c2ee..77b3bf9 from https://github.com/jzelinskie/chihaya 2022-04-16 21:24:35 +03:00
Lawrence, Rendall 01064fd21a (tested) split storage to data and peer interfaces,
add option for persisting (or not) torrent approval data
2022-04-16 18:50:19 +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 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
Lawrence, Rendall c1956d68f6 Remove YAML/MD lint configs, reformat stdlib imports 2022-04-12 18:10:51 +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 d20b2fb64b Minor fix: preallocate arrays with known size 2021-12-28 21:01:15 +03:00
Lawrence, Rendall 4dbbb4ad83 Rename to MoChi 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič 04f1a9efb9 Reformat code 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č 0a5ac35c4d Fix e2e execution, append 2to1 hash in approvals, update dependencies 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič 239a642bfc Fix varinterval panic if request IH is not provided 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
Širhoe Biazhkovič 20f1a99ec2 Fix utests 2021-09-05 17:32:31 +03:00
Širhoe Biazhkovič 8580bb37e0 WIP Add support for custom torrents' approval storages
* migrate torrentapproval to list storage
* add initial support for torrent file storage (watch directory with fsnotify)
* replace frontend/http/bencode package with github.com/zeebo/bencode module
* sanitize code (fix warnings)

TODO:
* parse torrent files to get hashes,
* watch directory event types

DON'T use for now
2021-09-04 01:49:01 +03:00
Jimmy Zelinskie 456f9de190 pkg/metrics: move profiles into the metrics server
This change:
- renames pkg/prometheus into pkg/metrics
- renames the prometheus_addr config to metrics_addr
- adds pprof endpoints to the metrics server
- removes profile/trace cli flags
- adds endpoints for profiling to the metrics server
2021-02-27 12:49:24 -05:00
Leo Balduf 0936bd3f9a cmd/chihaya: fix imports for updated goimports 2019-10-17 12:51:53 +09:00
Jimmy Zelinskie 3e334b9536 storage: remove memorybysubnet
This code, while interesting, was only relevant to Facebook and they use
their own fork that they maintain. There was not enough outside
interest to warrant maintaining. I'd rather us use the effort to support
a redis storage backend instead.
2019-02-13 19:44:04 -05:00
Jimmy Zelinskie dc753b937c vendor: move to Go modules for dependencies
Fixes #444.
2019-02-12 20:36:25 -05:00
duyanghao e78892d5ac Add Support for Redis Storage Backend(To Achieve Chihaya High Availability)
Change-Id: I5cf703095d1060ac17e403b86056d3eccad97f2c
Signed-off-by: duyanghao <1294057873@qq.com>
2019-01-03 17:21:13 +08: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
Pierre-Alain TORET 82c9f08f4f middleware : add torrent approval package
this makes it possible to specify a torrent whitelist/blacklist in the
configuration file based on their hexadecimal hash.

Fixes #375

Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
2018-09-19 14:11:13 +02:00
Justin Li d95120c817 Return []error from Stop() channel, allow recursive stop groups 2018-09-09 11:30:15 -04:00
Jimmy Zelinskie 3aa7d1a91d cmd: add e2e command
This change unifies chihaya and chihaya-e2e binaries.
It also vendors the code missing from the project that was used in
chihaya-e2e.

Fixes #402.
2018-09-04 11:38:22 -04:00