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

142
Visualizações
Each request has its own proxy

are there ready-made solutions for using a proxy? I'm currently using electron, so I don't care if it's a web library or a node library. It would be nice if you could log in through a proxy and also use a socks proxy.

Already tried(not working):

  • Fetch with proxy
  • axios with proxy
  • request with proxy

Below is my latest attempt. When using https, it gives the following error:

Client network socket disconnected before secure TLS connection was established

I looked for ways to fix this, but nothing helped. When using http, it returns my ip, not the proxy ip.

Excuse me for bad english and also bad technical background. Thanks in advance.

const HttpsProxyAgent = require("https-proxy-agent");
let axios = require("axios");

const httpsAgent = new HttpsProxyAgent({ host: "proxy", port: "port", secureProxy: true })

//use axios as you normally would, but specify httpsAgent in the config
axios = axios.create({ httpsAgent });

axios.get('https://api.ipify.org?format=json')
    .then(({ data }) => console.log(data))
    .catch(res => console.log(res))
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