javascript – Forward Client IP in Node.JS (net) proxy

I’d like to forward the client IP on my proxy to the remote host, so the remote host receives the client’s IP, and not my server’s IP.

I understand it’s not really a proxy at that point, but that’s not really what I’m aiming for.

Let’s say the remote is, client is and my proxy is

When the client ( connects to my server (, It redirects to the remote ( but the remote gets the request from IP and not, is there a way to “Forward the IP” so the remote doesn’t recognize it’s been through another server?
Here is how I’m forwarding connections right now where destip is equal to the remote server, destport is the remote port, data is equal to the client > proxy socket, and socket is equal to the proxy > client socket

   socket.connect(parseInt(destport), destip, function () {
        socket.on('data', (proxy_client_data) => {
        data.on('data', (client_proxy_data)=> {


Read more here: Source link