How to check working proxy



  • Hello all,

    I need to create an application, which will take a list of proxies with socket.
    I need to check which is working and which is dead.

    I have tried to set proxy in web view control.

    @
    QNetworkProxy proxy;

        proxy.setHostName(myproxy);        
        proxy.setPort(myPort);
        QNetworkProxy::setApplicationProxy(proxy);
    
        QNetworkAccessManager* manager = new QNetworkAccessManager ();
    
        req.setUrl(QUrl(myUrl));
        manager->setProxy(proxy);
    
         ui->webView->page()->setNetworkAccessManager(manager);
          ui->webView->load(req);
    

    @

    But it didn't set the proxy of web view.(I tried opening some sites which tell your ip and proxy...but the shon my original ip and no proxy )

    I have also tried:

    @
    ui->webView->page()->networkAccessManager()->setProxy(proxy);
    ui->webView->setUrl(QUrl(myUrl));

    @

    but didn't make any difference.
    It always returns results even I have used a dead proxy.
    Am I missing some thing.

    Please help, any suggestion appreciated.

    Thanks
    Zain


Log in to reply
 

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