Set up proxy at runtime with authentication

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Set up proxy at runtime with authentication

Postby DiArkis » Fri Feb 16, 2018 12:31 pm

I have this configuration for the browser as it was said, but I am getting a blank page in every request:

_browser = new ChromiumWebBrowser(url, browserSettings, requestContext);
if (proxyInf != null && proxyInf.url != null)
isProxy = true;
_browser.RequestHandler = new RequestHandler(userAgent, url, isProxy, proxyInf);

Cef.UIThreadTaskFactory.StartNew(delegate
{

var rc = _browser.GetBrowser().GetHost().RequestContext;
var dict = new Dictionary<string, object>();
dict.Add("mode", "fixed_servers");
dict.Add("server", proxyInf.url);
string error;
bool success = rc.SetPreference("proxy", dict, out error);

});
if I go through a proxy, this proxy needs authentication and I notice I never get into the method of the credential.
IRequestHandler.GetAuthCredentials(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback)
Any ideas?
DiArkis
Newbie
 
Posts: 1
Joined: Fri Feb 16, 2018 12:27 pm

Re: Set up proxy at runtime with authentication

Postby Czarek » Mon Feb 19, 2018 8:28 am

It seems that you're using external bindings not maintained by CEF. This forum is for C/C++ support.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 72 guests