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

QNetworkProxy::setUser,setPassword support QByteArray

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.15.7, 6.4.3, 6.6.1
    • Network: Proxies
    • None
    • Linux/X11, macOS, Windows

    Description

      If I am using Socks5 proxy,The server information is

      hostname: as.proxy.com
      port: 1000
      username: FR_state-ÎLEDEFRANCE
      pwd: 123456

      You may notice special characters in username, "Î"

      So when I use the following code

              QNetworkProxy proxySet;
              proxySet.setType(QNetworkProxy::Socks5Proxy);
              proxySet.setHostName("as.proxy.com");
              proxySet.setPort(1000);
              proxySet.setUser("FR_state-ÎLEDEFRANCE");
              proxySet.setPassword("123456"); 

      Connection will fail.

      Wireshark capture image in the attachment.

      The problem lies in the handling of special characters.

      Use curl -x socks5://FR_state-ÎLEDEFRANCE:123456@as.proxycn.com:1000 http://google.com

      The network proxy is running good.

      Curl processes characters as 0xc3 0x8e, but in Qt is 0xce.

       

      Hope to add something similar  QNetWorkProxy::setUser(const QByteArray &userName); To solve such problems,include setPassword.

       

      Attachments

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

        Activity

          People

            manordheim Mårten Nordheim
            raguo Liu X
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes