uProxy-p2p
uProxy-p2p copied to clipboard
cloud servers on DigitalOcean should use floating IP in invites, if available
I've been playing around with DigitalOcean's floating IPs: https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean
They basically give you a static IP that is independent of a droplet. Modulo hostnames, this will be crucial to the notion of stopping and starting droplets.
Right now the cloud installer uses this command to figure out the server's public IP:
dig +short myip.opendns.com @resolver1.opendns.com
That doesn't work for DigitalOcean floating IPs, however - instead we should use these commands (from the link above):
curl -s http://169.254.169.254/metadata/v1/floating_ip/ipv4/active
curl -s http://169.254.169.254/metadata/v1/floating_ip/ipv4/ip_address