Sure, you basically just write a proxy and dynamically rewrite the protocol-version, so the 1.2 clients think it's a 1.2 server
Printable View
Sure, you basically just write a proxy and dynamically rewrite the protocol-version, so the 1.2 clients think it's a 1.2 server
Short Answer
- Yes.
Long Answer
- Version 1.2 and 1.0 have almost the same "protocol", meaning their network communication is very similar. The only difference i saw was in the download mechanism. Not long ago i did create a fake 1.0 server that showed in 1.0 master-server list, but it was just a gateway to a 1.2 server (it can go both ways). This however doesn't work if you have a mod in 1.2 server that needs to be downloaded in 1.0 as the "fast-download" can't be achieved in 1.0.
- "Proxying" a real server and allowing players to join to it has its advantages and disadvantages.
Positive things:
- Regardless of the real server you can make the fake one show/hide in master-server.
- "Multi-Version" for 1.0 and 1.2. Fake server can accept both 1.0 and 1.2 players as long as you change the protocol of the connect packet.
- Complete control of the client. You cant actually know what the client is sending to the server as it is encoded (or maybe you know how) but you can disconnect him at any time, with any message.
- You can catch rcon commands. I haven't tested this yet, but as far as i remember rcon packet is sent in human-readable form. ( "\xff\xff\xff\xffrcon RCON_PASSWORD status")
- All players connected to the fake server have same IP. You can use this as, lets say a VPN to protect yourself.
- If your fake server is on the same machine as your original server, players with cracked keys will be able to join as it will appear they are connecting from LAN.
Negative things:
- Delay. When connected to the fake server i experienced a ping increase from 40-50 ms (regular) to 70-80 ms.
- All players connected to the fake server have same IP. Banning one fake player will result in banning them all.
- IF your fake server is on the same machine as your original server, players will have 0 GUID.
EDIT: Tested for rcon. Works.
I did the same with my CoD UO Server. My Proxy is written in Java (multi-threaded) and works fine. No Ping increase at all.
I also get the client IPs with \rcon status for example. I mapped the local ports of the proxy to their original IP addresses. Then I simply replace them in "status" command.
I didn't solve the GUID problem, because I didn't need it. But it's possible for sure. I guess you have to use ipAuthorize and challengeResponse or something
Well considering that both your original and fake server are on the same machine and communicating via LAN, you should have no additional latency.
"Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source." So the needed time for the message to arrive from your computer to the fake server is summed with the time needed for the fake server to send (and receive) a message from original server. In your case host and destination computer are the same thing so it may seem like there is no additional ping.Code:C:\Users\stEvo>ping 192.168.1.100
Pinging 192.168.1.100 with 32 bytes of data:
Reply from 192.168.1.100: bytes=32 time<1ms TTL=128
Reply from 192.168.1.100: bytes=32 time<1ms TTL=128
Reply from 192.168.1.100: bytes=32 time<1ms TTL=128
Reply from 192.168.1.100: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
The time can also be effected with the level of efficiency of your implementation. I think it doesn't matter what programming language you use (for sockets) because you wont find any notable difference.