Finished socks4 server code