SocksServer refactored