Lawrence, Rendall
49fdd7d908
recheck connection ID for 3 times for some implementations with broken HW PRNG
2024-10-01 16:37:03 +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
61f859e3f6
(partially tested) simplify client approval m/w
...
* sanitize code
2023-03-23 00:34:10 +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
b956811e40
(untested) refactor code
2023-03-21 18:59:05 +03:00
Lawrence, Rendall
d1ad0eb687
Merge branch 'fasthttp' into ctxCancel
2023-03-19 20:36:38 +03:00
Lawrence, Rendall
869a594aa3
fix lint warnings
2023-03-19 20:33:07 +03:00
Lawrence, Rendall
63e0b93db4
remove randseed package
2023-03-19 20:13:44 +03:00
Lawrence, Rendall
88f1ef7ca5
suppress context canceled error
2023-03-19 19:52:52 +03:00
Lawrence, Rendall
34c2921be8
add support for no_peer_id HTTP announce parameter
...
* remove `compact` from req/resp structures, because
it used only in HTTP and only while response write
2023-03-19 18:37:57 +03:00
Lawrence, Rendall
24c1539583
restore udp queryParams implementation
...
* fix lint warnings
2023-03-18 19:38:14 +03:00
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
4006f6fd42
(minor) fix udp.TestReuseGeneratorGenerate clause
2022-12-01 00:02:11 +03:00
Lawrence, Rendall
cbfd37ac9c
(minor) fix UDP connection ID type in tests
2022-11-30 23:57:36 +03:00
Lawrence, Rendall
99e30961ef
(minor) convert UDP private key to bytea
2022-11-30 23:52:28 +03:00
Lawrence, Rendall
3b1c713c85
move PRNG to pkg, fix lint warnings
2022-11-30 23:20:05 +03:00
Lawrence, Rendall
f80e9af156
(untested) add salt to UDP connection ID
2022-11-30 19:10:23 +03:00
Lawrence, Rendall
3b1b74ad4f
simplify udp connection ID generator
2022-11-29 18:15:21 +03:00
Lawrence, Rendall
234c65333e
Add workers config parameter to start concurrent listeners
2022-11-25 13:58:04 +03:00
Lawrence, Rendall
ae0c006cd2
change hash for udp connection id to xxhash3
...
* update dependencies
2022-11-21 14:25:48 +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
db671d3891
(minor) change Bytes with Hex call in logger
2022-11-18 16:05:03 +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
a9d1642615
(wip) sanitize and refactor code
...
* replace bencode calls in http response with static generated values
* move bytepool to shared folder
* change receivers for `Scrapes` and `RequestAddresses` (bored of compile warnings)
2022-10-24 19:07:47 +03:00
Lawrence, Rendall
dff0ba6da8
(wip) rework configuration to support multiple frontends
2022-10-21 17:53:03 +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
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
081d3752d8
(tested) fix static check warnings
...
* UDP writer: defer buffer close
* HTTP writer: remove duplicated compact4/6
2022-04-25 16:05:19 +03:00
Lawrence, Rendall
0d4a2a751e
(tested) fix wait group race in udp frontend
2022-04-24 21:37:57 +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
965df2a9c3
(untested) Merge commit 24ab4ae from https://github.com/jzelinskie/chihaya
2022-04-16 01:22:24 +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
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
64eaf9d733
Fix lint gosec and ifshort issues
2022-04-12 18:51:03 +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č
5a1ac73a3d
Update dependencies, fix invalid directory config parse
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