Is socks5 proxy supported in winlnet lib ?

Jidcoo 91 Reputation points
 * result format:
 * HTTP://proxyserver:port
 * HTTPS://proxyserver:port
 * SOCKS=proxyserver:port
const string Proxy::toString()
    string NULL_FLAG("NULL");
        return "";
    string str;
    string port_str = to_string(port);
    switch (getProtocol()){
    case HTTP:
        str = "HTTP://";
    case HTTPS:
        str = "HTTPS://";
    case SOCKS4:
        str = "SOCKS=";
    case SOCKS5:
        // i don't know how to do in this case?
        // may be not supported in winlnet ?
        //str = "SOCKS5=";
        str = "HTTP://";
    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 API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,073 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 7,106 Reputation points Microsoft Vendor

    According to the thread, Socks5 proxy is not supported.

0 additional answers

Sort by: Most helpful