Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

297
Visualizações
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 1.1.1.1, client is 2.2.2.2 and my proxy is 3.3.3.3

When the client (2.2.2.2) connects to my server (3.3.3.3), It redirects to the remote (1.1.1.1) but the remote gets the request from IP 3.3.3.3 and not 2.2.2.2, 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.write(proxy_client_data)
        })
        data.on('data', (client_proxy_data)=> {
            socket.write(client_proxy_data)
        })
    })

Thanks

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda