mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-09 07:16:44 +00:00
Fix logging in cluster.ts
Fix a bug calling the cluster process in index.ts Set a default value for rtmp.cluster in config.ts Update documentation
This commit is contained in:
10
docs/CHAT.md
10
docs/CHAT.md
@ -3,7 +3,7 @@ This is not a guide to using the webchat, this a reference point for writing cli
|
||||
|
||||
Satyr's webchat is based on [socket.io](https://socket.io/), you can find clients for [Java](https://github.com/socketio/socket.io-client-java), [C++](https://github.com/socketio/socket.io-client-cpp), [Swift](https://github.com/socketio/socket.io-client-swift), [Dart](https://github.com/rikulo/socket.io-client-dart), and probably more.
|
||||
|
||||
Socket.IO is loosely reminiscent of IRC in that you will receive events from the server and sent events to it. The following is a list of incoming and outgoing events you will need to handle or send. If you would like to see examples, templates/chat.html is implementation used in the webclient by satyr.
|
||||
Socket.IO is loosely reminiscent of IRC in that you will receive events from the server and sent events to it. The following is a list of incoming and outgoing events you will need to handle or send. If you would like to see examples, templates/chat.html is the implementation used in the webclient by satyr.
|
||||
|
||||
# Incoming Events
|
||||
These are events you will recieve from the server that need to be handled in some way.
|
||||
@ -53,12 +53,12 @@ This is a request to set the client's nickname. The data attached to a NICK even
|
||||
password: "the optional password"
|
||||
}
|
||||
```
|
||||
During the initial connect of the client, the server will check for the "Authorization" cookie. If the cookie is a valid, signed JWT, the client will be assigned the nickname of the user that cookie belongs to. If it doesn't exist or is invalid, the client will be assigned a nickname of the form Guest+some integer.
|
||||
During the initial connect of the client, the server will check for the "Authorization" cookie. If the cookie is a valid, signed JWT the client will be assigned the nickname of the user that cookie belongs to. If it doesn't exist or is invalid, the client will be assigned a nickname of the form Guest+some integer.
|
||||
|
||||
The server will send an alert notifying the client of either the nickname change, or some error.
|
||||
|
||||
## MSG
|
||||
This is a chat message to send to room. It should be a JSON object in the following format:
|
||||
This is a chat message to send to a room. It should be a JSON object in the following format:
|
||||
```
|
||||
{
|
||||
room: "the room to send the messag to",
|
||||
@ -117,10 +117,10 @@ A request to unban an IP address. It can only be done by the owner of the room.
|
||||
|
||||
# Final Notes
|
||||
|
||||
Sending more than 10 messages a second will cause the server to kick your client. If kicked this way 3 times, the client will be banned for 20 minutes.
|
||||
Sending more than 10 messages per second will cause the server to kick your client. If kicked this way 3 times, the client will be banned for 20 minutes.
|
||||
|
||||
Kicked or banned users will not be notified of this through an event.
|
||||
|
||||
The server *will* send your own MSG events back to you, you will need to parse them out if you want to append them immediately.
|
||||
The server *will* send your own MSG events back to you, you will need to parse them out if you want to display them immediately.
|
||||
|
||||
Clients who successfully authenticate as a registered user, through either a password or a signed JWT, can ignore nickname collision and have as many connections as they wish.
|
@ -7,11 +7,23 @@ Some values you might want to change are
|
||||
satyr:
|
||||
registration: true
|
||||
# allow new users to register
|
||||
port: 8000
|
||||
# the port to serve http on
|
||||
|
||||
http:
|
||||
hsts: true
|
||||
# enable strict transport security
|
||||
|
||||
rtmp:
|
||||
port: 1935
|
||||
# change the port to serve rtmp on
|
||||
cluster: false
|
||||
# enable clustering for the RTMP server
|
||||
# clustering is an attempt to take better advantage of multi threaded systems in spite of node.js being single-threaded
|
||||
# satyr will spawn one RTMP Worker per CPU core, and round-robin incoming connections between workers
|
||||
# If you turn this on, satyr will no longer be able to reliably serve RTMP streams to clients
|
||||
# Your users will have to use DASH instead
|
||||
|
||||
media:
|
||||
record: true
|
||||
# allow users to record VODs
|
||||
@ -36,7 +48,7 @@ transcode:
|
||||
# https://trac.ffmpeg.org/wiki/HWAccelIntro is a good place to start
|
||||
|
||||
# having more than 4-5 variants will start giving diminishing returns on stream quality for cpu load
|
||||
# if you can't afford to generate at least 3 variants, it's reccomended to leave adaptive streaming off
|
||||
# if you can't afford to generate at least 3 variants, it's recommended to leave adaptive streaming off
|
||||
|
||||
crypto:
|
||||
saltRounds: 12
|
||||
@ -49,7 +61,6 @@ chat:
|
||||
# for their chat at /profile/chat
|
||||
irc:
|
||||
enabled: true
|
||||
# enable irc mirroring
|
||||
server: chat.freenode.net
|
||||
port: 6697
|
||||
tls: true
|
||||
@ -61,7 +72,6 @@ chat:
|
||||
|
||||
discord:
|
||||
enabled: true
|
||||
# enabled discord integration
|
||||
token: abcdefghijklmnopqrstuvwxyz
|
||||
# the access token for the bot
|
||||
# note that the bot will mirror every channel matching the name the user has chosen
|
||||
@ -77,10 +87,9 @@ chat:
|
||||
|
||||
xmpp:
|
||||
enabled: true
|
||||
# enable xmpp
|
||||
server: '404.city'
|
||||
server: 'example.com'
|
||||
port: 5222
|
||||
jid: 'satyr-dev@404.city'
|
||||
jid: 'exampleBot@example.com'
|
||||
password: 'abcde'
|
||||
# connection settings for the bot
|
||||
nickname: 'SatyrChat
|
||||
|
@ -4,7 +4,7 @@ A more detailed walkthrough.
|
||||
### System Dependencies
|
||||
Install ffmpeg(>= 4.2.1) and mysql through your distribution's package manager.
|
||||
See [this page](https://nodejs.org/en/download/package-manager/) for instructions on installing node v10.
|
||||
If the version in your distro's package manager is different, you can install 'n' through npm to manage node versions.
|
||||
If the version in your distro's package manager is different, you can install [n](https://www.npmjs.com/package/n) through npm to manage node versions.
|
||||
|
||||
### Installing Satyr
|
||||
Before starting, you should create a system user to run the satyr service.
|
||||
|
@ -1,7 +1,7 @@
|
||||
## Satyr Usage
|
||||
|
||||
### Administration
|
||||
Satyr needs access to port 1935 for RTMP streams, and will serve HTTP on port 8000. The ports can be changed with follow config lines.
|
||||
Satyr needs access to port 1935 for RTMP streams, and will serve HTTP on port 8000. See CONFIGURATION.md for details on changing this.
|
||||
|
||||
For HTTPS, run a reverse proxy in front of satyr. An example nginx block is shown below.
|
||||
```
|
||||
|
Reference in New Issue
Block a user