Skip to content

Instantly share code, notes, and snippets.

@SaitoWu
Created September 24, 2013 08:32
Show Gist options
  • Save SaitoWu/6681931 to your computer and use it in GitHub Desktop.
Save SaitoWu/6681931 to your computer and use it in GitHub Desktop.
require 'socket'
DN = %w{us1 us2 us3 us4 us5 jp1 jp2 jp3 sg1 hk1 hk2 uk1}
DN.each do |prefix|
domain = "#{prefix}.vpncloud.me"
ip = IPSocket::getaddress domain
# address=/.dev/127.0.0.1 for dnsmasq
puts "address=/#{domain}/#{ip}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment