⬆️ ⬇️

Packet Compression and Open Source C # Client Protection

Hi, community.



My way in programming: ASP VB script >> VB.Net >> C #, with C and C ++, I am minimal.

Since a long time I write online RPG (about 9 years) and now I reached the stage of public online testing.



The client part is written in C # and is available for study (improvement) by everyone.

I do not have any paranoia (I hope ;-)) regarding hackers and lovers to break other people's servers - I perfectly understand that nobody cares about my sources, but I want packets sent only to a known, tested and approved client to be sent to the server .

Therefore, I want to implement protection in the form of a plug-in private native library that will send the hash code of the client being used to the server, plus it will also encrypt / decrypt / compress / unpack all packets. That is, if the client implements sending fictitious hash code without using the native DLL, then the attacker will also have to implement his version of packet processing.



I have a few questions:

1. Is this the correct method to protect the customer? Maybe there are some ready-made actual methods that implement such a task.

2. Whether it will be difficult to explore the native DLL to implement your handler, how high the threshold of entry for this is.

')

In the game, very massive batches are expected, therefore, as it seems to me, it is extremely important to minimize traffic in both directions. To serialize all objects, a “manual” method is used in byte code without redundancy (that is, there are only significant bytes in it) + I want to compress the numbers using the VLQ algorithm rosettacode.org/wiki/Variable-length_quantity + over ZIP compression.

Question:

3. Does it make sense to use VLQ, ZIP and bother with writing a native C DLL (I remind you that I am practically not familiar with this language) for processing packages, and whether this will give a tangible gain in productivity.



PS - how to transfer this message to questions?

Source: https://habr.com/ru/post/140721/



All Articles