uProxy-p2p icon indicating copy to clipboard operation
uProxy-p2p copied to clipboard

cloud servers on DigitalOcean should use floating IP in invites, if available

Open trevj opened this issue 9 years ago • 0 comments

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

trevj avatar Jul 01 '16 15:07 trevj