Move websocket implementation of connection into proxy