arrow_back How do I protect the data sent from the backend to the frontend of the online game browser?

1 vote
In many online games, there is a game crash.

Can you please tell me how data is transmitted in vue js. If it's sent over a web socket, how to protect it. After all, the data in the web socket are transmitted in clear form, so any user can see the number to which the graph will grow.
Maybe I don't understand something...
I would be grateful for your help.


1. encryption
2. https (ssl)
Dmitry Dobryshin Who and when has "use of a secure protocol" ever prevented a web developer's tools from being used in a browser?
With encryption the same problem, only a little more complicated implementation - to decrypt, you need a key on the client. No one prevents you from taking it and looking it up in the client's code.
FanatPHP So I thought. If the data needs to be protected, it should be encrypted or use an encryption-protected protocol. But if the data is not as important as the process, then transmit only the current state, and decide on the finish on the transmitting side.

What am I wrong about?
Dmitry Dobryshin But what if you think about it? With your head, I mean
Send me an example, not everyone sits on casino sites
Alexander , there is no ready-made code.
From php to vue, a random number is passed to the vue, which is used to build this graph,
If you pass it through a web socket, then it is trivial, through the network tab to see it. and output it before the crash occurs.
The mechanism of the game itself:
1. a bet is made within 20 seconds.
2. And the graph begins to grow, the user at any time can click on the button to take the winnings.
And if he knows that the graph grows to 10 by looking at the websocket logs, there will be no fair play

1 Answer

Best answer
0 votes
No way.
No one tells you in advance "the number up to which the graph will grow".
The data for the graph is transmitted as it grows