I am trying to add a proxy, I need to do this multiple times during the application. I use the below code to assign the setting at the start.
CefSettings cfsettings = new CefSettings();
cfsettings.CefCommandLineArgs.Add("proxy-server", proxy.Key + ":" + proxy.Value);
cfsettings.UserAgent = "My/Custom/User-Agent-AndStuff";
Cef.Initialize(cfsettings);
As you can see I initialize the browser, that works fine for the first ever time, but what if I want to change the proxy in the middle of the application?
I tried running that code again to sort of try and "reinitiailize" the settings to change the proxy server but I received the following error when trying to do so:
System.Exception: 'Cef can only be initialized once. Use Cef.IsInitialized to guard against this exception.'
Using WinForms.