Miracle server side connection principle

Mondo Technology Updated on 2024-01-30

First of all, let's analyze the structure of the MU server group: the MU server includes a total of 8 startup files, including 2 data servers (DS), a connection server (CS), a login server (JS), an event server, a Demon Square server, a War Alliance server and a game server (GS), a total of 7 types (2 DS counts as one), including the core part we must install (sqlserver) A total of 8 types.

1.sqlserver

First of all, let's take a look at sqlserver, this is the core part of the server, and the independent part is very simple, just point the corresponding data source to your actual SQL server.

2.dateserver(ds)

Let's take a look at the shortcut to start 1: d: muserver dataserver1 dataserverexe 55960, the last 55960 is the port occupied by DS, used to connect with GS, as for how to connect, there will be detailed instructions in the later GS.

3.There is nothing in the shortcut to CS start 3,The external port of CS,Use UE to change thisEveryone should know,The internal port of CS is 55557,The use of this port will be mentioned later。 Now let's analyze the file in the CS directory: connectserverlistdat,data/connectserverlist.dat,data/serverlist.These 3 files determine what kind of GS can be connected to your CS and what kind of GS the player can connect to through your CS, let's take a look at the format. //server list

0 "Miracle 1-1" "192.168.0.1" 55901 "show"

1 "Miracle 1-2" "192.168.0.2" 55901 "show"

20 "Miracle 2-1" "192.168.0.3" 55901 "show"

21 "Miracle 2-1" "192.168.0.3" 55901 "show"

Such information represents.

GS number 0 code name Miracle 1-1 can be connected to this CS After connection, this server is displayed as 1 server and 1 line After the player clicks 1-1, enter the game server 192168.0.Port 1 of 55901.

GS number 1 code name Miracle 1-2 can be connected to this CS After connection, this server is displayed as 1 server and 2 lines After the player clicks 1-2, enter the game server 192168.0.Port 2 of 55901.

GS number 20 code name Miracle 2-1 can be connected to this CS After connection, this server is displayed as 2 servers and 1 line After the player clicks on 2-1, enter the game server 192168.0.Port 3 of 55901.

GS number 21 code name Miracle 2-2 can be connected to this CS After connection, this server is displayed as 2 servers and 2 lines After the player clicks on 2-2, enter the game server 192168.0.Port 4 of 55901.

Note that the number of 2 servers starts with 20, and the same number of 3 servers starts with 40, and the code indicates the identity distinction of GS, and only the GS with the code name can be connected to the specified CS, and the corresponding CS will be displayed on this time.

The server appears and the IP and port of the latter part are the IP and ports occupied by the specified GS (the domain name can be used here, but it cannot exceed 15 bits, otherwise it will not be recognized normally), and the funny phenomenon here is that when your miracle 1-2 GS is connected to CS, although CS will show the existence of GS (show server 1-1), but it cannot directly identify the IP and port of GS. If you specify the wrong GSIP and port, you may not be able to connect or point to a different GS (this is why some private servers are disconnected at 1-1 servers, and it is also the reason for sharing maps on both lines).

4.js: Let's take a look at the js startup shortcut (shortcut 4).

d:\muserver\joinserver\joinserver.exe /p55970 /ca127.0.0.1 cp55557 we see that p55970 represents the port occupied by js, ca1270.0.1 represents the IP cp55557 of the CS pointed to by JS (the internal port 55557 of CS mentioned above, and there is another place that will be used later), so that the connection between JS and CS is clear to us, and we continue with the following analysis.

5.The most critical GS instructions.

The shortcut to GS is d: muserver gameserver gameserverexe 127.0.0.1 55970 127.0.0.1 55960 55901 Here we see 1270.0.1 55970 represents the IP and port of the JS to which this GS points (the connection to the JS is set here)1270.0.1 55960 represents the IP and port of the DS to which this GS points (the connection to the DS is set here), and the last 55901 is the port occupied by the GS (as explained in CS above).

Related Pages