Skip to content

Peer to peer ip discovery

Christopher Schinnerl requested to merge peer-to-peer-ip-discovery into master

Created by: ChrisSchinnerl

So far the only centralized aspect of Sia has been the way a node discovers its public ip address if upnp isn't available. Our workaround was to use myexternalip.com as a fallback but recently they started banning certain ranges of ips and are therefore not reliable. This PR adds a second fallback (that will hopefully replace myexternalip.com completely one day) by using the peers the node is connected to. Once a certain number of peers is available, we query each one of them and if the majority of responses report the same ip, we accept it as our own public ip.

Merge request reports