Use getaddrinfo and parse /etc/hosts on linux

TODO: for windows, look at \WINDOWS\system32\drivers\etc\hosts