Open NiotGG opened 1 year ago
you could use this:
String proxyUrl = "https://" + proxyUsername + ":" + proxyPassword + "@" + proxyAddress + ":" + proxyPort;
ChromeOptions chrome_options = new ChromeOptions();
chrome_options.addArguments("--proxy-server="+ proxyUrl);
ChromeDriver chromeDriver = new ChromeDriverBuilder()
.build(chrome_options,driver_home);
I did as you said, but I still have the same problem, something interesting is that if I remove the password and username from the proxy it works, but it requests the username and password within the browser
you could use this:
String proxyUrl = "https://" + proxyUsername + ":" + proxyPassword + "@" + proxyAddress + ":" + proxyPort; ChromeOptions chrome_options = new ChromeOptions(); chrome_options.addArguments("--proxy-server="+ proxyUrl); ChromeDriver chromeDriver = new ChromeDriverBuilder() .build(chrome_options,driver_home);
Oh, if you use proxy has username and password, this will not work because proxy in chrome will use some js script to use it (I think), and this ChromeDriver is open a chrome process and give control to the program, so it will not generate this script.
To make it work, you could set proxy on your OS.
I am trying use proxy with auth
`String proxyAddress = "brd.superproxy.io"; int proxyPort = 22225; String proxyUsername = "PROXY_USER"; String proxyPassword = "PROXY_PASS";
But the ip simply remains the same