Skip to content

Commit

Permalink
Grab SOCKS settings from system prefs.
Browse files Browse the repository at this point in the history
BUG=http://crbug.com/13423
TEST=test SOCKS (ssh -D) proxying

Review URL: http://codereview.chromium.org/383010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31594 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
avi@chromium.org committed Nov 10, 2009
1 parent 981ccaa commit e90f7a3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion net/proxy/proxy_resolver_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int ProxyConfigServiceMac::GetProxyConfig(ProxyConfig* config) {
config->pac_url = GURL(base::SysCFStringRefToUTF8(pac_url_ref));
}

// proxies (for now only ftp, http and https)
// proxies (for now ftp, http, https, and SOCKS)

if (GetBoolFromDictionary(config_dict.get(),
kSCPropNetProxiesFTPEnable,
Expand Down Expand Up @@ -206,6 +206,19 @@ int ProxyConfigServiceMac::GetProxyConfig(ProxyConfig* config) {
config->proxy_rules.proxy_for_https = proxy_server;
}
}
if (GetBoolFromDictionary(config_dict.get(),
kSCPropNetProxiesSOCKSEnable,
false)) {
ProxyServer proxy_server =
GetProxyServerFromDictionary(ProxyServer::SCHEME_SOCKS5,
config_dict.get(),
kSCPropNetProxiesSOCKSProxy,
kSCPropNetProxiesSOCKSPort);
if (proxy_server.is_valid()) {
config->proxy_rules.type = ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME;
config->proxy_rules.socks_proxy = proxy_server;
}
}

// proxy bypass list

Expand Down

0 comments on commit e90f7a3

Please sign in to comment.