Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,685 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
/**
* 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
According to the thread, Socks5 proxy is not supported.