Dedicated server

How do I Approach this?

I want to create a game that acts a server/gameMasterApp for another game that would act as the client; the server game would send updates every 0.9 seconds to all connected clients, and the clients will send an update to the server game every 0.5 seconds(This will be a very low FPS game).

But I want to make the game free to play forever with zero monetization, so I always fall back into doing it with P2P but then the IP leakage concern arises.

¿How do I put something in the middle between my server game and my client game that, redirects the messages from the server to the client and viceversa?

It’s been a long time since I did something with P2P, but I think the server-game always has to be open and in focus, otherwise it can’t do anything, the events will not be executed if it is in the background.

What kind of game exactly?
In many cases there is no need for an extra server app.
Maybe a lobby can be created with firebase, the p2p IP can be shared with it and permanently save and load important data.

THNK also has something with servers, but I have no idea about it.
https://thnk.cloud/docs/why-thnk

I’ll run some actions as “game master” from the server as part of the game, and will only have the server live when I can, not 24/7; I also, want to keep the game free with no monetization so I also don’t want to spend on firebase.

I think I found a solution, but I just ndontbknow how to set an ICE thing.

So, to anyone searching for the same answers.
For testing you can just use the free URLs provided by google, and you can pay for a server on differnet services to get more stability.