Cuberite Forum
ProtoProxy on online-mode server - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: ProtoProxy on online-mode server (/thread-1717.html)

Pages: 1 2


ProtoProxy on online-mode server - daniel0916 - 01-10-2015

Hello guys,

it's a long time ago since I was the last time here.Smile.
i want to use protoproxy for connecting to a server in online-mode. But i was kicked with "Failed to verify username!". But it should work because the EncryptionResponse send the proxy to the server or?

Greetings
Daniel


RE: ProtoProxy on online-mode server - xoft - 01-10-2015

ProtoProxy cannot be used for online mode, because the encryption packet contains a hash of the server identification and user's token, neither of which can be obtained by ProtoProxy as it is now.

There is a way this could be done, but it's non-trivial. ProtoProxy would need to register as a separate server with Mojang's servers, the client would then connect to ProtoProxy, and it would register as a player for the underlying server with Mojang. For this to work, you'd need to feed your Mojang account name and password to ProtoProxy, possibly as cmdline arguments; and ProtoProxy would then only work when impersonating you.

I don't think it's worth the effort, since there not much real difference between the online and offline modes. Getting proper 1.8 support would be a much more appreciated effort.


RE: ProtoProxy on online-mode server - daniel0916 - 01-10-2015

Okay, when the connection between the server and client is encrypted can this the proxy handle? so the request packet send to client directly?


RE: ProtoProxy on online-mode server - xoft - 01-10-2015

The protocol encryption is enforced from the serverside. ProtoProxy doesn't request encryption from the client connecting to it, and if the server requests encryption from ProtoProxy, it terminates the connection, because it cannot provide the encryption data (needs the player's Mojang account details). So no, ProtoProxy doesn't do the encryption.


RE: ProtoProxy on online-mode server - daniel0916 - 01-10-2015

Okay, so when i made a encrypted connection with client and server i can't encrypt it? Because i tried it but which keys should i use for Client and Server Decrypter/Encrypter?


RE: ProtoProxy on online-mode server - daniel0916 - 01-10-2015

Now, when i encrypt connection to server and the to the client is unencrypted i can only make this when i know this account details. From which account details can i generate the things what i need to send to the server? I want to connect about the proxy on a server like hivemc. I will try some things.

The SendEncryptionKeyResponse generates the things but it don't work because it's not right?


RE: ProtoProxy on online-mode server - xoft - 01-11-2015

You need to read and understand the Authentication:
http://wiki.vg/Authentication


RE: ProtoProxy on online-mode server - daniel0916 - 01-11-2015

Okay, i understand it.
So when the server authenticate with the proxy it will work.

And what is when i let the server and client make the authentication and i only read with the proxy the request and response? Because only after the response the connection is encrypted. So can't i use the secret keys from request and response? It's only a idea. Maybe you know if this can work...

Edit: I'm working on it. Big Thanks to HowanerBig Grin


RE: ProtoProxy on online-mode server - daniel0916 - 01-12-2015

Current code:
EncryptionKeyRequest: http://pastebin.com/cjY4qYkC
EncryptionKeyResponse: http://pastebin.com/XrcvdyP2

It's a problem with the decryption of the shared secret...
Log: http://pastebin.com/fMmK5hRz


RE: ProtoProxy on online-mode server - daniel0916 - 01-14-2015

@xoft Can you explain how your method works with using the mojang account details?