Lawrence, Rendall
cf2adad4c9
(tested) fix invalid parsing of multivalued and comma-separated addresses from HTTP header
2022-05-02 23:12:13 +03:00
Lawrence, Rendall
463d478dad
(minor) sanitize code
2022-05-02 13:30:11 +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
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
3bc2276fb3
(tested) Refactor code
...
* merge 9d04e4c from https://github.com/jzelinskie/chihaya
* sanitize ip address on Scrape requests
* remove NewConnectionID and ValidConnectionID functions from production code
2022-04-21 21:57:18 +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
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
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
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
c9e0af8b1e
fix lint errors
2022-04-12 21:48:54 +03:00
Lawrence, Rendall
554ae6fcd6
Reformat comments
2022-04-12 18:32:17 +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č
d438ad58fe
Test v2 hashes with qbt
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
e7c5263dd7
Fix approval hook build
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č
9122aefdd7
Fix storage tests
...
* reformat sources #JR1356
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č
af1cbc543c
Don't return error while converting hash to v1
...
Mark clientapproval as broken because of incorrect client_id parsing
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č
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
elotreum
d70d300422
add godoc explaining catch-all parameter matching for ByName
2020-01-20 11:31:45 -07:00
elotreum
e0b50f3ffa
add helper method to retrieve RouteParam by name
2020-01-19 20:35:21 -07:00
elotreum
9e7323fa44
correct godoc comments to include period
2020-01-16 19:43:50 -07: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
Jimmy Zelinskie
734c11c6ed
bittorrent: anonymous fields for IPs in test table
2018-06-15 13:33:26 -04:00
mrd0ll4r
9e251b23b6
Merge pull request #394 from mrd0ll4r/bittorrent-strings
...
bittorrent: implement nicer String methods for various types
2018-04-11 09:09:54 +02:00
Leo Balduf
6c5e8ad20c
bittorrent: implement nicer String methods for various types
2018-02-17 13:11:27 +01:00
Leo Balduf
b19f7115df
bittorrent: validate port != 0 for announces
2018-02-13 10:13:57 +01:00
Jimmy Zelinskie
811fe001ac
bittorrent: pretty print nil for subtest naming
2018-02-02 17:13:13 -05:00
Jimmy Zelinskie
2004489016
*: add subtests for all table driven tests
...
Because we use testify, this is less useful than normal, but this is
still best practice for table-driven tests.
2017-12-29 17:44:45 -05:00
Jimmy Zelinskie
ca823e0e5f
frontend: update to use non-object sanization
2017-10-17 22:02:45 -04:00
Jimmy Zelinskie
66e12c6684
bittorrent: add String() and LogFields()
2017-10-17 22:02:06 -04:00
Jimmy Zelinskie
b7e6719129
bittorrent: add initial request sanitizer
2017-10-08 18:02:33 -04:00
Leo Balduf
8ed171b0ea
pkg/log: create wrapper around logrus
2017-06-26 20:46:40 +02:00
Leo Balduf
6e1cfa18d8
bittorrent: make invalid query escape errors static
2017-06-18 22:43:24 +02:00
Leo Balduf
2764717657
bittorrent: fix out-of-range panics for URL parsing
2017-06-18 22:43:21 +02:00
Jimmy Zelinskie
cb55019ab8
*: add structured logging
2017-05-07 04:30:22 -04:00
Jimmy Zelinskie
517fb4044e
tests: replace last usage of assert with require
...
Fixes #239 .
2017-02-15 00:58:52 -05:00
Leo Balduf
98299c5912
bittorrent: make ParseURLData return ClientErrors
2017-02-05 13:22:14 +01:00
Leo Balduf
102b032c43
udp: fix ordering of scrapes
2017-01-30 13:07:14 +01:00
Leo Balduf
3ae3843944
bittorrent: add AddressField to ScrapeRequest
2017-01-20 20:34:39 +01:00
Leo Balduf
3c098c0703
middleware: add sanitization hook
2017-01-20 20:29:59 +01:00