GlobalProtect with Windows10 system proxy

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

GlobalProtect with Windows10 system proxy

L0 Member

Hi!

I'm using GlobalProtect 5.2.5-66 in Windows10. And I use custom https proxy server with own root certificate also. I add this certificate to Windows certificates store and everething works ok.

I can use GlobalProtect with this proxy but only in the case when I configure system proxy via Window "Proxy Settings" menu.

 

In the case when I try to configure system proxy by my custom application GlobalProtect can't connect vie my proxy.

For proxy configuration I use function like this:

 

 

BOOL EnableProxy(LPCSTR addr, UINT port)
{
    INTERNET_PER_CONN_OPTION_LIST option_list;
    INTERNET_PER_CONN_OPTION options[3];

    option_list.dwSize = sizeof(option_list);
    option_list.pszConnection = NULL;
    option_list.dwOptionCount = 3;
    option_list.pOptions = options;

    options[0].dwOption = INTERNET_PER_CONN_FLAGS;
    options[0].Value.dwValue = PROXY_TYPE_DIRECT | PROXY_TYPE_PROXY;

    char proxy_server[128];
    _snprintf_s(proxy_server, sizeof(proxy_server) - 1, "%s:%d", addr, port);

    options[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
    options[1].Value.pszValue = proxy_server;

    options[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;
    options[2].Value.pszValue = (LPSTR)"localhost";

    if (InternetSetOption(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &option_list, option_list.dwSize) == TRUE)
    {
        InternetSetOption(NULL, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
        InternetSetOption(NULL, INTERNET_OPTION_REFRESH, NULL, 0);
        return TRUE;
    }
    else { return FALSE; }
}

 

 

I used a function with direct Windows registry edit also with the same result.

 

My idea is the standard Windows proxy configuration rises additional signal or sets other flags during proxy change but I can't configure out which exactly.

 

So, my you can help me  and clarify this with this issue.

 

Regards!

 

0 REPLIES 0
  • 1882 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!