adapting proxy and sockets