Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QNetworkProxy: No use of proxy for specified Adresses?
outdoor_guy last edited by
I have to set a QNetworkProxy to get connection to the Internet from my system. However, I also have a UPnP-server on my local system, which gives me Pictures via http-Protocol. Unfortunatly, it does not use 127.0.0.1 as adress, but the real IP-adress of my local PC(let's say the adress of that PC is 192.168.0.8)
There is no way to change this server, because I do not have the source code.
Is there a way to tell QNetworkProxy to ignore the proxy for a specific adress? (Like the setting in Firefox, where you can define "No proxy for")
My current code is
@ QString urlEnv = QProcessEnvironment::systemEnvironment().value("http_proxy");
QUrl url = QUrl(urlEnv, QUrl::TolerantMode);
I'm searching for something like
I have to say I'm not at all an expert in network communication, I touched this only because othwise I had no change that my program is connected to the outside world
rcari last edited by
The API does not seem to have such an option. If you are using QTcpSocket directly, you can use @socket->setProxy(QNetworkProxy::NoProxy);@ before connecting. If you use QNetworkAccessManager, I can't think of a proper solution.