I stumbled over this Question on my search for socks5 proxy solution.
When I used the implementation from the JsonWireProtocol documentation using the socksProxy
property, I always got the following error:
message: 'unknown error: cannot parse capability: proxy from unknown error:
proxyType is \'manual\' but no manual proxy capabilities were found
Using a socks5 proxy configured via a proxy.pac file - proxyType: 'pac'
using proxyAutoconfigUrl
was working without any problem. But this wasn't suitable for my use case.
After some fiddling around, I finally found two solutions to that problem:
- Using CLI args for chromedriver
desiredCapabilities: {
browserName: 'chrome',
/* … */
chromeOptions: {
args: [
'--proxy-server=socks5://proxy_url:proxy_port'
]
}
}
*edit: looks like this has been removed
2. Using sslProxy property
Since socks proxy is in theory nothing more than a ssl tunnel I thought I could give that property another try. The solution that made it finally working looked like this:
desiredCapabilities: {
browserName: 'chrome',
/* … */
proxy: {
proxyType: 'manual',
sslProxy: 'socks5://proxy_url:proxy_port'
}
}
Hope that answer help anyone looking for help regarding socks5 proxy. :)
But more important would be that chromedriver will implement the JsonWireProtocol properly in the future.
"httpProxy": "your_login:your_password@your_proxy:8080"
– Mitis