strawberry
4d7bbe9fb4
tiny micro-optimisations in some config stuff
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:37:40 -04:00
strawberry
e0b2595905
support reading TURN secret from a file (turn_secret_file)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:49:23 -04:00
Jason Volk
4bac9b33cc
propagate config error for cidr range
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-01 11:15:55 +00:00
strawberry
60605e9579
remove unnecessary loop/allocations on CIDR range init
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-01 00:59:43 -04:00
Jason Volk
54e6a41404
move remote media fetchers into services
...
minor error simplification
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk
c64adbec0e
split signing_keys_for from verify_keys_for
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk
4458efa2b2
rename signing_keys_for to verify_keys_for
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk
59efabbbc2
de-global server_is_ours / user_is_local
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk
010e4ee35a
de-global services for services
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk
8a2ae401df
convert Client into Service
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:05 +00:00
Jason Volk
f465d77ad3
convert Resolver into a Service.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:05 +00:00
Jason Volk
8b6018d77d
de-global services() from api
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:03 +00:00
strawberry
39c0f4ea3d
delete unused bad_signature_ratelimiter rm'd in 67f9553790
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 19:12:20 -04:00
Jason Volk
084751ae38
refactor globals::updates into a Service
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk
271f720286
move mutex maps out of globals into respective service
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk
2d251eb19c
cleanup on drop for utils::mutex_map.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk
59c4062305
set trivial/leaf spans to debug level
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk
113a27c1d5
use usize for max_request_size config item
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk
eaf1cf38a5
refactor resolver tuples into structs
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk
eeda96d94a
inline analysis and symbol reduction; emits smaller than 64 bytes marked inline
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk
e125af620e
impl crate::Service for Service
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk
f104ced55d
remove unnecessary wrapper
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk
7658387a74
remove resolver wrapper; use std mutex
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-03 06:34:16 +00:00
Jason Volk
46423cab4f
fix counter increment race
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-03 06:34:16 +00:00
Jason Volk
cb48e25783
refactor dyn KvTree out of services
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:02:16 +00:00
Jason Volk
7ad7badd60
devirtualize service Data traits
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:01:20 +00:00
Jason Volk
3480074f61
sha256_media integration
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:01:20 +00:00
Jason Volk
08bf074cbb
reduce roomid_mutex_state
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
539aa27815
reduce roomid_mutex_federation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
22272bdc16
reduce roomid_mutex_insert
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
strawberry
8fff7ea706
cleanup+refactor admin room alias and server account accessing to globals
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
strawberry
3ed561cb31
service(globals): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
Jason Volk
6e59135a7d
eliminate RotationHandler
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
732e8b82aa
Abstract password hashing into util.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-05 03:00:23 +00:00
strawberry
83220b43a2
use saturating_add and vec with_capacity in even more places
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
Jason Volk
02081b66c4
Fix some unnecessary-unwraps w/ addl cleanup/simplification.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
6d1144bb69
move unix socket unlink from services to router
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
Jason Volk
b94045a468
dissolve key_value/*
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
strawberry
6269822613
actually fix all let_underscore_must_use lints
...
CI caught some more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
Jason Volk
6c1434c165
Hot-Reloading Refactor
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
Benjamin Lee
8bffcfe82b
remove sync response cache
...
This cache can serve invalid responses, and has an extremely low hit
rate.
It serves invalid responses because because it's only keyed off
the `since` parameter, but many of the other request parameters also
affect the response or it's side effects. This will become worse once we
implement filtering, because there will be a wider space of parameters
with different responses. This problem is fixable, but not worth it
because of the low hit rate.
The low hit rate is because normal clients will always issue the next
sync request with `since` set to the `prev_batch` value of the previous
response. The only time we expect to see multiple requests with the same
`since` is when the response is empty, but we don't cache empty
responses.
This was confirmed experimentally by logging cache hits and misses over
15 minutes with a wide variety of clients. This test was run on
matrix.computer.surgery, which has only a few active users, but a
large volume of sync traffic from many rooms. Over the test period, we
had 3 hits and 5309 misses. All hits occurred in the first minute, so I
suspect that they had something to do with client recovery from an
offline state. The clients that were connected during the test are:
- element web
- schildichat web
- iamb
- gomuks
- nheko
- fractal
- fluffychat web
- fluffychat android
- cinny web
- element android
- element X android
Fixes : #336
2024-05-17 18:13:11 -04:00
Jason Volk
4b6938e0f6
add admin server uptime command
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Benjamin Lee
8a5599adf9
add optional support for tokio-console
...
This turned out to be quite hairy, mostly because we need to apply the
config's log level filter to the actual logs (stdout and, optionally
sentry), but do not want to filter out the tokio tracing events needed by
the console_subscriber. I hit several edge cases in tracing getting
this to work, and we now depend on a git version of tracing with a
backported patch :(
2024-05-03 01:52:29 -04:00
strawberry
c87ea1dea1
delete unused servername_ratelimiter
semaphore now
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
17d0c869b0
remove some various unused functions and mark some possibly important ones *for now*
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
66bb88a03a
make everything pub(crate) instead of pub
...
conduwuit is not a library
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
423fc6dad0
precompute cidr range denylist; move validator.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
97c63604fd
"global" ACLs config option, block room directory requests to forbidden servers
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
strawberry
d1c139de26
add config option for url_preview_domain_explicit_denylist
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
Jason Volk
6c9e95f7c9
add config option for allow_outgoing_read_receipts
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-14 22:35:23 -04:00