multiserver/README.md

274 lines
6.9 KiB
Markdown
Raw Permalink 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
2022-01-21 06:37:20 -08:00
## Obsolete
This version has many bugs, is __NOT__ updated to work with Minetest 5.4.1
and is unlikely to receive any future updates.
It's untested and the code isn't very clean. __You should use [mt-multiserver-proxy](https://github.com/HimbeerserverDE/mt-multiserver-proxy) instead.__
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-04-22 01:39:24 -07:00
**Note: The authentication databases of the minetest servers need to be deleted before multiserver can connect to them. You can convert minetest auth databases to the multiserver auth database schema with [multiserver_converter](https://github.com/HimbeerserverDE/multiserver_converter).**
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
servers:
lobby:
address: "127.0.0.1:30000"
default_server: lobby
force_default_server: true
```
> `host`
```
Type: String
2021-03-13 10:17:27 -08:00
Description: The IP address and port the proxy will be running on,
default is 0.0.0.0:33000
2021-01-17 04:17:53 -08:00
```
> `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.
```
> `groups`
```
Type: Dictionary
Description: List of all server groups
```
> `groups.*`
```
Type: List
Description: Contains server group members
```
> `group_privs`
```
Type: Dictionary
Description: List of all server groups and the required privilege (on the proxy), can be omitted
```
2021-01-17 04:17:53 -08:00
> `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
```
> `csm_restriction_noderange`
```
Type: Integer
Description: The CSM node range, default is 8
```
> `server_reintergration_interval`
```
Type: Integer
Description: Number of seconds between server reintegrations, default is 600.
A server reintegration is reconnecting the RPC user and refetching the media
from one or more minetest servers.
```
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`
```
2021-03-02 09:30:59 -08:00
Type: String
2021-04-03 12:18:11 -07:00
Description: The prefix of proxy chat commands, default is #
```
> `console_prompt`
```
Type: String
Description: The text preceeding the console input, default is ${command_prefix}>
2021-02-28 10:56:44 -08:00
```
2021-03-02 09:30:59 -08:00
> `do_fallback`
```
Type: Boolean
Description: If this is true players are automatically redirected to
the default server if the server they are on shuts down or crashes,
default is true
```
2021-03-07 00:53:26 -08:00
> `disallow_empty_passwords`
```
Type: Boolean
Description: Whether to deny access if the password is empty,
default is false
```
2021-03-20 11:38:57 -07:00
> `modchannels`
```
Type: Boolean
Description: Whether to allow clients to use modchannels,
default is true
```
> `force_latest_proto`
```
Type: Boolean
Description: Whether to force clients to use the latest protocol version,
default is false
```
2021-04-01 11:31:34 -07:00
> `remote_media_server`
```
Type: String
Description: The address of a remote media server, no OOB sending
of media if unset
```
2021-04-22 04:47:52 -07:00
> `psql_db`
```
Type: String
Description: The name of the authentication database, SQLite3 is used if unset
```
> `psql_host`
```
Type: String
Description: The address the PostgreSQL server is running on, default is localhost
```
> `psql_port`
```
Type: Integer
Description: The port the PostgreSQL server is listening on, default is 5432
```
> `psql_user`
```
Type: String
Description: The username to use when connecting to the PostgreSQL database
```
> `psql_password`
```
Type: String
Description: The password to use when authenticating to the PostgreSQL database
```
2021-03-07 00:53:26 -08:00
> `serverlist_url`
```
Type: String
Description: The URL of the list server to announce to,
announcements are disabled if this is unset
```
2021-03-06 11:33:25 -08:00
> `serverlist_address`
```
Type: String
2021-03-07 00:53:26 -08:00
Description: The server address to be displayed on the server list,
can be omitted
```
> `serverlist_name`
```
Type: String
Description: The name to be displayed on the server list, can be omitted
```
> `serverlist_desc`
```
Type: String
Description: The description to be displayed on the server list,
can be omitted
```
> `serverlist_display_url`
```
Type: String
Description: The URL of the website of the server, can be omitted
```
> `serverlist_creative`
```
Type: Boolean
Description: Whether one of the minetest servers has creative enabled,
default is false
```
> `serverlist_damage`
```
Type: Boolean
Description: Whether one of the minetest servers has damage enabled,
default is false
```
> `serverlist_pvp`
```
Type: Boolean
Description: Whether one of the minetest servers has PvP enabled,
default is false
```
> `serverlist_game`
```
Type: String
Description: The subgame that is used on the minetest servers,
can be omitted
```
> `serverlist_can_see_far_names`
```
Type: Boolean
Description: Whether unlimited player view range is enabled,
default is false
```
> `serverlist_mods`
```
Type: List
Description: All mods that have been installed on any of the
minetest servers, can be omitted
2021-03-06 11:33:25 -08:00
```
> `serverlist_announce_interval`
```
Type: Integer
Description: Number of seconds between serverlist announcement updates,
default is 300
```