Implement simple SOCKS5 server and use it for tests.