Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda