SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.22k stars 8.11k forks source link

How to Add Socket5 Proxy in C# #5224

Closed laySpring closed 6 years ago

laySpring commented 6 years ago

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();
 }
barancev commented 6 years ago

Duplicate of #1802

laySpring commented 6 years ago

@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?

barancev commented 6 years ago

This feature is not implemented yet.

Vadimchers commented 6 years ago

Any news?

viseth commented 5 years ago

Any news Please Selenium community ?