Hello, I need advice, there is a program written in c # there is its source code, it is necessary that the program works in the same way but through a proxy. I need a method to specify the proxy through the program, and not through the browser itself, since the proxy will regularly change and load from the file, but I know how to do it, but I don’t know how to add this proxy installation function to the program.
Proxies come with authorization, so I found several solutions in Google, but I don’t know how to properly implement this code into the program.
I even found an example on stackoverflow .
There is also an example for Gecko firefox , but I have the usual one: My main code is:
using HtmlAgilityPack; using OpenQA.Selenium; using OpenQA.Selenium.Support.UI; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Net; using System.Threading; namespace RPost { public static class RotaPostWorker { public static WorkerAuthorizeAndRefsToTask _S1_Get_Task_Windows(InputInfo input, CurrentInfo current) { WorkerAuthorizeAndRefsToTask authorizeAndRefsToTask = new WorkerAuthorizeAndRefsToTask(); LogSystem.ShowLogMessage("Запускаем окно браузера"); IWebDriver rotapostBrowser = Settings.RotapostBrowser; try { string url1 = current.auth_info.Web; LogSystem.ShowLogMessage("Переходим на ссылку " + current.auth_info.Web); rotapostBrowser.Navigate().GoToUrl(url1); But I don’t quite understand where I have to embed a piece of code with stackoverflow. All the time different errors are issued, you may first need to include some other library. I really hope for your help.