How to implant peer to peer in game without dedicated servers?

I think you won’t be able to do this without an extra component that does the match making, eg. some “master server” for matchmaking.

You can’t scan the whole internet for people who are online in your game. Without a centralized server clients can’t find each other and can’t host/join. Basically clients tell the master server they are looking to play, the master server (knowing who else is looking to play) finds matches and tells one client to host and the other clients who they should join.

I don’t have enough experience with the steam subsystem, so I don’t know if it’s capable of doing that. You’d best be advised to use a host / join system anyways imho, as most peer to peer systems I know in games have very bad matchmacking results (bad hosts result in lags, connection problems, etc.)