Skip to content

Commit

Permalink
Update network/protocol subs & more closely simulate client MTU decre…
Browse files Browse the repository at this point in the history
…ment

Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle committed May 4, 2024
1 parent fca5b78 commit d842c08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion protocol
3 changes: 3 additions & 0 deletions src/main/java/org/cloudburstmc/proxypass/ProxyPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.cloudburstmc.nbt.*;
import org.cloudburstmc.netty.channel.raknet.RakChannelFactory;
import org.cloudburstmc.netty.channel.raknet.config.RakChannelOption;
import org.cloudburstmc.netty.handler.codec.raknet.server.RakServerRateLimiter;
import org.cloudburstmc.protocol.bedrock.BedrockPeer;
import org.cloudburstmc.protocol.bedrock.BedrockPong;
import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec;
Expand Down Expand Up @@ -215,6 +216,7 @@ protected void initSession(ProxyServerSession session) {
.bind(this.proxyAddress)
.awaitUninterruptibly()
.channel();
this.server.pipeline().remove(RakServerRateLimiter.NAME);
log.info("Bedrock server started on {}", proxyAddress);

loop();
Expand All @@ -226,6 +228,7 @@ public void newClient(InetSocketAddress socketAddress, Consumer<ProxyClientSessi
.channelFactory(RakChannelFactory.client(NioDatagramChannel.class))
.option(RakChannelOption.RAK_PROTOCOL_VERSION, ProxyPass.CODEC.getRaknetProtocolVersion())
.option(RakChannelOption.RAK_COMPATIBILITY_MODE, true)
.option(RakChannelOption.RAK_MTU, 1492)
.handler(new BedrockChannelInitializer<ProxyClientSession>() {

@Override
Expand Down

0 comments on commit d842c08

Please sign in to comment.