Hardcoded localhost to resolve to 127.0.0.1.
Modifed socks 4a protocol to wait for address to resolve.