Commit Graph

24 Commits

Author SHA1 Message Date
Lawrence, Rendall
da7de52813 change httprouter with fasthttp and simple handler
* add http benchmark
* move HTTP query parameters parsing to http subpackage
* update dependencies
2023-03-18 00:58:35 +03:00
Lawrence, Rendall
234c65333e Add workers config parameter to start concurrent listeners 2022-11-25 13:58:04 +03:00
Lawrence, Rendall
d8d6f2cf4b refactor code for context fallthrough 2022-11-01 17:02:24 +03:00
Lawrence, Rendall
c1e041b4f8 (wip) fix invalid http compact address encode
* add packages to loggers
* split config examples with different storages
2022-10-25 18:38:55 +03:00
Lawrence, Rendall
dff0ba6da8 (wip) rework configuration to support multiple frontends 2022-10-21 17:53:03 +03:00
Lawrence, Rendall
d843c42931 restore example config commented blocks formatting 2022-09-06 14:59:01 +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
498779aeaf (partially tested) add scrape JWT validation
* remove `xorshift` package, add internal function in `varinterval`
* change `bittorrent.QueryParams` getters to search case insensitive keys
2022-08-25 18:31:48 +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
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
92ce0df932 (minor) fix invalid PG gc query example 2022-06-27 15:59:34 +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
79c92df0f8 (tested) add hooks check when ping http route called 2022-05-14 01:36:21 +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
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
1fcddf5102 (WIP) replace redigo with go-redis 2022-04-13 01:12:00 +03:00
Lawrence, Rendall
fa4c7c49ad Add ping route for http listener 2021-12-21 16:36:38 +03:00
Lawrence, Rendall
4dbbb4ad83 Rename to MoChi 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
d438ad58fe Test v2 hashes with qbt 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
9122aefdd7 Fix storage tests
* reformat sources #JR1356
2021-12-21 15:24:25 +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
elotreum
77a52f9f30 http: allow for customized routes
Update to allow arrays of routes to be passed to the http frontend.
This also supports named parameters as permitted by the
router.

To avoid external dependencies in the middleware, a RouteParam and
RouteParams type was added to the bittorrent package.

Note: this eliminates the need for "enable_legacy_php_urls", as
the the additional route could be added to the route array. However,
this may be considered a breaking change.
2020-01-14 16:35:28 -07:00
Leo Balduf
728ec0c623 readme: update readme, move example config 2019-10-17 14:59:44 +09:00