Document all config options
このコミットが含まれているのは:
コミット
95ef740747
|
@ -0,0 +1,61 @@
|
|||
## Configuration
|
||||
|
||||
This file documents all configuration options in [/config.toml][config]
|
||||
|
||||
### Secret key
|
||||
|
||||
The `secret_key` is used for cryptography. It can be any string, but should be
|
||||
one with a cryptographically secure amount of entropy. This command generates a
|
||||
128-bit secret key which is sufficient:
|
||||
```sh
|
||||
dd if=/dev/urandom bs=16 count=1 | base64
|
||||
```
|
||||
|
||||
Using a weak secret key has these practical consequences:
|
||||
* Tripcode algorithm becomes bruteforceable. This allows anyone to generate
|
||||
vanity tripcodes and it allows weak passwords to be cracked.
|
||||
* Token hashes become bruteforceable. Not a problem for tokens generated by
|
||||
us, but tokens are not authenticated (manually chosen tokens are allowed).
|
||||
A maually chosen low-entropy token could be cracked which allows
|
||||
impersonation.
|
||||
|
||||
### Sockets
|
||||
|
||||
The keys in this section are for the API sockets: the control socket and the
|
||||
event socket. See [/HACKING.md][hacking] for details about them.
|
||||
|
||||
| Option | Type | Explanation
|
||||
|--------------------------|------|----------------------------|
|
||||
| `socket.control.enabled` | bool | Enables the control socket |
|
||||
| `socket.control.address` | path | Path of the control socket |
|
||||
| `socket.event.enabled` | bool | Enables the event socket |
|
||||
| `socket.event.address` | path | Path of the event socket |
|
||||
|
||||
### Auth
|
||||
|
||||
The `auth.username` option is the username the broadcaster logs in as. It can
|
||||
be any string.
|
||||
|
||||
### Segments
|
||||
|
||||
| Option | Type | Explanation
|
||||
|--------------------------|------|----------------------------|
|
||||
| `segments.directory` | path | Search for stream segments in this directory |
|
||||
| `segments.playlist` | path | Path of the control socket |
|
||||
| `segments.playlist_stale_threshold` | bool | Enables the event socket |
|
||||
| `segments.playlist_cache_lifetime` | path | Path of the event socket |
|
||||
| `segments.search_cooldown` | path | Path of the event socket |
|
||||
| `segments.search_timeout` | path | Path of the event socket |
|
||||
| `segments.stream_initial_buffer` | path | Path of the event socket |
|
||||
|
||||
### Title
|
||||
|
||||
| Option | Type | Explanation
|
||||
|--------------------------|------|----------------------------|
|
||||
| `socket.control.enabled` | bool | Enables the control socket |
|
||||
| `socket.control.address` | path | Path of the control socket |
|
||||
| `socket.event.enabled` | bool | Enables the event socket |
|
||||
| `socket.event.address` | path | Path of the event socket |
|
||||
|
||||
config: https://git.076.ne.jp/ninya9k/anonstream/src/branch/master/config.toml
|
||||
hacking: https://git.076.ne.jp/ninya9k/anonstream/src/branch/master/HACKING.md
|
34
config.toml
34
config.toml
|
@ -1,16 +1,9 @@
|
|||
# Configuration file for anonstream
|
||||
# Last updated 19 June 2022 for anonstream 1.2.3
|
||||
|
||||
|
||||
secret_key = "place secret key here"
|
||||
|
||||
[socket.control]
|
||||
enabled = true
|
||||
address = "control.sock"
|
||||
|
||||
[socket.event]
|
||||
enabled = true
|
||||
address = "event.sock"
|
||||
|
||||
[auth]
|
||||
username = "broadcaster"
|
||||
|
||||
[segments]
|
||||
directory = "stream/"
|
||||
playlist = "stream.m3u8"
|
||||
|
@ -20,6 +13,9 @@ search_cooldown = 0.25
|
|||
search_timeout = 5.0
|
||||
stream_initial_buffer = 3
|
||||
|
||||
[auth]
|
||||
username = "broadcaster"
|
||||
|
||||
[title]
|
||||
file = "title.txt"
|
||||
file_cache_lifetime = 0.5
|
||||
|
@ -27,6 +23,18 @@ file_cache_lifetime = 0.5
|
|||
[access]
|
||||
captcha = true
|
||||
|
||||
[socket.control]
|
||||
enabled = true
|
||||
address = "control.sock"
|
||||
|
||||
[socket.event]
|
||||
enabled = true
|
||||
address = "event.sock"
|
||||
|
||||
[names]
|
||||
broadcaster = "Broadcaster"
|
||||
anonymous = "Anonymous"
|
||||
|
||||
[captcha]
|
||||
lifetime = 1800
|
||||
fonts = []
|
||||
|
@ -51,10 +59,6 @@ broadcast_ping = 8.0
|
|||
broadcast_users_update = 4.0
|
||||
broadcast_stream_info_update = 3.0
|
||||
|
||||
[names]
|
||||
broadcaster = "Broadcaster"
|
||||
anonymous = "Anonymous"
|
||||
|
||||
[chat]
|
||||
max_comment_length = 512
|
||||
max_comment_lines = 12
|
||||
|
|
読み込み中…
新しいイシューから参照