amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.08k stars 1.16k forks source link

How to develop a LAN-first sync strategy ? #1281

Closed thiago-silva-tech closed 2 years ago

thiago-silva-tech commented 2 years ago

I want to build a mobile dapp with GUN. The idea is a LAN-first sync strategy, so if the device is on a specific LAN environment, it would try to connect to peers on that local network. But if the device is not on that specific local network, the app would connect to peers discovered through a relay deployed on the internet. How would I develop this, two relays ? One on the internet and one on the local network ?