SeleniumProxyAuthentication.Firefox 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SeleniumProxyAuthentication.Firefox --version 1.0.0                
NuGet\Install-Package SeleniumProxyAuthentication.Firefox -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SeleniumProxyAuthentication.Firefox" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SeleniumProxyAuthentication.Firefox --version 1.0.0                
#r "nuget: SeleniumProxyAuthentication.Firefox, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SeleniumProxyAuthentication.Firefox as a Cake Addin
#addin nuget:?package=SeleniumProxyAuthentication.Firefox&version=1.0.0

// Install SeleniumProxyAuthentication.Firefox as a Cake Tool
#tool nuget:?package=SeleniumProxyAuthentication.Firefox&version=1.0.0                

Selenium Proxy Authentication For Firefox

Easily add your auth proxies to your Firefox (Gecko) Driver with one line of code With Extension

Installation

You Can Simply Add this Library to your project with Nuget Package: <a href="https://www.nuget.org/packages/SeleniumProxyAuthentication.Firefox/"> <img src="https://www.nuget.org/Content/gallery/img/logo-header.svg" width="80" height="25"/> </a>

Install-Package SeleniumProxyAuthentication.Firefox -Version 1.0.0

! You need to download the "Nightly" or "Developer Edition" of firefox to use this library because in the original browser extensions should be verified before installing since version 43

How to Use it

  • First you need to download the gecko driver from here (make sure that the version of your firefox browser should be match with the version of gecko driver that you download!)
https://github.com/mozilla/geckodriver/releases
  • Then put the geckodriver.exe in your project bin directory

  • Create a new Instance of FirefoxOptions and define the FirefoxProfile (if path of profile not set it will generate the profile randomly)

private static readonly FirefoxOptions FirefoxOptions = new() {Profile = new FirefoxProfile()};
  • Pass the FirefoxOptions Instance to a new Instance of FirefoxDriver
IWebDriver driver = new FirefoxDriver(FirefoxOptions);
  • Attach your proxy to the instance of firefox driver using extension method "AddProxyAuthenticationExtension"
driver.AddProxyAuthenticationExtension(new SeleniumProxyAuthentication.Proxy(
                    ProxyProtocols.HTTP,
                    "host:port:username:password"
                    ));

driver.Navigate().GoToUrl(new Uri("https://github.com/"));
Thread.Sleep(5000);
driver.Quit();
  • Remove Entire Cache That Created By Extensions using this method
driver.DeleteExtensionsCache();
  • also see the sample project to see how it's work <a href="https://github.com/mahdibland/Selenium-Proxy-Authentication.Firefox/blob/74036ffc56d4d05a65355e805cb0dc55243e3a5c/SeleniumProxyAuthentication.Sample/Program.cs">Link to sample project</a>

Guides

Proxy Format
  • Support all kind of proxy types (i tested http/s, socks5)
  • Host:Port:Username:Password
  • Host:Port

Contact

Email: mahdi.blandsoft98.ir@gmail.com<br/> Telegram: https://t.me/ONll_CH4N<br />

Licence

License

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 995 4/8/2022
1.0.1 438 4/8/2022
1.0.0 466 4/7/2022