Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to check working proxy
Qt 6.11 is out! See what's new in the release blog

How to check working proxy

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 3.2k Views 1 Watching
  • 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.
  • Z Offline
    Z Offline
    Zain
    wrote on last edited by
    #1

    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

    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