コミットグラフ

157 コミット

作成者 SHA1 メッセージ 日付
n9k 617a687145 Give `create_app` a dictionary, not a file location 2022-06-16 03:15:21 +00:00
n9k 0e7bb62291 anonstream/__main__.py: tidy magic numbers 2022-06-16 03:14:46 +00:00
n9k 6746f7b859 Simplify starting: create anonstream/__main__.py 2022-06-16 02:56:38 +00:00
n9k fdf4713c71 Licence headers in every new file 2022-06-16 01:31:10 +00:00
n9k 1c7818cc0b Licence headers formatting 2022-06-16 01:31:10 +00:00
n9k 309b2ad54f Control socket: minor redo exceptions 2022-06-16 01:05:18 +00:00
n9k 758213109b HACKING.md: document control and event sockets 2022-06-16 00:53:39 +00:00
n9k 753bfc9017 README.md: wording formatting 2022-06-16 00:48:27 +00:00
n9k c07910b6c5 v1.2.1 2022-06-15 21:19:21 +00:00
n9k 288c31a03c Merge branch 'dev' 2022-06-15 21:18:04 +00:00
n9k 50d03ba8d5 Control socket: specify users by token hash 2022-06-15 21:17:25 +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 e449caff5f Reimplement `with_timestamp`, allow ints & floats 2022-06-15 20:54:55 +00:00
n9k 1f56e635b9 Ensure chat stays at bottom if names/tripcodes change 2022-06-15 20:39:06 +00:00
n9k 55a713991c Nojs info: fix invisible uptime counter taking up space
Also adds "visibility: hidden;" to `disappear`. It would replace
"opacity: 0;" but Firefox acts weird with only visibility set, it only
half works until you switch between desktop and mobile view. IDK this
isn't that important.
2022-06-15 10:14:37 +00:00
n9k 46cd032510 CSS: always fullheight info in desktop view 2022-06-15 10:10:04 +00:00
n9k d06a279be6 Sanitize newlines in usernames with js
Previously usernames with newlines in them actually went over multiple
lines.
2022-06-15 09:38:47 +00:00
n9k dd1d98361f v1.2.0 2022-06-15 09:09:03 +00:00
n9k a6b3f1b646 Merge branch 'dev' 2022-06-15 09:08:39 +00:00
n9k 976abc0ede WS: increase uptime drift tolerance for resending 2022-06-15 09:07:25 +00:00
n9k 5c8062466d Control socket: overhaul finished for now
This unbreaks the commands broken by the last commit. Everything is
still better.
2022-06-15 08:55:44 +00:00
n9k abfa3fe865 Control socket: overhaul implementation
This breaks some commands, everything else is better though.
2022-06-15 05:39:54 +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 0cb2f226d7 Control socket: view and delete eyes 2022-06-14 10:15:03 +00:00
n9k 70c5836ed0 Control socket: cleanup 2022-06-14 10:15:03 +00:00
n9k 3a1254d30f Control socket: separate files 2022-06-14 10:15:00 +00:00
n9k 751664d1c4 More sensible variable names in colour generation 2022-06-14 08:50:31 +00:00
n9k 47ee5fe607 Take a range of contrasts for generating colours 2022-06-14 08:50:31 +00:00
n9k 1422bebd8e Require Authorization header for broadcaster
As opposed to just the broadcaster token. This makes the broadcaster
username/password login mandatory, which previously was only mandatory
in the `auth_required` wrapper, but not elsewhere (so for example
leaving comments as the broadcaster was possible with the token only). A
less safe alternative to this would be to compare tokens in `check_auth`
once the Authorization header didn't match.
2022-06-14 08:50:31 +00:00
n9k 6ef3a77465 Explicitly reject weird tokens
Includes really long tokens
2022-06-14 08:50:31 +00:00
n9k 506f91a41b Control socket: escape json whitespace if necessary 2022-06-14 08:49:54 +00:00
n9k 7db8895750 Eyes: send Retry-After header during cooldown 2022-06-14 03:33:14 +00:00
n9k a594b6ed73 Eyes: only necessary arguments in exceptions 2022-06-14 03:32:12 +00:00
n9k f081284876 Eyes: cooldown on creating new eyes 2022-06-14 03:02:45 +00:00
n9k 51265fb277 Eyes: delete old eyes
Also implements stack/queue behaviour where if the eyes limit would be
exceeded, either the new eyes cause the oldest eyes to be deleted OR
the new eyes aren't created at all. The default is the first option.
2022-06-14 02:58:11 +00:00
n9k 31ce80b2bf Control socket: view and change users' attributes
Changing things without thinking about it is probably going to cause
weird undefined behaviour.
2022-06-14 02:40:20 +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 8f06121d8f WS: ping before init 2022-06-14 00:34:24 +00:00
n9k 4b986cb84e Minor readme changes 2022-06-13 22:53:28 +00:00
n9k f40637b786 WS: don't close because no pings if already closed 2022-06-13 22:04:59 +00:00
n9k 5751297f10 Control socket: delete chat messages 2022-06-13 21:25:25 +00:00
n9k 36666f8cdf Catch all OSErrors when reading title.txt
Previously we only caught FileNotFoundError. If there was a
PermissionError for example, it would have percolated up and
stopped some background tasks.
2022-06-13 03:46:53 +00:00
n9k 588ecc4c02 Control socket: progress 2022-06-13 03:46:02 +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 98d1beb1b0 v1.1.0 2022-06-12 04:53:57 +00:00
n9k 536f25444a Merge branch 'dev' 2022-06-12 04:53:31 +00:00
n9k eecfede9b1 README.md: wording formatting 2022-06-12 04:52:58 +00:00
n9k 92dfb9cfec STREAMING.md: way more comprehensive instructions 2022-06-12 04:52:58 +00:00
n9k d621f8ceda Reorder chat form inputs so submit has priority
When you press enter to submit a form and there are multiple submittable
inputs (e.g. type="image" / type="submit"), Firefox chooses the one that
appears first in markup. Before this commit the image input (aka the "I
want a new captcha" button) appeared before the submit button which
meant pressing enter just reloaded the captcha instead of submitting the
comment.
2022-06-11 23:14:49 +00:00