Answer the question
In order to leave comments, you need to log in
How to create a local proxy from a proxy with authorization?
I have a proxy with authorization, I need to load proxies in selenium with headless mode, but I have them with authorization (I know a way to authorize proxies using an extension, but they cannot be used in headless mode)
I know the answer to my question, but only on node.js
const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');
(async() => {
const oldProxyUrl = 'http://bob:[email protected]:8000';
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl); // http://127.0.0.1:45678
const browser = await puppeteer.launch({
args: [`--proxy-server=${newProxyUrl}`],
});
})();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question