summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 20:34:19 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 20:34:19 +0000
commitfadf9cdd69aa5bd50ce55d750c1bb1763abcf968 (patch)
tree6113ef0cd92183de98f7b5415eb33454712222b3 /net/proxy
parentb6f936cf956a9860184846c8e3d6e403d7787f04 (diff)
downloadchromium_src-fadf9cdd69aa5bd50ce55d750c1bb1763abcf968.zip
chromium_src-fadf9cdd69aa5bd50ce55d750c1bb1763abcf968.tar.gz
chromium_src-fadf9cdd69aa5bd50ce55d750c1bb1763abcf968.tar.bz2
Grab SOCKS settings from system prefs.
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
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_resolver_mac.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc
index a57f840..e3d826e 100644
--- a/net/proxy/proxy_resolver_mac.cc
+++ b/net/proxy/proxy_resolver_mac.cc
@@ -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,
@@ -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