我已按照此处的文档https://dotnetbrowser.support.teamdev.com/support/solutions/articles/9000110853-configuring-proxy使用TeamDev使用DotNetBrowser配置代理,并且根本没有检测到我的代理。
string mainPage = "https://www.example.com";
String proxyRules = "http=127.0.0.1:8085;https=127.0.0.1:8085;ftp=127.0.0.1:8085;socks=127.0.0.1:8085";
String exceptions = "<local>";
String dataDir = Path.GetFullPath("chromium-data");
BrowserContextParams contextParams = new BrowserContextParams(dataDir);
contextParams.ProxyConfig = new CustomProxyConfig(proxyRules, exceptions);
using (Browser browser = BrowserFactory.Create(new BrowserContext(contextParams)))
{
ManualResetEvent waitEvent = new ManualResetEvent(false);
browser.FinishLoadingFrameEvent += delegate (object sender, FinishLoadingEventArgs e)
{
// Wait until main document of the web page is loaded completely.
if (e.IsMainFrame)
{
...
waitEvent.Set();
}
};
browser.LoadURL(mainPage);
waitEvent.WaitOne();
return true;
}