Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngineView ignores QNetworkProxy with auth (Qt 6.8.1)
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView ignores QNetworkProxy with auth (Qt 6.8.1)

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 205 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SilveRulezz
    wrote on last edited by
    #1

    Hi, community 👋

    I have an issue with paid proxy (with auth) and QWebEngineView.

    I set up proxy by QNetworkProxy like

    QNetworkProxy proxy;
    proxy.setType(QNetworkProxy::HttpProxy);
    proxy.setHostName("152.217.59.93");
    proxy.setPort(5889);
    proxy.setUser("proxy_username");
    proxy.setPassword("proxy_password");
    QNetworkProxy::setApplicationProxy(proxy);
    

    To check the proxy I send requests to https://freeipapi.com/api/json/

    When I send HTTP GET request with QNetworkAccessManager then everything is fine and I get the proxy IP. So the proxy is correctly setup by QNetworkProxy::setApplicationProxy and working.

    But when I open https://freeipapi.com/api/json/ with QWebEngineView then I get my IP and not the proxy IP. So something went wrong.

    I have read https://doc.qt.io/qt-6/qtwebengine-overview.html#proxy-support
    and I have connect to QWebEnginePage signal

    proxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator, const QString &proxyHost)
    

    where I just set QAuthenticator settings to my proxy vars.

    authenticator.setUser("proxy_username");
    authenticator.setPassword("proxy_password");
    

    but this signal is never emitted.

    Aslo I have tried to create new QWebEnginePage after QNetworkProxy::setApplicationProxy.
    I thought maybe the page would pull up the proxy settings when initializing. But this also not working.

    Has anyone encountered this? How to solve this issue?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved