extracting `hosts` for stricter non-address check

Hi, @jwerle, the string `localhost` is not enough even though in most common scenarios, we maybe need parsing the `/etc/hosts` file for a stricter check.