Cant get DNS over HTTPS to work, is this even possible? #5269
Replies: 1 comment 2 replies
|
There is not a CefSharp-specific DNS-over-HTTPS API that I can see. CefSharp can do two relevant things here: For the preference route, I would first check whether CEF says the preference is settable: using (var ctx = Cef.GetGlobalRequestContext())
{
var canSetMode = ctx.CanSetPreference("dns_over_https.mode");
var canSetTemplates = ctx.CanSetPreference("dns_over_https.templates");
string error;
var modeSet = ctx.SetPreference("dns_over_https.mode", "secure", out error);
// log canSetMode, modeSet, and error
}The timing matters. CefSharp's own comments point to For the command-line route, make sure the switches are added to So the practical answer is: CefSharp can pass the settings through, but if |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tried like this
IRequestContext ctx = Cef.GetGlobalRequestContext();
if (ctx == null) return;
string error;
Log(ctx.SetPreference("dns_over_https.mode", "secure", out error), "dns_over_https_mode", error);
Log(ctx.SetPreference("dns_over_https.templates", "https://dns.adguard-dns.com/dns-query", out error), "dns_over_https_templates", error);
//
like this :
settings.CefCommandLineArgs.Add("use-dns-over-https", "1");
settings.CefCommandLineArgs.Add("dns-over-https-mode", "secure");
settings.CefCommandLineArgs.Add("dns-over-https-templates", "https://dns.adguard-dns.com/dns-query");
enable features : "DnsOverHttps"
and like this :
settings.CefCommandLineArgs.Add("force-fieldtrial-params", "DoHTrial.Group1:Fallback/true/Templates/https%3A%2F%2Fdns.adguard-dns.com%2Fdns-query");
enable features : "DnsOverHttps<DoHTrial"
All reactions