Chrome socks proxy C#

658 views
Skip to first unread message

Олег Хитрень

unread,
Nov 7, 2019, 10:52:33 PM11/7/19
to Selenium Users
Hi!

I try both of this:
"ChromeOptions options = new ChromeOptions();
            var proxy = new Proxy();
            proxy.Kind = ProxyKind.Manual;
            proxy.IsAutoDetect = false;
            proxy.HttpProxy =
            proxy.SslProxy = 
            proxy.SocksProxy = "45.111.24.72:80";
            options.Proxy = proxy;
            options.AddArgument("ignore-certificate-errors");

            options.AddUserProfilePreference("profile.default_content_setting_values.images", 2);
            //options.AddArgument("--proxy-server=\"socks5://45.111.24.72:80\"");
            //options.AddArgument("--host-resolver-rules=\"MAP * ~NOTFOUND, EXCLUDE 45.111.24.72\"");

            driver = new ChromeDriver(rootPath + @"\chromedriver_win32", options);"

But it didn't work. The exception is the next: "OpenQA.Selenium.WebDriverException: "invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: cannot parse capability: proxy
from invalid argument: Specifying 'socksProxy' requires an integer for 'socksVersion'""

I can not found where I can set socks version. Can anybody help me?

Никита Цуркан

unread,
Dec 13, 2019, 10:26:30 AM12/13/19
to Selenium Users
problem solved ?

пятница, 8 ноября 2019 г., 5:52:33 UTC+2 пользователь Олег Хитрень написал:
Reply all
Reply to author
Forward
0 new messages