This is impossible because that the response object for HTTP 'connect' event is just a raw SSL socket. There's no such things like res.writeHead(). And this is no way to create one from the SSL socket, at least using publicly documented APIs.