Role

ConnectServer is the first entry point for players: the client connects to it, receives the server list read from Data\ServerMap.xml, and once a server is selected, receives that GameServer's IP + port. GameServers connect back to ConnectServer to report their status (online, number of players online), which is shown in the list.

File: 1.ConnectServer\connectserver.conf (section [ConnectServer]).

File reading rules (applies to all 3 files connectserver.conf, loginserver.conf, serverlink.conf as well as GameServer.conf): a line starting with ; is a comment and must be on its own line; do not write a comment after a value. If a key name is misspelled, the key is ignored and the default value is used. Key names are case-insensitive. After editing, you must restart that program.

Keys

Key Sample value Meaning
ServerName "Connect Server" Name shown on the server window and the tab name in START.
AccountDB "127.0.0.1;1433;sa;your_password;MuOnline" Account database connection, in the form IP;Port;Account;Password;Database name. Point it to the same database as LoginServer. See connection string.
AccountDB.Threads 1 Number of background connections to the database (1 - 32).
AccountDB.QueryThreads 2 Number of direct query connections. ConnectServer makes very few queries, so 1 - 2 is enough.
DatabasePingMinutes 30 How many minutes between database "pings" so the connection is not dropped when idle. Default 30.
Client.Port 44406 Port players connect to. It must match the port set in the client (main.exe / the Launcher's IP file). Open this port in Windows Firewall and on your modem / rented server.
Client.ListenIP "192.168.1.128" Network card that accepts players. "0.0.0.0" = all network cards (easiest, recommended for rented servers). A specific IP = only the network card with that IP; if you enter an IP that does not exist on the machine, the port cannot be opened. This is not the IP sent to players (that IP is in ServerMap.xml). Default when the key is omitted: 0.0.0.0.
The sample value is the LAN IP of the development machine, you must change it.
Client.Open 1 1 = open the door to players; 0 = reject all players (close the door during maintenance). Default 1.
Client.MaxPerIP 100 Maximum simultaneous connections from the same IP (anti-spam / too many clients opened). -1 = unlimited. 0 = block everyone, do not set 0 (it is also the default when the key is omitted, so do not delete this key).
Client.MaxTotal 1000000 Total number of players on the server selection screen at the same time. 0 = block everyone, do not set 0 (it is also the default when the key is omitted).
Client.IdleKickSeconds 60 A player idle on the server selection screen for more than this many seconds is disconnected. Players already in the game are not affected. 0 = disconnect immediately, do not set 0.
GameServer.Port 44422 Internal port for GameServer to connect to and report status. It must match ConnectServer.Port in Data\game_common.conf. If the port is wrong, GameServer still runs but does not appear in the server selection list.
GameServer.ListenIP "127.0.0.1" "127.0.0.1" = only a GameServer on the same machine can connect (safe, recommended). "0.0.0.0" = a GameServer on another machine can connect too; in that case you must block this port from the outside with a firewall. Default when the key is omitted: 127.0.0.1.
ServerListReloadSeconds 60 How many seconds between reloads of Data\ServerMap.xml (editing the server list does not require a restart). It only reloads when a player requests the list. 0 = no reload (default).
UpdateUrl "" Download address of the Update sent to the client when the client asks for the version. Leave empty if not used.
Panel 1 1 = show the management window; 0 = show only the black console window. When opened with START, it always runs hidden and appears in a START tab, even if set to 0.
ShutdownTimeoutSeconds 60 When shutting down the server, if the program makes no progress for longer than this many seconds (truly hung), it writes a log, creates a dump file _hang.dmp, then forces exit. If it is waiting for a database save and is still making progress, it is not forced to shut down. Values below 60 are raised to 60; 0 = disable this mechanism.

Configuration example

[ConnectServer]
ServerName = "Connect Server"
AccountDB = "127.0.0.1;1433;sa;your_password;MuOnline"
AccountDB.Threads = 1
AccountDB.QueryThreads = 2
DatabasePingMinutes = 30
Client.Port = 44406
Client.ListenIP = "0.0.0.0"
Client.Open = 1
Client.MaxPerIP = 100
Client.MaxTotal = 1000000
Client.IdleKickSeconds = 60
GameServer.Port = 44422
GameServer.ListenIP = "127.0.0.1"
ServerListReloadSeconds = 60
UpdateUrl = ""
Panel = 1
ShutdownTimeoutSeconds = 60

Maintenance tip

To close the door to new players without shutting down the server: set Client.Open = 0 and restart ConnectServer. Players already in the game are not affected because they are already connected to GameServer.