multiserver/README.md

121 lines
3.4 KiB
Markdown
Raw Normal View History

2021-01-17 04:17:53 -08:00
# multiserver
Minetest reverse proxy supporting multiple servers and media multiplexing
2021-02-21 10:43:45 -08:00
2021-01-18 08:40:27 -08:00
## Credits
This project was made possible by [anon55555's Minetest RUDP package](https://github.com/anon55555/mt/tree/master/rudp).
2021-01-18 08:40:27 -08:00
2021-01-23 08:57:36 -08:00
## Modchannel RPC API
There is a modchannel-based RPC API for minetest servers: [click here](https://github.com/HimbeerserverDE/multiserver_api).
2021-01-17 04:17:53 -08:00
## Installation
2021-02-21 10:43:12 -08:00
Go 1.16 or higher is required
2021-01-17 04:17:53 -08:00
`go get github.com/HimbeerserverDE/multiserver`
2021-01-17 05:47:52 -08:00
### Updating
2021-01-17 04:17:53 -08:00
`go get -u github.com/HimbeerserverDE/multiserver`
## How to use
2021-01-17 04:26:23 -08:00
**Note: This shouldn't be used with existing minetest servers without moving authentication data (not the database files) to the proxy and then deleting the auth databases on the minetest servers! Not doing so can cause proxy <-> mt_server authentication to fail.**
2021-01-17 04:24:29 -08:00
2021-01-17 04:17:53 -08:00
### Running
2021-02-07 02:32:53 -08:00
The `go get` command will create an executable file in `~/go/bin/multiserver`.
2021-01-17 04:17:53 -08:00
This file should always be run from the same working directory. If you don't do this, the program will be unable to read the old data and will create
the default files in the new working directory.
### Configuration
The configuration file is located in `WORKING_DIR/config/multiserver.yml`
- Default config file
```yml
host: "0.0.0.0:33000"
servers:
lobby:
address: "127.0.0.1:30000"
default_server: lobby
force_default_server: true
```
> `host`
```
Type: String
Description: The IP address and port the proxy will be running on
```
> `player_limit`
```
Type: Integer
2021-01-19 09:07:56 -08:00
Description: Maximum number of concurrent connections, unlimited if not set
2021-01-17 04:17:53 -08:00
```
> `servers`
```
Type: Dictionary
Description: List of all servers
```
> `servers.*`
```
Type: Dictionary
Description: Contains server details
```
> `servers.*.address`
```
Type: String
Description: The IP address and port this server is running on
```
> `servers.*.priv`
```
Type: String
Description: If this is set, players need this privilege (on the proxy) to connect to this server.
Leave this empty to require no special privilege. Note that this only affects the #server command. This means that
players can still be connected to this server if it is the default server, a minetest server requests it
or if a different command is used.
```
> `default_server`
```
Type: String
Description: Name of the minetest server new players are sent to
```
> `force_default_server`
```
Type: Boolean
Description: If this is false known players are sent to the last server they were connected to, not to the default server
```
2021-01-17 05:47:52 -08:00
> `admin`
```
Type: String
Description: The "privs" privilege is granted to the player with this name on startup
```
2021-01-22 09:31:57 -08:00
> `csm_restriction_flags`
```
Type: Integer
2021-01-22 09:31:57 -08:00
Description: The CSM restriction flags, default is none
* 0: No restrictions
* 1: No CSM loading
* 2: No chat message sending
* 4: No itemdef reading
* 8: No nodedef reading
* 16: Limit node lookup
* 32: No player info lookup
* 63: All restrictions
2021-01-29 06:49:51 -08:00
To set multiple flags at the same time add the corresponding numbers
2021-01-22 09:31:57 -08:00
```
> `rpc_reconnect_interval`
```
Type: Integer
2021-02-21 05:21:02 -08:00
Description: Number of seconds between RPC reconnection attempts, default is 600
```
> `media_refetch_interval`
```
Type: Integer
Description: Number of minutes between media refetching, default is 10
```
2021-02-28 02:59:35 -08:00
> `disable_builtin`
```
Type: Boolean
Description: If this is true the builtin chatcommands and the redirect error message are deactivated, default is false
```
2021-02-28 10:56:44 -08:00
> `command_prefix`
```
Type: Boolean
Description: Prefix of proxy chat commands, default is #
```