Go to file
HimbeerserverDE 5f27eefc9e
Support PostgreSQL for auth
2021-04-22 13:40:56 +02:00
.github Move CONTRIBUTING.md to .github directory 2021-04-19 09:42:00 +02:00
.gitignore Ignore correct logfile path 2021-04-03 19:26:32 +02:00
LICENSE Add second copyright notice 2021-01-16 22:32:06 +01:00
README.md Add DB interface 2021-04-22 10:39:24 +02:00
active_object.go AO msgs: simplify readers + writers 2021-04-01 16:27:05 +02:00
auth.go Support PostgreSQL for auth 2021-04-22 13:40:56 +02:00
ban.go Support PostgreSQL for auth 2021-04-22 13:40:56 +02:00
blockdata.go Use new RUDP version 2021-03-29 18:57:30 +02:00
chat.go Fix chat messages not arriving at the MT server 2021-04-18 16:21:00 +02:00
command.go Use new DB API 2021-04-22 12:33:50 +02:00
config.go Add default value for host 2021-03-13 19:17:27 +01:00
conn.go Fix #69 2021-04-02 17:24:32 +02:00
console.go Fix chat messages not arriving at the MT server 2021-04-18 16:21:00 +02:00
db.go Support PostgreSQL for auth 2021-04-22 13:40:56 +02:00
end.go Write logfiles on stop only 2021-04-06 15:10:36 +02:00
go.mod Add DB interface 2021-04-22 10:39:24 +02:00
go.sum Add DB interface 2021-04-22 10:39:24 +02:00
hand.go Use new RUDP version 2021-03-29 18:57:30 +02:00
igutils.go Update DB APIs 2021-04-22 12:04:43 +02:00
init.go Use new DB API 2021-04-22 12:33:50 +02:00
itemdef.go Fix ItemDef aliases 2021-04-04 12:07:29 +02:00
listen.go Add and use Conn.CloseWith (#67) 2021-04-02 13:39:35 +02:00
log.go Write logfiles on stop only 2021-04-06 15:10:36 +02:00
media.go Fix #78 2021-04-18 15:32:30 +02:00
multiserver.go Add and use Conn.CloseWith (#67) 2021-04-02 13:39:35 +02:00
nodedef.go NodeDef+Ban fixes + io.Writers: Redirect 2021-04-01 22:07:06 +02:00
player.go Check player name (#74) 2021-04-06 15:53:08 +02:00
privs.go Support PostgreSQL for auth 2021-04-22 13:40:56 +02:00
proto.go Reset sky on redirect - properly 2021-03-13 17:15:07 +01:00
proxy.go Add and use Conn.CloseWith (#67) 2021-04-02 13:39:35 +02:00
readwrite.go Add Bytes32 serialization 2021-04-01 16:18:00 +02:00
redirect.go Add basic load balancing (server groups) 2021-04-02 16:36:03 +02:00
rpc.go Use new DB API 2021-04-22 12:33:50 +02:00
serverlist.go Update serverlist version string 2021-04-06 17:08:44 +02:00
signal.go Handle SIGTERM 2021-03-10 19:17:36 +01:00
storage.go Update DB APIs 2021-04-22 12:04:43 +02:00
uptime.go Add basic serverlist announcements 2021-03-06 20:33:25 +01:00

README.md

multiserver

Minetest reverse proxy supporting multiple servers and media multiplexing

Credits

This project was made possible by anon55555's Minetest RUDP package.

Modchannel RPC API

There is a modchannel-based RPC API for minetest servers: click here.

Installation

Go 1.16 or higher is required

go get github.com/HimbeerserverDE/multiserver

Updating

go get -u github.com/HimbeerserverDE/multiserver

How to use

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.

Running

The go get command will create an executable file in ~/go/bin/multiserver. 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
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,
default is 0.0.0.0:33000

player_limit

Type: Integer
Description: Maximum number of concurrent connections, unlimited if not set

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

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

admin

Type: String
Description: The "privs" privilege is granted to the player with this name on startup

csm_restriction_flags

Type: Integer
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
To set multiple flags at the same time add the corresponding numbers

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.

disable_builtin

Type: Boolean
Description: If this is true the builtin chatcommands and the redirect error message are deactivated, default is false

command_prefix

Type: String
Description: The prefix of proxy chat commands, default is #

console_prompt

Type: String
Description: The text preceeding the console input, default is ${command_prefix}>

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

disallow_empty_passwords

Type: Boolean
Description: Whether to deny access if the password is empty,
default is false

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

remote_media_server

Type: String
Description: The address of a remote media server, no OOB sending
of media if unset

serverlist_url

Type: String
Description: The URL of the list server to announce to,
announcements are disabled if this is unset

serverlist_address

Type: String
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

serverlist_announce_interval

Type: Integer
Description: Number of seconds between serverlist announcement updates,
default is 300