I created a LocalHost server to play online with friends. Can I make my own IP there or do I have to disclose my IP? I would hate to do that.
With Peer2Peer connections you have to reveal the external IP of your router, otherwise they don't know where to connect. If this only runs through a central server, then not. I don't know what applies to you.
Localhost is only on your PC. This is your PC itself.
So if your friends live in your PC, they can. Probably not.
Is Google Broken Today?
Nonsense. Save me your primitiveness colleague!
The server runs on my computer. If my ip doesn't want to reveal xD then it will fall into the water for me…
Yes i know, but i can still play with you if i make my network public and share my ip with my friends. But I do not want that
Then you either / don't want to read correctly or don't understand what it says.
In any case, we should have been spared the answer.
Everything is there, it is clear what is to be achieved.
What are they supposed to make big?
A complex alternative would be to use a VPN to run the connections on another server
If you don't share any other ports, they shouldn't be able to do much, right?
But yes, I understand what you mean. Just like that you can't change that… You would have to buy a new address from your provider, over which you can then run it. Or you rent one from e.g. Nitrado if it is so important to you.
If you want to make your localhost server accessible externally (outside of your network), you would have to release your external IP, which is likely to change regularly (every 24-48 hours in the normal case) and also the respective port.
For security reasons, I would refrain from doing so and rent a vServer or GameServer. Depending on whether you get a server set up on Linux yourself or would prefer to have one set up.