weaveworks / weave

Simple, resilient multi-host containers networking and more.
https://www.weave.works
Apache License 2.0
6.62k stars 670 forks source link

connect to peers via 'best' path #846

Open inercia opened 9 years ago

inercia commented 9 years ago

In order to improve connectivity between peers, we could try to follow some of the mechanisms of ICE. So the router could:

Related issues: #646

inercia commented 9 years ago

One of the things we should do when gathering candidates would be to get our external IP. The easiest way is to resolve myip.opendns.com at the resolver1.opendns.com DNS server (you can check it with dig +short myip.opendns.com @resolver1.opendns.com). However, this would not work when several instances are behind the same gateway, or with a NAT/firewall... In that case, a public STUN server would be the only solution...