I'm facing an issue with enabling SOCKSv5 authentication in my webdriverio application. Unfortunately, the current configurations don't seem to be working.
Here are the configurations I've tried so far:
- Setting manually using firefox-profile:
fp.setProxy({ proxyType: 'manual', socksProxy: `127.0.0.1:1080`, socksUsername: 'myuser', socksPassword: 'mypass' });
This method didn't work as expected, as the pages aren't loading.
- Using FoxyProxy
Attempting to set the URL using its API:
proxy:host=${proxy}&port=1080&isSocks=true&enabled=true&username=myuser&password=mypass
This resulted in a warning indicating that something is accessing its configuration and declining the request.
Creating a custom Firefox profile and then loading it doesn't work either since I need to edit proxies during the runtime of the application.
- Updating selenium (3.3) and geckodriver (1.15) with the following configurations:
requiredCapabilities: { proxy:{ proxyType: 'manual', socksProxy: '127.0.0.1', socksProxyPort: 1080, socksVersion: 5, socksUsername: "mine", socksPassword: "mine" } }
or
desiredCapabilities: {
proxy:{
proxyType: 'manual',
socksProxy: '127.0.0.1',
socksProxyPort: 1080,
socksVersion: 5,
socksUsername: "mine",
socksPassword: "mine"
}
}
Unfortunately, neither of these methods worked. I also tried passing the proxy as a JSON.stringify(proxyObj) instead of the direct object.
Here's how I run the entire stack:
var options = {
desiredCapabilities: {
browserName: 'firefox',
proxy:{
proxyType: 'manual',
socksProxy: '127.0.0.1',
socksProxyPort: 1080,
socksVersion: 5,
socksUsername: "mine",
socksPassword: "mine"
}
}
};
var client = webdriverio.remote(options);
client
.init()
.url('http://whatsmyip.org/')
.end();
Has anyone found a solution for this issue?
log
D:\Users\Maxim\Desktop\test>java -jar -Dwebdriver.geckodriver.driver="D:\Users\Maxim\Desktop\test\geckodriver.exe --log debug" selenium-server-standalone-3.3.0.jar
...(Truncated for brevity)