QNetworkProxy and QWbView - doesn't load pages



  • Hello. I'm trying to use QNetworkProxy with QWebView in two different ways (below), but after proxy is set pages not loads... Proxy servers I took from http://proxylist.hidemyass.com/

    First way:
    @
    QNetworkProxy proxy;
    proxy.setType(QNetworkProxy::HttpProxy);
    proxy.setHostName("114.255.183.163");
    proxy.setPort(8080);
    QNetworkProxy::setApplicationProxy(proxy);
    ui->webView->load(QUrl("http://2ip.ru/"));@
    Second way:
    @
    QNetworkProxy proxy;
    proxy.setType(QNetworkProxy::HttpProxy);
    proxy.setHostName("178.249.14.12");
    proxy.setPort(80);
    ui->webView->page()->networkAccessManager()->setProxy(proxy);
    ui->webView->load(QUrl("http://2ip.ru/"));@
    What is going on and how can I solve it?

    P.S. Sometimes it loads but veryyyyyy slow. I tried very many serves. I need to change proxy dynamically but seems that it don't wanna work even when preset in constructor.



  • Are you sure the free proxy servers you have found from a web site called http://proxylist.hidemyass.com/ are working properly?

    There was an article about free proxies on HN recently: https://blog.haschek.at/post/fd9bc You may find it interesting.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.