by viraptor · 3y ago · 0 comments
Usually you'd divide what you're talking about into two different steps. Peer discovery, and peer transport.
Discovery is how you find other peers, sometimes its via DHT, sometimes it's hard-coded, other times just random walk. But just like in WebRTC, (and in TCP), you need to get the address from somewhere out of band, so you can connect, usually something like a centralized directory. But the transport of data, is P2P, just like TCP. So once you've found the peer and connected to it, all data goes directly between you.
Doesn't make it less/more P2P than any other P2P system out there.
I have a chapter on signaling here https://webrtcforthecurious.com/docs/02-signaling/
I have an example of WebRTC without signaling https://github.com/pion/offline-browser-communication. Each side has to agree on things ahead of time. Useful for security cameras/IoT/LAN stuff though!
`localhost` is allowed. Could you reverse port forward the service to localhost? That will get around those restrictions.
That discovery mechanism can be a decentralized network where any contact is an entrypoint. You connect to the network ~once and from that point onward everything is p2p and no fixed servers are involved or in control.