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):
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))