CefSharp 3 set proxy at Runtime

后端 未结 4 1441
执念已碎
执念已碎 2020-12-10 17:09

I downloaded CEF (chromuim embedded framework) binary distributation that comes with (cefclient & cefsimple) c++ examples, And Realized that cefclient can change proxy s

4条回答
  •  -上瘾入骨i
    2020-12-10 17:56

    if anyone need any other soulition i found this solution.

    Cef.UIThreadTaskFactory.StartNew(delegate
            {
                string ip = "ip or adress";
                string port = "port";
                var rc = this.browser.GetBrowser().GetHost().RequestContext;
                var dict = new Dictionary();
                dict.Add("mode", "fixed_servers");
                dict.Add("server", "" + ip + ":" + port + "");
                string error;
                bool success = rc.SetPreference("proxy", dict, out error);
    
            });
    

提交回复
热议问题