HTTPDNS in PC client web frameworks

更新时间:
复制 MD 格式

Problem

Can HTTPDNS be used for H5 pages embedded in PC clients using web frameworks?

Solution

PC client (Windows/macOS) applications that use H5 pages typically integrate a web framework. In this case, we recommend using DNS over HTTPS (DoH) to connect to HTTPDNS. To enable DoH, see Configure DoH.

The following examples show how to configure DoH for three common web frameworks:

Electron

Electron provides the app.configureHostResolver(options) API to configure DoH. For more information, see the official documentation. After opening the documentation, search for "DNS over HTTPS" to find the relevant section.

Qt

Qt provides the QWebEngineGlobalSettings::setDnsMode API to configure DoH. For more information, see the official documentation.

CEF

See Connect to DoH in the CEF framework.

Applies to

  • HTTPDNS