Commit Graph

59 Commits

Author SHA1 Message Date
Širhoe Biazhkovič
505f7020ad (not tested) add named queries support in PG storage
* update dependencies
2022-10-17 14:08:17 +03:00
Lawrence, Rendall
2c6ecf64df update pgx driver 2022-10-01 20:17:40 +03:00
SOT-TECH
309b796e88 Merge branch 'master' into dependabot/go_modules/github.com/anacrolix/torrent-1.47.0 2022-10-01 18:58:10 +03:00
dependabot[bot]
d3c14bcf7f build(deps): bump github.com/anacrolix/torrent from 1.46.0 to 1.47.0
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.46.0...v1.47.0)

---
updated-dependencies:
- dependency-name: github.com/anacrolix/torrent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 12:05:16 +00:00
dependabot[bot]
b522712ce5 build(deps): bump github.com/MicahParks/keyfunc from 1.2.2 to 1.4.0
Bumps [github.com/MicahParks/keyfunc](https://github.com/MicahParks/keyfunc) from 1.2.2 to 1.4.0.
- [Release notes](https://github.com/MicahParks/keyfunc/releases)
- [Commits](https://github.com/MicahParks/keyfunc/compare/v1.2.2...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/MicahParks/keyfunc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 12:04:58 +00: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
048ace4d42 (untested) reimplement jwt middleware
* change github.com/SermoDigital/jose to github.com/golang-jwt/jwt
* remove pkg/errors dependency
* update dependencies

TODO:
* add test
* flag if announce/scrape handle needed
2022-08-17 15:10:23 +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
37f5b0bc53 Fix lint warnings 2022-07-12 13:09:10 +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
dependabot[bot]
5b6a62f30e build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 12:08:06 +00:00
Lawrence, Rendall
0fd0e06360 (tested) change DataStorage interface to accept byte array as value 2022-06-23 21:01:05 +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
8430e1f31f Initial work on implementing postgresql storage
Generated placeholders to use raw sql queries with `pgx` driver
and implemented put/del peer and announce functions

* inline GCAware and StatisticsAware to PeerStorage
* fix redis doc configuration sample
* update dependencies
2022-06-15 21:42:43 +03:00
Lawrence, Rendall
615bcb2050 update dependencies
Resolves #9 #10
2022-06-01 19:59:05 +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
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
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
1fcddf5102 (WIP) replace redigo with go-redis 2022-04-13 01:12:00 +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
c858576f76 Update dependencies 2022-03-08 14:10:04 +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č
0a5ac35c4d Fix e2e execution, append 2to1 hash in approvals, update dependencies 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
cb4ac3c7f8 Remove zeebo/bencode dependency because of anacrolix/torrent usage 2021-09-05 16:17:21 +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
dependabot[bot]
7498ef3f4a build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 08:16:57 +00:00
dependabot[bot]
2d747cfac4 build(deps): bump github.com/anacrolix/torrent from 1.26.1 to 1.28.0
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.26.1 to 1.28.0.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.26.1...v1.28.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 06:09:28 +00:00
dependabot[bot]
5f8229ad12 build(deps): bump github.com/anacrolix/torrent from 1.26.0 to 1.26.1
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.26.0 to 1.26.1.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.26.0...v1.26.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 00:35:54 +00:00
Jimmy Zelinskie
4224e1ac6b .github: add explicit dependabot
This also updates the existing dependencies.
2021-05-06 15:26:11 -04:00
dependabot-preview[bot]
3b330213ad build(deps): bump github.com/anacrolix/torrent from 1.22.0 to 1.25.0
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.22.0 to 1.25.0.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.22.0...v1.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-04 07:21:51 +00:00
dependabot-preview[bot]
592d487a67 build(deps): bump github.com/sirupsen/logrus from 1.7.0 to 1.8.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.7.0...v1.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-04 04:46:45 +00:00
dependabot-preview[bot]
8c7a4fd117 build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.3
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.1...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-01 11:30:03 +00:00
Jimmy Zelinskie
89c83d2e3c Merge pull request #515 from jzelinskie/http-profiles
Move profiling into the metrics server
2021-02-28 21:46:10 -05:00
Jimmy Zelinskie
0f2cfb2fdd gomod: bump to go1.16 2021-02-28 14:26:24 -05:00
dependabot-preview[bot]
cf30ad8b6a Merge pull request #513 from chihaya/dependabot/go_modules/github.com/stretchr/testify-1.7.0 2021-02-03 18:42:46 +00:00
dependabot-preview[bot]
7be396d299 build(deps): bump github.com/stretchr/testify from 1.6.1 to 1.7.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-01 08:58:03 +00:00
dependabot-preview[bot]
606361d9c1 build(deps): bump github.com/anacrolix/torrent from 1.19.2 to 1.22.0
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.19.2 to 1.22.0.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.19.2...v1.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-01 08:57:16 +00:00
dependabot-preview[bot]
25d39698f2 build(deps): bump github.com/anacrolix/torrent from 1.18.1 to 1.19.2
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.18.1 to 1.19.2.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.18.1...v1.19.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-01 07:32:08 +00:00
dependabot-preview[bot]
7ac177257c build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.3.0...v2.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-30 23:33:02 +00:00
dependabot-preview[bot]
e6339590f0 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.7.1 to 1.9.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.7.1...v1.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-30 23:18:19 +00:00
dependabot-preview[bot]
bc7b3bc738 build(deps): bump github.com/spf13/cobra from 1.0.0 to 1.1.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.0.0...v1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-30 23:05:19 +00:00
dependabot-preview[bot]
06eaf570ca build(deps): bump github.com/anacrolix/torrent from 1.16.0 to 1.18.1
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.16.0 to 1.18.1.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.16.0...v1.18.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-01 06:14:39 +00:00
dependabot-preview[bot]
bd24c5b3fc build(deps): bump github.com/anacrolix/torrent from 1.15.2 to 1.16.0
Bumps [github.com/anacrolix/torrent](https://github.com/anacrolix/torrent) from 1.15.2 to 1.16.0.
- [Release notes](https://github.com/anacrolix/torrent/releases)
- [Commits](https://github.com/anacrolix/torrent/compare/v1.15.2...v1.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 16:33:02 +00:00
dependabot-preview[bot]
b6aa407213 build(deps): bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 07:38:32 +00:00
Jimmy Zelinskie
326832e479 Merge pull request #497 from chihaya/dependabot/go_modules/github.com/prometheus/client_golang-1.7.1
build(deps): bump github.com/prometheus/client_golang from 1.6.0 to 1.7.1
2020-07-01 12:58:00 -04:00
dependabot-preview[bot]
a9f094749d build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.6.0 to 1.7.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.6.0...v1.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-01 09:36:00 +00:00
dependabot-preview[bot]
f7e8116f33 build(deps): bump github.com/stretchr/testify from 1.6.0 to 1.6.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-01 09:35:19 +00:00