[Proxy] Client Closes on GameServer Connection.

06/29/2010 22:01 EnoiZe#1
This is my Code to send my own LoginResponse:
Code:
                                if (!LoginRequest)
                                {
                                    byte[] _buffer = new byte[Size];
                                    _buffer = PacketAnalyse.ReturnLoginResponse(GlobalConfig.ServerIp, Data);

                                    Crypt.Encrypt(ref _buffer);
                                    sockClient.Send(_buffer);

                                    Console.WriteLine("[Proxy->Client] LoginResponse sended.");
                                    LoginRequest = !LoginRequest;
                                    continue;
                                }
The Function to make the LoginResponse:
[Only registered and activated users can see links. Click Here To Register...]

After the LoginResponse the Proxy gets an Packet with the Size of: 334 sometimes 336 or 330 and then Client Closes.

I hope anybody can help me or got an Idea what to do ;)
06/30/2010 02:01 pro4never#2
The client wll crash on new patches if you use 127x.x.x

Use a hamachi ip and give that a shot, if that isn't the problem then chances are the problem lies with your encryption .. or could be you are modifying a pacet incorectly.

Sorry i can't see the full code section cause my phone refuses to realize i can scroll through it lol.
06/30/2010 14:48 EnoiZe#3
I used the IP that i used for my Servers: 192.168.xxx.xxx
Works everytime and was at AuthServer/GameServer (not Proxy) no problem.

The Encryption/Decryption is copyed from an existed 5165 Source (Basser's one) worked too (tested).

I dont know if the Packet is incorrect, i dont know if there is an mistake. But i think not.
06/30/2010 17:13 _DreadNought_#4
Quote:
The Encryption/Decryption is copyed from an existed 5165 Source (Basser's one) worked too (tested).
If thats the only encryption/decryption your using theres a new RC5 password encryption
- Generated seed, new RC5 password layer along with DHKey changed and a new packet send on auth

but if your getting to GameServer ?
06/30/2010 17:28 EnoiZe#5
I just send the LoginPackets to the Client to let the Client connect my Game Proxy Port.
Then i just simply redirect the packets not encrypt/decrypt anything.
I just receive 1 Packet Size between 300-314 (Anytime an other)
Client Close after an while of 5-7 Seconds after received. (I think Client wait for something, but he should not because all is redirected)
07/01/2010 10:04 ImmuneOne#6
Quote:
Originally Posted by EnoiZe View Post
I just send the LoginPackets to the Client to let the Client connect my Game Proxy Port.
Then i just simply redirect the packets not encrypt/decrypt anything.
I just receive 1 Packet Size between 300-314 (Anytime an other)
Client Close after an while of 5-7 Seconds after received. (I think Client wait for something, but he should not because all is redirected)
AuthSequence;
Quote:
1. Client connects to Proxy
2. Proxy connects to Server
3. Server sends seed packet to proxy
4. Proxy sends it to client
5. Client sends authrequest to proxy
6. Proxy sends it to server
7. Server sends authresponse to proxy
8. Proxy modifies it
Code:
                case 1055: //AuthResponse: Load & Replace IP
                    if (!Kernel.Keyed.ContainsKey(Packet.Reader.UInt32(4)))
                        Kernel.Keyed.Add(Packet.Reader.UInt32(4), Instance);
                    Kernel.Game.RemoteIPAddress = Encoding.ASCII.GetString(Packet, 12, 15).Trim((char)0x0000);
                    System.Buffer.BlockCopy(Encoding.ASCII.GetBytes(""+Kernel.IPAddress+"\0\0\0\0\0\0\0"), 0, Packet, 12, 15);
                    break;
9. Proxy sends it to client
This is about what you need to complete the authsequence.
07/01/2010 12:25 Basser#7
Client doesn't close because its not getting a packet during the auth sequence.
It has to be something different, also the release of my source that you use, honestly isn't stable enough for a proxy.
07/01/2010 15:08 EnoiZe#8
Quote:
Originally Posted by Basser View Post
Client doesn't close because its not getting a packet during the auth sequence.
It has to be something different, also the release of my source that you use, honestly isn't stable enough for a proxy.
I switched from the new one to the older Source from you worked better. But i think about make my own complete self written to better understand sockets ;)
07/01/2010 18:53 _DreadNought_#9
While im here, for botting is there special code needed to catch out tq's anti-bot ?