Added option to ignore proxy env.
This commit is contained in:
parent
a0facc329f
commit
b5df39756d
@ -1876,7 +1876,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
*p = '\0';
|
||||
|
||||
if (_stricmp("no_proxy", arg->Value) == 0)
|
||||
settings->ProxyType = PROXY_TYPE_NONE;
|
||||
settings->ProxyType = PROXY_TYPE_IGNORE;
|
||||
|
||||
if (_stricmp("http", arg->Value) == 0)
|
||||
settings->ProxyType = PROXY_TYPE_HTTP;
|
||||
|
@ -475,6 +475,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
|
||||
#define PROXY_TYPE_NONE 0
|
||||
#define PROXY_TYPE_HTTP 1
|
||||
#define PROXY_TYPE_SOCKS 2
|
||||
#define PROXY_TYPE_IGNORE 0xFFFF
|
||||
|
||||
/* Settings */
|
||||
|
||||
|
@ -75,20 +75,23 @@ void proxy_read_environment(rdpSettings* settings, char* envname);
|
||||
BOOL proxy_prepare(rdpSettings* settings, const char** lpPeerHostname, UINT16* lpPeerPort,
|
||||
const char** lpProxyUsername, const char** lpProxyPassword)
|
||||
{
|
||||
if (settings->ProxyType == PROXY_TYPE_IGNORE)
|
||||
return FALSE;
|
||||
|
||||
/* For TSGateway, find the system HTTPS proxy automatically */
|
||||
if (!settings->ProxyType)
|
||||
if (settings->ProxyType == PROXY_TYPE_NONE)
|
||||
proxy_read_environment(settings, "https_proxy");
|
||||
|
||||
if (!settings->ProxyType)
|
||||
if (settings->ProxyType == PROXY_TYPE_NONE)
|
||||
proxy_read_environment(settings, "HTTPS_PROXY");
|
||||
|
||||
if (settings->ProxyType)
|
||||
if (settings->ProxyType != PROXY_TYPE_NONE)
|
||||
proxy_read_environment(settings, "no_proxy");
|
||||
|
||||
if (settings->ProxyType)
|
||||
if (settings->ProxyType != PROXY_TYPE_NONE)
|
||||
proxy_read_environment(settings, "NO_PROXY");
|
||||
|
||||
if (settings->ProxyType)
|
||||
if (settings->ProxyType != PROXY_TYPE_NONE)
|
||||
{
|
||||
*lpPeerHostname = settings->ProxyHostname;
|
||||
*lpPeerPort = settings->ProxyPort;
|
||||
@ -303,6 +306,7 @@ BOOL proxy_connect(rdpSettings* settings, BIO* bufferedBio, const char* proxyUse
|
||||
switch (settings->ProxyType)
|
||||
{
|
||||
case PROXY_TYPE_NONE:
|
||||
case PROXY_TYPE_IGNORE:
|
||||
return TRUE;
|
||||
|
||||
case PROXY_TYPE_HTTP:
|
||||
|
Loading…
Reference in New Issue
Block a user