0

All major browsers are rolling out support for DNS Over HTTPS (DoH). Firefox recently announced that it is now enabled by default. Chrome has support for a few months now. The Microsoft Edge browser (that now uses Chromium) also has support for it through the flags system.

It is natural to think that CEF (and therefore CEFSharp) will also have some kind of support for it too, since they share basically the same engine. However, this does not seem to be the case.

I am trying to enable this for some days now, without any luck. A quick search on the web yields no useful results - the most relevant being this one.

What I've tried:

settings.CefCommandLineArgs.Add("dns-over-https");

I also tried to enable this directly (the old Chrome way):

settings.CefCommandLineArgs.Add("force-fieldtrials", "DoHTrial/Group1");
settings.CefCommandLineArgs.Add("force-fieldtrial-params", "DoHTrial.Group1:server/https://1.1.1.1/dns-query/method/POST");

I'm using this page to test, and it always returns "NO" on every section. In Google Chrome, this works.

I'm also using the 1.1.1.1 DNS and the latest version of CEF Sharp available in NuGet (79.1.36).

So, is there a way to enable DoH in CEF Sharp?

Guilherme
  • 5,143
  • 5
  • 39
  • 60
  • Best place to ask is https://magpcss.org/ceforum/index.php CEF's network service implementation may need to explicitly add support for the feature (I'm only speculating on this) – amaitland Feb 26 '20 at 23:59
  • A very very quick search and I cannot find any reference to the command line arg you've used. It's more likely that it's a preference. Have a read of https://github.com/cefsharp/CefSharp/wiki/General-Usage#request-context-browser-isolation – amaitland Feb 27 '20 at 00:24
  • https://bugs.chromium.org/p/chromium/issues/detail?id=799753#c8 has an example set of command line args, they maybe outdated, suggests you need to explicitly enable the feature. – amaitland Feb 27 '20 at 01:59
  • @amaitland thanks for the light on this, nothing better than receiving an insight from the maintainer of the lib himself. About the command lines I've tested, yes, I tried it out of pure guess, simply because I do not know where to begin =( . As you can see, I tried to emulate the commands you linked in your last comment, using `CefCommandLineArgs.Add()`. I actually tried some modifications of this, without any luck. Anyways, I guess it is up to the CEF team to implement this feature before we can use, correct? – Guilherme Feb 27 '20 at 02:25
  • @amaitland I tryied setting through `requestContext.SetPreference("dns-over-https", true, out string error).` but this also does not work. – Guilherme Feb 27 '20 at 20:45
  • I think it's likely that `CEF` needs to add support. I'd still suggest posting on https://magpcss.org/ceforum/index.php asking if it's possible to enable dns of https, include a link to this post for reference. – amaitland Feb 28 '20 at 00:48
  • For me with latest Chrome, Version 80.0.3987.122 (Official Build) (64-bit), it is also a NO with your test page. – Cristian Amarie Feb 28 '20 at 21:43
  • @CristianAmarie Yes, you should enable it in Chrome. Go to chrome://flags/#dns-over-https , enable it, set your DNS to 1.1.1.1, restart everything and try again. – Guilherme Feb 28 '20 at 22:32
  • Asked at https://magpcss.org/ceforum/viewtopic.php?f=6&t=17415 – amaitland Mar 01 '20 at 23:47
  • @Guilherme Like I said, there is no such flag in 80.0.3987.122. – Cristian Amarie Mar 03 '20 at 11:48

0 Answers0