[Qtwebengine] Add way to override host resolution
manuel.peinado at gmail.com
Thu Feb 14 16:25:23 CET 2019
We have this app we’re working on at Plex that’s written in QML and makes
heavy use of WebEngineView. In order to implement our secure connections
we would need to hook into Chromium's DNS resolution. The goal is pretty
simple, basically detect if the host has a particular structure and resolve
it to a custom IP in case it does.
So assuming Qt had support for this, we would be doing something like the
QQuickWebEngineProfile* webEngineProfile = ...;
Where CustomHostResolver would implement an interface similar to the
class CustomHostResolver : public QtWebEngineHostResolver
void resolveHost(QWebEngineHostResolutionInfo& info) override
if (info.host == "special host name")
// If we don't modify "info" then the host gets resolved
// using the default, DNS based, path.
There is no support at the moment for any of this in QtWebEngine, so we
would have to add it ourselves. And here's the question: if we create a PR
that implements this, would it have any chance of getting reviewed and
ultimately accepted? Just want to make sure it stands a chance before we
spend a bunch of time working on it.
(I've studied the underlying code and think we would be able to implement
what we need without requiring any patches to Chromium, which should
improve the chances that the PR succeeds right?)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the QtWebEngine