Selenium: How to Add Socket5 Proxy in C#

Created on 15 Dec 2017  路  5Comments  路  Source: SeleniumHQ/selenium

Meta -

OS: Windows 7

Selenium Version: Selenium.WebDriverBackedSelenium 3.8.0.0

Browser: FireFox

Browser Version: FireFox 57.0

Expected Behavior -

I have some socks5 proxies,I want to use it in my APP ,it developing by C#.

Actual Behavior -

When i used "prox.HttpProxy",browser told me that you need input proxy account and password;
When i used "prox.SocksProxy"+"prox.SocksUserName"+"prox.SocksPassword",VS alert a error: account:password@104...19:6* is not of the form host[:port]

Is it the problem of my code or does the browser don't support or the current version doesn't support it? I became depressed!!!!

Steps to reproduce -

    private void btnTestS5Proxy_Click(object sender, EventArgs e){
        Proxy prox = new Proxy();
        prox.SocksProxy = "104.***.***.19:6***";
        //prox.HttpProxy = "104.***.***.19:6***";
        prox.SocksUserName = "3*******";
        prox.SocksPassword = "******t";
        FirefoxOptions ffp = new FirefoxOptions();
        ffp.Proxy = prox;
        IWebDriver driver = new FirefoxDriver(ffp);// Interception Error 
        Actions action = new Actions(driver);
        string baseURL = "http://www.ip.com/";
        driver.Navigate().GoToUrl(baseURL);
        string strHtml = driver.PageSource;
        driver.Quit();
 }

All 5 comments

Duplicate of #1802

@barancev You shut down my issues and tell me to look at#1802,But it cannot solve the problem.Is there anything else that can be referred to?

This feature is not implemented yet.

Any news?

Any news Please Selenium community ?

Was this page helpful?
0 / 5 - 0 ratings