add authentication; read hosts file before resolving; hack socket library