[Interest] Odd Proxy Behavior

Jason Kretzer Jason at gocodigo.com
Wed Nov 30 05:06:35 CET 2016


Thanks Thiago.
===
Why this if? Why not always tell it to use the system configuration?
===

If there was a proxy detected should I not try to use it?  Or does the line below just automatically use whatever is set in "Internet Options"?
QNetworkProxyFactory::setUseSystemConfiguration(true);

Not changing anything else, I removed the if and just used the setUseSystemConfiguration(true) and had the same results.

===
Please try each of the following:
 1) both HTTP and HTTPS URLs
 2) turn off the Caching feature of the proxy and setApplicationProxy
 3) use QTcpSocket to open a connection to somewhere, on both ports 80 and 443
===

1) I tried both HTTP and HTTPS with the same results
2) I have no access to the proxy, unless this can somehow be turned off from code.
3) I have done this and both ports return false (see code below)
bool ServerCommunication::connectToPort(QString server, int port)
{
    QTcpSocket socket;
    socket.connectToHost(server,port);
    if(socket.waitForConnected(500)) {
        socket.close();
        return true;
    }
    socket.close();
    return false;
}

===
My guess: you forgot to deploy the OpenSSL libs.
===
First thing that I checked :)

-Jason

-----Original Message-----
From: Interest [mailto:interest-bounces+jason=gocodigo.com at qt-project.org] On Behalf Of Thiago Macieira
Sent: Tuesday, November 29, 2016 7:34 PM
To: interest at qt-project.org
Subject: Re: [Interest] Odd Proxy Behavior

On terça-feira, 29 de novembro de 2016 09:34:32 PST Jason Kretzer wrote:
>     if(listOfProxies.size() > 0) {
>         QNetworkProxy::setApplicationProxy(listOfProxies[0]);
>     } else {
>         QNetworkProxyFactory::setUseSystemConfiguration(true);
>     }

Why this if? Why not always tell it to use the system configuration?

> The device this runs on is on a client’s network and I have no access 
> to anything other than the device.  I have requested that the client 
> change the proxy hostname to the ip address or fqdn but I am not sure 
> whether that will help.

Please try each of the following:
 1) both HTTP and HTTPS URLs
 2) turn off the Caching feature of the proxy and setApplicationProxy
 3) use QTcpSocket to open a connection to somewhere, on both ports 80 and 443

My guess: you forgot to deploy the OpenSSL libs.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


More information about the Interest mailing list