<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GlobalProtect with Windows10 system proxy in GlobalProtect Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/globalprotect-with-windows10-system-proxy/m-p/407028#M1296</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I can use GlobalProtect with this proxy but only in the case when I configure system proxy via Window "Proxy Settings" menu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the case when I try to configure system proxy by my custom application GlobalProtect can't connect vie my proxy.&lt;/P&gt;&lt;P&gt;For proxy configuration I use function like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;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, &amp;amp;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; }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used a function with direct Windows registry edit also with the same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my you can help me&amp;nbsp; and clarify this with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 May 2021 09:21:48 GMT</pubDate>
    <dc:creator>zhskyy</dc:creator>
    <dc:date>2021-05-16T09:21:48Z</dc:date>
    <item>
      <title>GlobalProtect with Windows10 system proxy</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/globalprotect-with-windows10-system-proxy/m-p/407028#M1296</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I can use GlobalProtect with this proxy but only in the case when I configure system proxy via Window "Proxy Settings" menu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the case when I try to configure system proxy by my custom application GlobalProtect can't connect vie my proxy.&lt;/P&gt;&lt;P&gt;For proxy configuration I use function like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;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, &amp;amp;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; }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used a function with direct Windows registry edit also with the same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my you can help me&amp;nbsp; and clarify this with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 09:21:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/globalprotect-with-windows10-system-proxy/m-p/407028#M1296</guid>
      <dc:creator>zhskyy</dc:creator>
      <dc:date>2021-05-16T09:21:48Z</dc:date>
    </item>
  </channel>
</rss>

