Refactor socks package add support for socks4/4a 

Related to #2563