According to the thread, Socks5 proxy is not supported.
Is socks5 proxy supported in winlnet lib ?
Jidcoo
111
Reputation points
/**
* result format:
* HTTP://proxyserver:port
* HTTPS://proxyserver:port
* SOCKS=proxyserver:port
*/
const string Proxy::toString()
{
string NULL_FLAG("NULL");
if(this->getHostName().compare(NULL_FLAG)==0){
return "";
}
string str;
string port_str = to_string(port);
switch (getProtocol()){
case HTTP:
str = "HTTP://";
break;
case HTTPS:
str = "HTTPS://";
break;
case SOCKS4:
str = "SOCKS=";
break;
case SOCKS5:
// i don't know how to do in this case?
// may be not supported in winlnet ?
//str = "SOCKS5=";
break;
default:
str = "HTTP://";
break;
}
str += (hostName + ":");
str += port_str;
return str;
}
The return value of this function will be the second parameter (lpszproxy) in the InternetOpen function.
And this function works normally in HTTP, HTTPS and SOCKS4 protocols. But I don't know how to do in SOCKS5 protocol.
So, is SOCKS5 proxy supported in winlnet lib ?
If yes,how can i do in the SOCKS5 case
Windows development | Windows API - Win32
Answer accepted by question author
-
Xiaopo Yang - MSFT 12,736 Reputation points Microsoft External Staff
2021-09-28T05:28:39.13+00:00