コミットグラフ

23 コミット

作成者 SHA1 メッセージ 日付
n9k a6c31179b6 Repo changed domains: git.076.ne.jp -> gitler.moe 2023-02-23 22:36:20 +00:00
n9k 5a647f2fb7 Allowedness (WIP) 2022-07-03 08:53:02 +00:00
n9k 283c630b82 Optionally force captcha every n messages
By default every 40 messages. 0 means never force captcha in this way.
2022-07-03 08:50:35 +00:00
n9k 492078f6ce Record users' most recent HTTP headers 2022-06-29 04:30:27 +00:00
n9k 3bb2a81c5a Bypass initial chat captcha if solved access captcha 2022-06-23 02:53:41 +00:00
n9k 1d5b446291 Track the last time users were sent chat messages 2022-06-19 08:21:40 +00:00
n9k 88d3785ec6 Rename config section from 'thresholds' to 'presence' 2022-06-17 00:40:02 +00:00
n9k 1c7818cc0b Licence headers formatting 2022-06-16 01:31:10 +00:00
n9k 47ee5fe607 Take a range of contrasts for generating colours 2022-06-14 08:50:31 +00:00
n9k 7db8895750 Eyes: send Retry-After header during cooldown 2022-06-14 03:33:14 +00:00
n9k 84ad17f13d Eyes
This commit adds the concept of eyes. One "eyes" is one instance of a
response to GET /stream.mp4. Currently the number of eyes clients can
have is unbounded, but this is a DoS vector.
2022-06-14 02:40:18 +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 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 829f3f004b Add licences 2022-03-08 16:41:47 +13:00
n9k bfa77b738d Tell websockets which users are watching
This adds a field 'watching' in `user_for_websocket` that's True iff WATCHING,
False iff NOTWATCHING, and None otherwise (since clients don't need to know if
a user is tentative or absent). When the value of this field changes for any
user, they get added to the update buffer (like with any other change).

Removed race condition in `t_sunset_users`: `broadcast_users_update` was being
called *after* a user was removed from memory (and for each user being removed,
which was redundant). In that scenario if there's a user in the update buffer
and `t_sunset_users` wins the race between it and `t_broadcast_users_update`,
then when `t_sunset_users` calls `broadcast_users_update` a KeyError would be
raised since the user's already been removed.

Fixed unintended behaviour of `t_sunset_users`: it was removing users based on
the result of `is_visible`, so users who were actually tenative (as opposed to
absent) were being removed.
2022-03-07 12:54:35 +13:00
n9k 3016705783 Keep track of stream viewership (number of viewers) 2022-03-07 12:54:35 +13:00
n9k 672ef10159 Add 3-hexdigit tags for default-name users 2022-02-23 09:21:07 +00:00
n9k b7313eec22 Captchas, require captcha initially, generalize notices to states 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