Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Support for Minecraft Education Edition #10

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

bundabrg
Copy link
Contributor

@bundabrg bundabrg commented May 8, 2020

I can now successfully run ProxyPass between two MCEE 1.14.60 devices.

Changes include:

  • Will proxy through the MCEE signedToken correctly. I don't think the token ever expires so copying it could be useful if developing an MCEE server or an addon to GeyserMC for example. The token tells clients what tenant the server belongs to and both must belong to the same tenant. Technically you could multi-tenant a server by responding with an appropriate token.

  • With encrypt client and server bound traffic. We have to do this when passing the signedToken onwards but this change may be useful anyway for normal bedrock clients

Issues:

  • MCEE has a different CODEC (v363) as well as edition ("MCEE" instead of "MCPE") so this cannot run on the same port as Bedrock and as it stands is really an MCEE only branch and may be better to have a runtime flag that chooses the edition to run as (or a config value). I'm open to suggestions.

  • Uses a private build of Protocol for version v363 which is really just v361 rebadged with minor changes so it won't compile for anyone else yet. If this is of interest I'll PR to Protocol with my changes as well.

@lukeeey
Copy link
Member

lukeeey commented May 8, 2020

You kinda have to PR to protocol otherwise this pull request is useless and can’t be merged

@bundabrg
Copy link
Contributor Author

bundabrg commented May 8, 2020

That's why its a draft. Also in its current state it would be bad to merge into master as we need to specify the edition at runtime. I'm just placing this here in case there are any comments otherwise my actions will be to PR v363 to Protocol and add a config item for edition.

Changes:
  * Support both MCEE and MCPE versions.
  * Config entry to enable/disable education support
  * Enable 2 way encryption by default now whilst still performing mitm
@bundabrg bundabrg marked this pull request as ready for review May 12, 2020 11:50
@bundabrg bundabrg changed the title [WIP]: Initial Support for Minecraft Education Edition Initial Support for Minecraft Education Edition May 12, 2020
@bundabrg
Copy link
Contributor Author

bundabrg commented May 12, 2020

This now supports both MCPE and MCEE with a flag in the config file.

It will not compile unless first compiling CloudburstMC/Protocol#39 which will provide 2.5.7-SNAPSHOT version of of Protocol.

Now all yours @lukeeey. I'm so tired of looking at raw packets of meaningless data and having intimate knowledge of both zig zag encoding and VarInts as well as forgetting when packets had varints and when it was ints.

@bundabrg
Copy link
Contributor Author

bundabrg commented May 12, 2020

I do have a question. If a packet that does not have any mapping comes across does this get logged or is it just silently passed on? I have a slight suspicion that MCEE is passing a packet that I'm not seeing when the client presses pause and running tcpdump to confirm this is tricky considering the deluge of other data flowing.

@lukeeey
Copy link
Member

lukeeey commented May 12, 2020

Is there any sort of server software for education edition? Or you may be able to use IDA to dissasemble the client and then search for strings containing "Packet", as every packet class has a method that returns the packet name as a string.

@natekfl
Copy link

natekfl commented May 12, 2020

Just chiming in - As far as I can tell, there is no standalone server software for edu at the moment. See my post here https://minecrafteducation.zendesk.com/hc/en-us/community/posts/360062461351

@bundabrg
Copy link
Contributor Author

I've not needed to make any changes to this so I think this can be considered complete.

It's also now easier to test as the feature/mcee branch of GeyserMC provides a way to generate a token and connect using only 1 mcee account.

# Conflicts:
#	pom.xml
#	src/main/java/com/nukkitx/proxypass/ProxyPass.java
#	src/main/java/com/nukkitx/proxypass/network/bedrock/session/ProxyPlayerSession.java
#	src/main/java/com/nukkitx/proxypass/network/bedrock/session/UpstreamPacketHandler.java
@bundabrg
Copy link
Contributor Author

1.16 Version

@bundabrg
Copy link
Contributor Author

This is now 1.16 ready

bundabrg and others added 2 commits June 30, 2020 10:42
Changes:
  * Support both MCEE and MCPE versions.
  * Config entry to enable/disable education support
  * Enable 2 way encryption by default now whilst still performing mitm
  * Update for 1.16
  * Set raknetProtocol Version from codec
bundabrg and others added 7 commits July 26, 2020 18:32
# Conflicts:
#	.gitignore
# Conflicts:
#	pom.xml
#	src/main/java/com/nukkitx/proxypass/ProxyPass.java
#	src/main/java/com/nukkitx/proxypass/network/bedrock/session/DownstreamPacketHandler.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants