Skip to content

Commit

Permalink
Add logging of early injected packets
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle committed May 7, 2024
1 parent 8ec0127 commit 46d566e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public PacketSignal handle(NetworkSettingsPacket packet) {
}

this.session.sendPacketImmediately(this.loginPacket);
this.player.logger.logPacket(this.session, this.loginPacket, true);
return PacketSignal.HANDLED;
}

Expand All @@ -60,6 +61,7 @@ public PacketSignal handle(ServerToClientHandshakePacket packet) {

ClientToServerHandshakePacket clientToServerHandshake = new ClientToServerHandshakePacket();
session.sendPacketImmediately(clientToServerHandshake);
this.player.logger.logPacket(this.session, clientToServerHandshake, true);


this.session.setPacketHandler(new DownstreamPacketHandler(this.session, this.player, this.proxy));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ private void initializeOfflineProxySession() {
RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
downstream.sendPacketImmediately(packet);
this.player.logger.logPacket(this.session, packet, true);

//SkinUtils.saveSkin(proxySession, this.skinData);
});
Expand Down Expand Up @@ -218,6 +219,7 @@ private void initializeOnlineProxySession() {
RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
downstream.sendPacketImmediately(packet);
this.player.logger.logPacket(this.session, packet, true);

//SkinUtils.saveSkin(proxySession, this.skinData);
});
Expand Down

0 comments on commit 46d566e

Please sign in to comment.