コミットグラフ

41 コミット

作成者 SHA1 メッセージ 日付
n9k 63e656f65b v1.3.5 2022-06-29 05:00:38 +00:00
n9k fc613737e0 Store version string 2022-06-29 04:58:30 +00:00
n9k 2a15002e7b Minor: remove module-global `Compress` singleton 2022-06-29 04:57:41 +00:00
n9k dd94bc7233 Minor whitespace 2022-06-29 02:20:29 +00:00
n9k 95a940a14f Limit number of stored failures
Failures are messages shown on the access captcha screen when the
captcha answer was not accepted for whatever reason.
2022-06-22 08:35:41 +00:00
n9k 9143acafd1 Access captcha 2022-06-22 08:11:12 +00:00
n9k 90e1e2099a Manual static folder 2022-06-20 04:15:08 +00:00
n9k 0b78a79111 Use single quotes 2022-06-19 07:53:31 +00:00
n9k 617a687145 Give `create_app` a dictionary, not a file location 2022-06-16 03:15:21 +00:00
n9k 1c7818cc0b Licence headers formatting 2022-06-16 01:31:10 +00:00
n9k f3e58fd3fa Refactor info update background task
We now time the interval between consecutive tasks. This is more precise
than using the constant interval the task is supposed to run at since
there is some drift on each run (~0.004s).
2022-06-15 21:03:08 +00:00
n9k 65d28a6937 Event socket
This commit adds a unix socket on which you can receive internal events
as they happen. Currently the only supported event is a chat message
being added. Intended for external applications that depend on chat
messages, e.g. text-to-speech or Twitch Plays Pokémon.
2022-06-15 03:53:34 +00:00
n9k e491f54b24 Control socket (WIP) 2022-06-12 22:26:48 +00:00
n9k 7f2e75bc98 Read config.toml more organizedly 2022-06-12 22:26:46 +00:00
n9k 542d6c9ae5 Detect chat flooding by counting lines
Reject comments by line count. Ratelimit users by number of lines sent
in chat.
2022-06-11 23:14:16 +00:00
n9k 2c899cc18d Add timeout for each ASGI http.response.body message
Ensures that if a client becomes idle the segment generator is exited
within a constant amount of time (probably more than this timeout
because of the ASGI server's write buffer and the OS's socket write
buffer, but still constant).
2022-06-11 23:14:16 +00:00
n9k 4b68023cf2 Add websocket ping/pong
Client and server both close the connection if they don't hear from the
other party after a timeout period. This is a failsafe and should
improve reliability.
2022-06-11 23:14:16 +00:00
n9k 0352358611 Compress some responses
Adds dependency `quart-compress`
2022-06-09 01:34:59 +00:00
n9k 829f3f004b Add licences 2022-03-08 16:41:47 +13:00
n9k 5153f5d112 Add config option for old tripcode algorithm 2022-03-08 16:13:22 +13:00
n9k 3016705783 Keep track of stream viewership (number of viewers) 2022-03-07 12:54:35 +13:00
n9k da6e0352b8 Beautify nojs chat template, strip jinja whitespace 2022-03-07 12:54:35 +13:00
n9k a3b18bdc9f Background task for broadcasting title/uptime changes 2022-03-07 12:54:35 +13:00
n9k 8b4d6e8c09 Get stream title from disk
By default from `title.txt`. Also replace newlines with spaces when setting the
title in js, for parity with the nojs info iframe.
2022-03-07 12:54:35 +13:00
n9k cc6ed63764 Segment streaming redux, accurate stream uptime 2022-02-23 15:57:04 +13:00
n9k 8c9b0d9da0 Flood detection 2022-02-22 16:25:43 +13:00
n9k 6ceb553b29 Buffer new and mutated users before sending to websockets
By default the buffer is exhausted every 4 seconds. This should defend against
a potential DoS against clients with JavaScript enabled. Before this, any
request with no token would generate a new user and immediately broadcast the
new user to all the websockets. It's best to lock down as much as possible the
number of places a client can cause the server to broadcasts to all the
websockets.
2022-02-22 16:25:43 +13:00
n9k 546b5b2f6f Always use config.toml in same directory as app.py 2022-02-22 16:25:43 +13:00
n9k b7313eec22 Captchas, require captcha initially, generalize notices to states 2022-02-22 16:25:43 +13:00
n9k 236d73a342 Gracefully finish background tasks on shutdown 2022-02-22 16:25:43 +13:00
n9k 7058677000 Setup background tasks, create t_sunset_users task 2022-02-22 16:25:43 +13:00
n9k e9a4b511a3 Formalize/tidy user presence logic 2022-02-22 16:25:43 +13:00
n9k 6109de37ec Nojs chat: ETag, limit scrollback, timeout notice
Limiting scrollback is happening for the js chat too. Also reject long
comments.
2022-02-22 16:25:41 +13:00
n9k 1e6563c4a2 Some more project structure 2022-02-18 14:32:34 +13:00
n9k 43e1a33088 Nojs appearance form, tripcodes, colours 2022-02-18 11:56:51 +13:00
n9k 7dbcd43f30 Logicaler project structure, see rest of commit message
Incoming requests are handled in anonstream/routes/. Route handlers
mainly depend on files in anonstream/, which in turn depend on files in
anonstream/helpers/ and anonstream/utils/. Utils are pure functions and
helpers are almost pure functions; they don't mutate state but they
do depend on the global app config.
2022-02-17 13:30:09 +13:00
n9k e77862f4ff Nojs chat, store all user names/colors in js, forget about inactive users
Project structure evolving a bit
2022-02-17 13:30:05 +13:00
n9k 694c6a4995 Nojs comment submission, notify for rejected comments
Fix with-user wrapper (wasn't collecting users)
2022-02-15 23:11:53 +13:00
n9k 885c10b5de Initial noscript markup for chat form & stream info
Use with-user decorator on routes (instead of with-token)
2022-02-14 23:16:09 +13:00
n9k 5d0cac0b0f Concatenate segments
Add small js failsafe, other minor changes
2022-02-13 22:25:02 +13:00
n9k 71586420b6 Project structure, chat markup/style, websockets 2022-02-13 17:00:10 +13:00