Mike Dilger
afe3cc9c7b
error: provide source() for 3 that were missing
2024-11-17 14:00:15 +13:00
Mike Dilger
918ed3fcb5
alpha sort of Error variants
2024-11-17 13:56:25 +13:00
Mike Dilger
48b08e93f5
Handle server-wide OPTIONS requests
2024-11-17 13:53:33 +13:00
Mike Dilger
aa9063e60e
minor: management auth
2024-11-17 13:51:02 +13:00
Mike Dilger
94ad17fcc3
Use a streaming BoxedBody
2024-11-16 10:00:21 +13:00
Mike Dilger
181750cb90
Add optional icon for NIP-11
2024-11-05 10:10:40 +13:00
Mike Dilger
006ecadf9c
Add more statistics
2024-10-26 07:39:09 +13:00
Mike Dilger
2794515ab7
bin: chorus_cmd
2024-10-25 10:21:32 +13:00
Mike Dilger
42a0f0136b
cargo fmt
2024-10-25 10:21:26 +13:00
Mike Dilger
f06073278c
Don't require moderation on reactions
2024-10-05 11:41:09 +13:00
Mike Dilger
9d0df10d23
honor enable_ip_blocking = false
2024-09-10 14:57:33 +12:00
Mike Dilger
d258dd4110
Don't require approval on kinds 0 and 3
2024-08-22 07:01:22 +12:00
Mike Dilger
4d300eb12a
Dont drop half of the TCP stream before dropping the whole thing
2024-07-31 07:48:13 +12:00
Mike Dilger
df69a54adf
Honor Sec-WebSocket-Protocol:
...
- If it is missing, we speak nostr and we don't return it
- If it exists and contains "nostr", we speak nostr and we return it
- If it exists and doesn't contain "nostr" we throw a 501 NOT IMPLEMENTED StatusCode
2024-07-15 10:31:20 +12:00
Mike Dilger
3f5600638b
Increase default rate limits to 1MB per second, 16MB burst
2024-07-14 12:42:31 +12:00
Mike Dilger
1f1a74e442
Enforce throtting on output
2024-07-14 12:42:31 +12:00
Mike Dilger
7a1b8e7ec5
Throttling: also consume burst_tokens with output bytes sent
2024-07-14 12:09:39 +12:00
Mike Dilger
94b7dfa57a
distinguish RateLimitExceeded error from ErrorClose
2024-07-14 11:40:20 +12:00
Mike Dilger
bf87d53e01
Throtting by rate limiting the input (defaults are still very speculative, output not rate limited)
2024-07-14 11:40:08 +12:00
Mike Dilger
e3ec1cac57
When shutting down, wait no more than 5 seconds for connections to close
2024-07-14 10:28:15 +12:00
Mike Dilger
5711ca3503
Punish parse errors (else you can get DoS)
2024-07-14 10:00:49 +12:00
Mike Dilger
2cb6148dce
Bugfix
2024-07-14 09:57:58 +12:00
Mike Dilger
c1ee86f4df
Pull the websocket thread code into a separate function
2024-07-13 13:03:41 +12:00
Mike Dilger
ad7e70e3a0
Revert "Manipulate connection counts in a safer way (include HTTP connections too)"
...
This reverts commit 7ad5fb3e157b63d17d098691793460c05493e1d5.
2024-07-13 12:55:45 +12:00
Mike Dilger
5f33e21967
Revert "Maybe fix the zeroes?"
...
This reverts commit 051a81febd25f78f79e7609b0f5a7d1ca99a016a.
2024-07-13 12:55:39 +12:00
Mike Dilger
051a81febd
Maybe fix the zeroes?
2024-07-13 12:51:27 +12:00
Mike Dilger
7ad5fb3e15
Manipulate connection counts in a safer way (include HTTP connections too)
2024-07-13 12:36:09 +12:00
Mike Dilger
a76be24d68
Fix proxy setups (ip blocking, real IP); needs new chorus_is_behind_a_proxy config
2024-07-13 12:11:26 +12:00
Mike Dilger
37b1b3a0f3
Possible stream shutdown improvement
2024-07-13 11:13:46 +12:00
Mike Dilger
633bb82899
Stop supporting TCP half_close (this might be the thing leaving hanging connections)
2024-07-13 10:22:55 +12:00
Mike Dilger
227a104e0f
bump max connections per ip default to 5
2024-07-12 11:38:44 +12:00
Mike Dilger
3820813393
relay management auth doesn't need a method check anymore
2024-07-11 17:18:30 +12:00
Mike Dilger
1fde129c05
cargo clippy & fmt
2024-07-11 17:12:46 +12:00
Mike Dilger
e57167dd05
Swallow mild IO errors inside of Tungstenite errors
2024-07-11 17:07:34 +12:00
Mike Dilger
9515611b82
Do not expose too much error detail over the network
2024-07-11 15:47:43 +12:00
Mado
52ea30eeae
Do not include file names in NOTICE and OK messages
2024-07-11 10:46:51 +09:00
Mike Dilger
17f552c1aa
Management API: allowevent, banevent, listallowedevents, listbannedevents
2024-06-27 12:38:15 +12:00
Mike Dilger
f5bade9e32
Management API: listallowedpubkeys, listbannedpubkeys
2024-06-27 12:22:49 +12:00
Mike Dilger
726b824620
Clean up
2024-06-27 09:54:15 +12:00
Mike Dilger
8d36ca03b7
Management API: handles banpubkey, allowpubkey, and supportedmethods
2024-06-27 09:28:48 +12:00
Mike Dilger
a66a8a9534
Require a moderator key for relay management
2024-06-27 09:28:48 +12:00
Mike Dilger
cb2bcc9b40
Management API started (handles request, checks auth, does not service yet)
2024-06-26 12:08:40 +12:00
Mike Dilger
a615fd50c4
cargo fmt
2024-06-26 12:07:58 +12:00
Mike Dilger
1c608ab1bf
Config::url() to get full URL of server (either as Websocket or HTTP)
2024-06-26 12:06:24 +12:00
Mike Dilger
bc44aafd2d
depend on serde_json
2024-06-26 12:02:28 +12:00
Mike Dilger
577243789e
Removal of errors that are now in pocket
2024-06-24 12:35:45 +12:00
Mike Dilger
dd9816f86c
Don't error and complain about DM kinds in a request that has no kinds specified (just silently don't return them)
2024-06-23 09:41:16 +12:00
Mike Dilger
fd0f78673d
Allow 10050 relay lists just like 10002
2024-06-23 09:13:24 +12:00
Mike Dilger
b3a726695f
Use TokioIo wrapper instead of Box<dyn Fullstream>
2024-06-22 17:24:42 +12:00
Mike Dilger
ad523e35b8
fix panic by supplying a timer
2024-06-22 16:47:01 +12:00