Packet logging mod

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
While playing direwold20 against a server the game became unplayable after EIO spawned in a skeleton with Thaumcraft mods on it (It was a Mighty Skeleton) or some such. The two players on the server at the time were repeatedly disconnected by the server with a message about timing out.
We managed to turn off the EIO spawner and kill the skeletons, and when the Mighty Skeleton was dead normal service was resumed.

The thought struck me that it could be really handy to know how many bytes per second the server and clients are trying to send and receive, and if this gets large, try to characterize the traffic and assign it to mods.

Last time I looked, Opis did not track this kind of thing with any resolution, and it certainly does not have an option to simply capture and dump packets to disk. Does such a tool/mod exist?
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
Profiling traffic could be interesting, but you have to consider just how much traffic there is. Literally everything is a packet, including turning your head, or even just standing still (forced position updates are sent on regular intervals).

Here's an example of where I was debugging network code in my 1.8 API. If you look at the timestamp, that's a one second log, standing still.

Sure, it could be filtered, but you'd need to know what you're looking for. And in a case like you described, that might prove difficult.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
So, I pulled out my c++, and have made a minecraft proxy so I can analyse the packets external to minecraft. So far, I can verify that there are many packets per second :)
They don't look infeasibly large or difficult to classify. I am going to need to figure out zlib to peek inside however.
 

immibis

New Member
Jul 29, 2019
884
0
0
So, I pulled out my c++, and have made a minecraft proxy so I can analyse the packets external to minecraft. So far, I can verify that there are many packets per second :)
They don't look infeasibly large or difficult to classify. I am going to need to figure out zlib to peek inside however.
You'll need some kind of crypto library, and you'll need a way to trick Minecraft into letting you "attack" the connection (possibly with a mod).
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
You'll need some kind of crypto library, and you'll need a way to trick Minecraft into letting you "attack" the connection (possibly with a mod).

The packets are encrypted as well as compressed?

I don't need to attack the connection :- simply create an additional entry under Servers that points to localhost. This much I have working. I am tracking bytes sent and received, can parse enough of the pre-compression headers to know the packet id's and sizes. I'm just currently trying to unpack the initial comms and figure out why there is over 8kB of data exchanged s2c for the simple ping - probably forge appending a list of mods and versions.
 

immibis

New Member
Jul 29, 2019
884
0
0
The packets are encrypted as well as compressed?

I don't need to attack the connection :- simply create an additional entry under Servers that points to localhost. This much I have working. I am tracking bytes sent and received, can parse enough of the pre-compression headers to know the packet id's and sizes. I'm just currently trying to unpack the initial comms and figure out why there is over 8kB of data exchanged s2c for the simple ping - probably forge appending a list of mods and versions.
The packets are encrypted and not compressed, AFAIK.

If you're only looking at server pings, then I don't think those are encrypted. A normal connection definitely is.