Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.15.7, 6.4.3, 6.6.1
-
None
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.