Hello.
First you should call it on CEF UI thread if not already.
Second, - getting preferences may be not helpful, because there is not exists (they are in default state, i'm doesn't remember if they returned). Also you can use cefclient to play around preferences (look in tests menu, or tests -> others).
I'm setting proxy in next way:
using (var value = CefValue.Create())
using (var items = CefDictionaryValue.Create())
{
value.SetDictionary(items);
// Fixed-Servers proxy
items.SetString("mode", "fixed_servers");
items.SetString("server", <proxy_server_string_here>);
// No-Proxy mode
// items.SetString("mode", "direct");
string error;
if (!cefRequestContext.SetPreference("proxy", value, out error))
{
throw new InvalidOperationException($"SetPreference: {error}");
}
}
Again, try cefclient to get brief about preferences, and get different options for proxy.