[email protected] | 24f49bd3 | 2011-04-19 19:01:14 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "net/proxy/proxy_bypass_rules.h" |
| 6 | |
brettw | d97eede | 2015-07-06 22:09:00 | [diff] [blame] | 7 | #include "base/strings/pattern.h" |
[email protected] | d069c11a | 2013-04-13 00:01:55 | [diff] [blame] | 8 | #include "base/strings/string_piece.h" |
[email protected] | f4ebe77 | 2013-02-02 00:21:39 | [diff] [blame] | 9 | #include "base/strings/string_tokenizer.h" |
eroman | ff374b7f | 2014-09-24 23:42:00 | [diff] [blame] | 10 | #include "base/strings/string_util.h" |
| 11 | #include "base/strings/stringprintf.h" |
| 12 | #include "net/base/host_port_pair.h" |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 13 | #include "net/base/ip_address.h" |
eroman | 55fa65c5 | 2016-03-24 18:57:49 | [diff] [blame] | 14 | #include "net/base/parse_number.h" |
tfarina | 7a4a7fd | 2016-01-20 14:23:44 | [diff] [blame] | 15 | #include "net/base/url_util.h" |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 16 | |
| 17 | namespace net { |
| 18 | |
| 19 | namespace { |
| 20 | |
| 21 | class HostnamePatternRule : public ProxyBypassRules::Rule { |
| 22 | public: |
| 23 | HostnamePatternRule(const std::string& optional_scheme, |
| 24 | const std::string& hostname_pattern, |
| 25 | int optional_port) |
brettw | 8e2106d | 2015-08-11 19:30:22 | [diff] [blame] | 26 | : optional_scheme_(base::ToLowerASCII(optional_scheme)), |
| 27 | hostname_pattern_(base::ToLowerASCII(hostname_pattern)), |
| 28 | optional_port_(optional_port) {} |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 29 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 30 | bool Matches(const GURL& url) const override { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 31 | if (optional_port_ != -1 && url.EffectiveIntPort() != optional_port_) |
| 32 | return false; // Didn't match port expectation. |
| 33 | |
| 34 | if (!optional_scheme_.empty() && url.scheme() != optional_scheme_) |
| 35 | return false; // Didn't match scheme expectation. |
| 36 | |
| 37 | // Note it is necessary to lower-case the host, since GURL uses capital |
| 38 | // letters for percent-escaped characters. |
brettw | 8e2106d | 2015-08-11 19:30:22 | [diff] [blame] | 39 | return base::MatchPattern(url.host(), hostname_pattern_); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 40 | } |
| 41 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 42 | std::string ToString() const override { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 43 | std::string str; |
| 44 | if (!optional_scheme_.empty()) |
[email protected] | a77fa2dc | 2010-11-15 12:11:11 | [diff] [blame] | 45 | base::StringAppendF(&str, "%s://", optional_scheme_.c_str()); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 46 | str += hostname_pattern_; |
| 47 | if (optional_port_ != -1) |
[email protected] | a77fa2dc | 2010-11-15 12:11:11 | [diff] [blame] | 48 | base::StringAppendF(&str, ":%d", optional_port_); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 49 | return str; |
| 50 | } |
| 51 | |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 52 | std::unique_ptr<Rule> Clone() const override { |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 53 | return std::make_unique<HostnamePatternRule>( |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 54 | optional_scheme_, hostname_pattern_, optional_port_); |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 55 | } |
| 56 | |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 57 | private: |
| 58 | const std::string optional_scheme_; |
| 59 | const std::string hostname_pattern_; |
| 60 | const int optional_port_; |
| 61 | }; |
| 62 | |
| 63 | class BypassLocalRule : public ProxyBypassRules::Rule { |
| 64 | public: |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 65 | bool Matches(const GURL& url) const override { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 66 | const std::string& host = url.host(); |
| 67 | if (host == "127.0.0.1" || host == "[::1]") |
| 68 | return true; |
| 69 | return host.find('.') == std::string::npos; |
| 70 | } |
| 71 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 72 | std::string ToString() const override { return "<local>"; } |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 73 | |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 74 | std::unique_ptr<Rule> Clone() const override { |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 75 | return std::make_unique<BypassLocalRule>(); |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 76 | } |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 77 | }; |
| 78 | |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 79 | // Rule for matching a URL that is an IP address, if that IP address falls |
| 80 | // within a certain numeric range. For example, you could use this rule to |
| 81 | // match all the IPs in the CIDR block 10.10.3.4/24. |
| 82 | class BypassIPBlockRule : public ProxyBypassRules::Rule { |
| 83 | public: |
| 84 | // |ip_prefix| + |prefix_length| define the IP block to match. |
| 85 | BypassIPBlockRule(const std::string& description, |
| 86 | const std::string& optional_scheme, |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 87 | const IPAddress& ip_prefix, |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 88 | size_t prefix_length_in_bits) |
| 89 | : description_(description), |
| 90 | optional_scheme_(optional_scheme), |
| 91 | ip_prefix_(ip_prefix), |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 92 | prefix_length_in_bits_(prefix_length_in_bits) {} |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 93 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 94 | bool Matches(const GURL& url) const override { |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 95 | if (!url.HostIsIPAddress()) |
| 96 | return false; |
| 97 | |
| 98 | if (!optional_scheme_.empty() && url.scheme() != optional_scheme_) |
| 99 | return false; // Didn't match scheme expectation. |
| 100 | |
| 101 | // Parse the input IP literal to a number. |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 102 | IPAddress ip_address; |
ricea | 1c0de2f | 2017-07-03 08:21:43 | [diff] [blame] | 103 | if (!ip_address.AssignFromIPLiteral(url.HostNoBracketsPiece())) |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 104 | return false; |
| 105 | |
| 106 | // Test if it has the expected prefix. |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 107 | return IPAddressMatchesPrefix(ip_address, ip_prefix_, |
| 108 | prefix_length_in_bits_); |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 109 | } |
| 110 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 111 | std::string ToString() const override { return description_; } |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 112 | |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 113 | std::unique_ptr<Rule> Clone() const override { |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 114 | return std::make_unique<BypassIPBlockRule>( |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 115 | description_, optional_scheme_, ip_prefix_, prefix_length_in_bits_); |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 116 | } |
| 117 | |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 118 | private: |
| 119 | const std::string description_; |
| 120 | const std::string optional_scheme_; |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 121 | const IPAddress ip_prefix_; |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 122 | const size_t prefix_length_in_bits_; |
| 123 | }; |
| 124 | |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 125 | // Returns true if the given string represents an IP address. |
eroman | ff374b7f | 2014-09-24 23:42:00 | [diff] [blame] | 126 | // IPv6 addresses are expected to be bracketed. |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 127 | bool IsIPAddress(const std::string& domain) { |
| 128 | // From GURL::HostIsIPAddress() |
[email protected] | ce97ca36 | 2014-04-30 11:35:46 | [diff] [blame] | 129 | url::RawCanonOutputT<char, 128> ignored_output; |
| 130 | url::CanonHostInfo host_info; |
| 131 | url::Component domain_comp(0, domain.size()); |
| 132 | url::CanonicalizeIPAddress(domain.c_str(), domain_comp, &ignored_output, |
| 133 | &host_info); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 134 | return host_info.IsIPAddress(); |
| 135 | } |
| 136 | |
| 137 | } // namespace |
| 138 | |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 139 | ProxyBypassRules::Rule::Rule() { |
| 140 | } |
| 141 | |
| 142 | ProxyBypassRules::Rule::~Rule() { |
| 143 | } |
| 144 | |
| 145 | bool ProxyBypassRules::Rule::Equals(const Rule& rule) const { |
| 146 | return ToString() == rule.ToString(); |
| 147 | } |
| 148 | |
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame] | 149 | ProxyBypassRules::ProxyBypassRules() { |
| 150 | } |
| 151 | |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 152 | ProxyBypassRules::ProxyBypassRules(const ProxyBypassRules& rhs) { |
| 153 | AssignFrom(rhs); |
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame] | 154 | } |
| 155 | |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 156 | ProxyBypassRules::~ProxyBypassRules() { |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 157 | Clear(); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 158 | } |
| 159 | |
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame] | 160 | ProxyBypassRules& ProxyBypassRules::operator=(const ProxyBypassRules& rhs) { |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 161 | AssignFrom(rhs); |
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame] | 162 | return *this; |
| 163 | } |
| 164 | |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 165 | bool ProxyBypassRules::Matches(const GURL& url) const { |
| 166 | for (RuleList::const_iterator it = rules_.begin(); it != rules_.end(); ++it) { |
| 167 | if ((*it)->Matches(url)) |
| 168 | return true; |
| 169 | } |
| 170 | return false; |
| 171 | } |
| 172 | |
| 173 | bool ProxyBypassRules::Equals(const ProxyBypassRules& other) const { |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 174 | if (rules_.size() != other.rules_.size()) |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 175 | return false; |
| 176 | |
| 177 | for (size_t i = 0; i < rules_.size(); ++i) { |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 178 | if (!rules_[i]->Equals(*other.rules_[i])) |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 179 | return false; |
| 180 | } |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | void ProxyBypassRules::ParseFromString(const std::string& raw) { |
| 185 | ParseFromStringInternal(raw, false); |
| 186 | } |
| 187 | |
| 188 | void ProxyBypassRules::ParseFromStringUsingSuffixMatching( |
| 189 | const std::string& raw) { |
| 190 | ParseFromStringInternal(raw, true); |
| 191 | } |
| 192 | |
| 193 | bool ProxyBypassRules::AddRuleForHostname(const std::string& optional_scheme, |
| 194 | const std::string& hostname_pattern, |
| 195 | int optional_port) { |
| 196 | if (hostname_pattern.empty()) |
| 197 | return false; |
| 198 | |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 199 | rules_.push_back(std::make_unique<HostnamePatternRule>( |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 200 | optional_scheme, hostname_pattern, optional_port)); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 201 | return true; |
| 202 | } |
| 203 | |
| 204 | void ProxyBypassRules::AddRuleToBypassLocal() { |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 205 | rules_.push_back(std::make_unique<BypassLocalRule>()); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | bool ProxyBypassRules::AddRuleFromString(const std::string& raw) { |
| 209 | return AddRuleFromStringInternalWithLogging(raw, false); |
| 210 | } |
| 211 | |
[email protected] | 1a59719 | 2010-07-09 16:58:38 | [diff] [blame] | 212 | bool ProxyBypassRules::AddRuleFromStringUsingSuffixMatching( |
| 213 | const std::string& raw) { |
| 214 | return AddRuleFromStringInternalWithLogging(raw, true); |
| 215 | } |
| 216 | |
[email protected] | 24f49bd3 | 2011-04-19 19:01:14 | [diff] [blame] | 217 | std::string ProxyBypassRules::ToString() const { |
| 218 | std::string result; |
| 219 | for (RuleList::const_iterator rule(rules_.begin()); |
| 220 | rule != rules_.end(); |
| 221 | ++rule) { |
| 222 | result += (*rule)->ToString(); |
| 223 | result += ";"; |
| 224 | } |
| 225 | return result; |
| 226 | } |
| 227 | |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 228 | void ProxyBypassRules::Clear() { |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 229 | rules_.clear(); |
[email protected] | af37009 | 2010-12-01 02:06:26 | [diff] [blame] | 230 | } |
| 231 | |
| 232 | void ProxyBypassRules::AssignFrom(const ProxyBypassRules& other) { |
| 233 | Clear(); |
| 234 | |
| 235 | // Make a copy of the rules list. |
| 236 | for (RuleList::const_iterator it = other.rules_.begin(); |
| 237 | it != other.rules_.end(); ++it) { |
| 238 | rules_.push_back((*it)->Clone()); |
| 239 | } |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | void ProxyBypassRules::ParseFromStringInternal( |
| 243 | const std::string& raw, |
| 244 | bool use_hostname_suffix_matching) { |
| 245 | Clear(); |
| 246 | |
[email protected] | f4ebe77 | 2013-02-02 00:21:39 | [diff] [blame] | 247 | base::StringTokenizer entries(raw, ",;"); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 248 | while (entries.GetNext()) { |
| 249 | AddRuleFromStringInternalWithLogging(entries.token(), |
| 250 | use_hostname_suffix_matching); |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | bool ProxyBypassRules::AddRuleFromStringInternal( |
| 255 | const std::string& raw_untrimmed, |
| 256 | bool use_hostname_suffix_matching) { |
| 257 | std::string raw; |
[email protected] | 8af69c6c | 2014-03-03 19:05:31 | [diff] [blame] | 258 | base::TrimWhitespaceASCII(raw_untrimmed, base::TRIM_ALL, &raw); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 259 | |
| 260 | // This is the special syntax used by WinInet's bypass list -- we allow it |
| 261 | // on all platforms and interpret it the same way. |
brettw | bc17d2c8 | 2015-06-09 22:39:08 | [diff] [blame] | 262 | if (base::LowerCaseEqualsASCII(raw, "<local>")) { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 263 | AddRuleToBypassLocal(); |
| 264 | return true; |
| 265 | } |
| 266 | |
| 267 | // Extract any scheme-restriction. |
| 268 | std::string::size_type scheme_pos = raw.find("://"); |
| 269 | std::string scheme; |
| 270 | if (scheme_pos != std::string::npos) { |
| 271 | scheme = raw.substr(0, scheme_pos); |
| 272 | raw = raw.substr(scheme_pos + 3); |
| 273 | if (scheme.empty()) |
| 274 | return false; |
| 275 | } |
| 276 | |
| 277 | if (raw.empty()) |
| 278 | return false; |
| 279 | |
| 280 | // If there is a forward slash in the input, it is probably a CIDR style |
| 281 | // mask. |
| 282 | if (raw.find('/') != std::string::npos) { |
martijn | 579658b | 2016-03-20 20:22:09 | [diff] [blame] | 283 | IPAddress ip_prefix; |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 284 | size_t prefix_length_in_bits; |
| 285 | |
| 286 | if (!ParseCIDRBlock(raw, &ip_prefix, &prefix_length_in_bits)) |
| 287 | return false; |
| 288 | |
Jeremy Roman | 0579ed6 | 2017-08-29 15:56:19 | [diff] [blame] | 289 | rules_.push_back(std::make_unique<BypassIPBlockRule>( |
avi | ca04a62 | 2016-10-07 00:28:47 | [diff] [blame] | 290 | raw, scheme, ip_prefix, prefix_length_in_bits)); |
[email protected] | 5439283 | 2010-06-08 23:25:04 | [diff] [blame] | 291 | |
| 292 | return true; |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | // Check if we have an <ip-address>[:port] input. We need to treat this |
| 296 | // separately since the IP literal may not be in a canonical form. |
| 297 | std::string host; |
| 298 | int port; |
| 299 | if (ParseHostAndPort(raw, &host, &port)) { |
eroman | e6264fd | 2016-03-02 22:46:30 | [diff] [blame] | 300 | // TODO(eroman): HostForURL() below DCHECKs() when |host| contains an |
| 301 | // embedded NULL. |
| 302 | if (host.find('\0') != std::string::npos) |
| 303 | return false; |
| 304 | |
eroman | ff374b7f | 2014-09-24 23:42:00 | [diff] [blame] | 305 | // Note that HostPortPair is used to merely to convert any IPv6 literals to |
| 306 | // a URL-safe format that can be used by canonicalization below. |
| 307 | std::string bracketed_host = HostPortPair(host, 80).HostForURL(); |
| 308 | if (IsIPAddress(bracketed_host)) { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 309 | // Canonicalize the IP literal before adding it as a string pattern. |
eroman | ff374b7f | 2014-09-24 23:42:00 | [diff] [blame] | 310 | GURL tmp_url("http://" + bracketed_host); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 311 | return AddRuleForHostname(scheme, tmp_url.host(), port); |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | // Otherwise assume we have <hostname-pattern>[:port]. |
| 316 | std::string::size_type pos_colon = raw.rfind(':'); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 317 | port = -1; |
| 318 | if (pos_colon != std::string::npos) { |
eroman | ae40d9ba | 2016-04-11 18:40:26 | [diff] [blame] | 319 | if (!ParseInt32(base::StringPiece(raw.begin() + pos_colon + 1, raw.end()), |
| 320 | ParseIntFormat::NON_NEGATIVE, &port) || |
eroman | 55fa65c5 | 2016-03-24 18:57:49 | [diff] [blame] | 321 | port > 0xFFFF) { |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 322 | return false; // Port was invalid. |
| 323 | } |
| 324 | raw = raw.substr(0, pos_colon); |
| 325 | } |
| 326 | |
| 327 | // Special-case hostnames that begin with a period. |
| 328 | // For example, we remap ".google.com" --> "*.google.com". |
brettw | 3a2c690 | 2015-07-06 19:43:29 | [diff] [blame] | 329 | if (base::StartsWith(raw, ".", base::CompareCase::SENSITIVE)) |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 330 | raw = "*" + raw; |
| 331 | |
| 332 | // If suffix matching was asked for, make sure the pattern starts with a |
| 333 | // wildcard. |
brettw | 3a2c690 | 2015-07-06 19:43:29 | [diff] [blame] | 334 | if (use_hostname_suffix_matching && |
| 335 | !base::StartsWith(raw, "*", base::CompareCase::SENSITIVE)) |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 336 | raw = "*" + raw; |
| 337 | |
| 338 | return AddRuleForHostname(scheme, raw, port); |
| 339 | } |
| 340 | |
| 341 | bool ProxyBypassRules::AddRuleFromStringInternalWithLogging( |
| 342 | const std::string& raw, |
| 343 | bool use_hostname_suffix_matching) { |
[email protected] | e5e6166 | 2010-03-11 02:32:39 | [diff] [blame] | 344 | return AddRuleFromStringInternal(raw, use_hostname_suffix_matching); |
[email protected] | 7541206c | 2010-02-19 20:24:06 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | } // namespace net |