Sudo gets the IP addresses from the list of active network interfaces on the machine. It current skips localhost, though it would be easy to just preload 127.0.0.1 and localhost. - todd