Hyperprotocol: How to connect only to selected peers

77 Views Asked by At

I'm trying to sync a hyperdrive only to peers within the same LAN, even if the LAN is connected to the internet, and other peers with the same hyperdrive exist in other locations on the internet. This should be with the option of syncing across the internet at a later stage. I'm not sure how to approach this.

There is an option to attach a callback to hyperswarms called validatePeer which is called on connection events, and optionally reject them. But I don't see a way to access hyperswarms through hyperspace instances.

What's the standard way to go about this?

0

There are 0 best solutions below