pdelvo / Pdelvo.Minecraft.Proxy

MineProxy.Net
MIT License
7 stars 0 forks source link

Some notes #19

Closed ImDeity closed 12 years ago

ImDeity commented 12 years ago

Compiled and did a quick test of the project today and, after some initial difficulty, managed to get it working with client version 1.3.2 and server version 1.3.

1) There are 2 files that have a backtick character in the file name that when downloaded through github (either via git or through the github 'zip' feature), cause the file name to get messed up. There were 2 instances where this happens:

2) The default config file for the Console is a bit sparse. The one I got stuck on was the "minecraftVersion" property which is set to 40 by default which gave an "outdated server" error when connecting to backends. After some trial and error, I realized this needed to be "39" to work with Minecraft 1.3. Is there a place to find these special version numbers and their relevant Minecraft versions?

3) When doing a kick with the IP of the server to connect to, the whole program crashed with an exception which I don't quite remember but it mentioned a outdated server error within the exception when debugging. I tracked it down to this line: new IPEndPoint(IPAddress.Parse(result.Groups["ip"].Value), int.Parse(result.Groups["port"].Value)), ProtocolInformation.MaxSupportedServerVersion); which led me to ProtocolInformation.cs in the Minecraft.Protocol.Helper. I then changed "int MaxSupportedServerVersion" to 39 (default 40), recompiled, and the exception went away and the server to server transfer worked perfectly. Is this the correct thing to do or is there a parameter I can pass in the kick message that lets me specify what MaxSupportedServerVersion for the serverchange plugin to use or something I can set in the config file so that recompiling the project isnt required?

4) I have setup only 1 server in the 'server' field of the config file (under the proxy property). Is there any reason to specify all the other backend servers in this file? Is there some kind of failover system that causes the Console to try other servers if the first is down or something? The reason I ask is it seems the serverchange plugin allows one to kick the client to any IP even if it isnt in the Console.exe.config file?

Thanks and keep up the great work.

pdelvo commented 12 years ago

Thank you for your issue

1) The naming with this ´1 is convention for generic types, but if they cause these Problems i will remove them today.

2) These are minecraft protocol Version numbers. 40 is the Version of the current pre release and for testing ist the Default number in the Settings file. You can look it up here . I will add the newest pre Version shortly.

3) It is planned to add the other Server to the Settings file and then it will look it up there. A other Option i was thinking about is to Change the Syntax of the kicking message, so that the Version will be transfered too, but then it would cause Problems with bukkit plugins with this Feature. If you have an Suggestion be free to tell it to me :) Currently it will pick the latest minecraft Version it supports

4) You can add dns entries, or add Servers to specify the minecraft Version (not yet implemented, see 3))

This is how you can add use the dns Feature:

<add name="devServer" dns="dev.myserver.com" endPoint="127.0.0.1:25567"isDefault="false" minecraftVersion="40"/>

If you connect with minecraft to dev.myserver.com (and the dns entry Points to the Proxy Server) it will connect to the second Server. if it cant find a Fitting dns entry in theserver list it will fall back the default server