Erlang socks5 implementation from R10B