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
170639eb3e
(minor) remove double bearer trim
2022-08-26 11:58:22 +03:00
Lawrence, Rendall
d7777ca583
(minor) refactor jwt
2022-08-26 11:13:18 +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
f5a58630db
(tested) add simple jwt middleware tests
2022-08-18 17:06:22 +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
4d646f7c09
(wip) migrate to zerolog
2022-05-01 01:39:21 +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
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
4dbbb4ad83
Rename to MoChi
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č
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č
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
onestraw
e09d11e4b9
fix goimports error
...
Change-Id: I0f6e383ec1081cc47c690fdaab3fd35590a2634b
2018-12-17 16:59:44 +08:00
Justin Li
d95120c817
Return []error from Stop() channel, allow recursive stop groups
2018-09-09 11:30:15 -04:00
Jimmy Zelinskie
7dbbc86380
middleware: add a registration model
2017-12-29 16:55:48 -05:00
Leo Balduf
8ed171b0ea
pkg/log: create wrapper around logrus
2017-06-26 20:46:40 +02:00
Jimmy Zelinskie
ad496fceb8
middleware/jwt: encode infohashes as hex
...
This avoids some corner-cases that can be experienced when trying to
url-escape raw bytes.
2017-06-07 23:07:07 -04:00
Jimmy Zelinskie
035c5b4960
middleware/jwt: escape infohash when debugging
...
Without this, the log lines end up looking like:
request=��1�H�7L a���-��7
2017-06-06 13:22:14 -04:00
Jimmy Zelinskie
0d9a2309fc
middleware/jwt: add debug logs for JWT failures
2017-06-05 22:09:34 -04:00
Jimmy Zelinskie
a4b08c021b
mv pkg/stopper pkg/stop
...
This makes most of the callsites stutter slightly less.
2017-02-02 21:09:25 -05:00
Jimmy Zelinskie
e3e545e22e
stopper: move to pkg package
...
This also adds a package docs for the stopper package.
2016-12-11 21:36:01 -05:00
Jimmy Zelinskie
5b9de47e7a
middleware/jwt: assume KIDs in JWK Set
...
This also adds additional debug logging.
2016-10-26 13:58:28 -04:00
Jimmy Zelinskie
46bd349a23
jwt: add initial jwt update
...
This also changes the signature of the constructor to return an error.
2016-09-26 21:31:34 -04:00
Jimmy Zelinskie
7f7f2726b4
jwt: add updateKeys method and call in constructor
...
Fixes #225 .
2016-09-26 21:31:34 -04:00
Leo Balduf
86ebb108fc
cmd/chihaya: stop hooks
...
Fixes #214 .
2016-09-24 19:51:18 -04:00
Leo Balduf
1ff41d7882
middleware: make hooks return a context
2016-09-05 18:26:04 -04:00
Jimmy Zelinskie
fa32839623
replace std log w/ logrus
...
There still needs to be much more logged with the debug level.
2016-09-05 12:10:42 -04:00
Jimmy Zelinskie
6e790eed74
add initial jwt middleware
2016-09-01 19:48:49 -04:00