Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64834

QAbstractSocket does not use application socket if its set to NoProxy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.9.1
    • Fix Version/s: 5.9.3
    • Component/s: Network: Proxies
    • Labels:
      None
    • Environment:
      Linux Mint 18.2
      Qt 5.9.1
    • Commits:
      d0c5e294323c69ef16c44466c3cff8decf4face5

      Description

      Hello,

      I wanted to connect to a server in a network with a proxy. The server is not behind the proxy so I used `QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy)` to force not using any proxy. But when I try to connect I get following error:
      QAbstractSocket::UnsupportedSocketOperationError "The proxy type is invalid for this operation"

      If I call `QAbstractSocket::setProxy(QNetworkProxy::NoProxy)` or `QAbstractSocket::setProxy(QNetworkProxy::applicationProxy)` I can connect and don't get any error. I expected that setting the application wide proxy would cause the `QAbstractSocket` to setted proxy (in my case no proxy).

      PS: I am using an extern component so I cannot call `QAbstractSocket::setProxy`. For testing I used a QTcpSocket to get the full error message.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                tpochep Timur Pocheptsov
                Reporter:
                Psy-Kai Kai Dohmen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes