chromium/net/proxy_resolution/proxy_bypass_rules.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/proxy_resolution/proxy_bypass_rules.h"

#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "net/base/url_util.h"

namespace net {

namespace {

// The <-loopback> rule corresponds with "remove the implicitly added bypass
// rules".
//
// The name <-loopback> is not a very precise name (as the implicit rules cover
// more than strictly loopback addresses), however this is the name that is
// used on Windows so re-used here.
//
// For platform-differences between implicit rules see
// ProxyResolverRules::MatchesImplicitRules().
const char kSubtractImplicitBypasses[] =;

// The <local> rule bypasses any hostname that has no dots (and is not
// an IP literal). The name is misleading as it has nothing to do with
// localhost/loopback addresses, and would have better been called
// something like "simple hostnames". However this is the name used on
// Windows so is matched here.
const char kBypassSimpleHostnames[] =;

bool IsLinkLocalIP(const GURL& url) {}

// Returns true if the URL's host is an IPv6 literal in the range
// [::ffff:127.0.0.1]/104.
//
// Note that net::IsLocalhost() does not currently return true for such
// addresses. However for proxy resolving such URLs should bypass the use
// of a PAC script, since the destination is local.
bool IsIPv4MappedLoopback(const GURL& url) {}

class BypassSimpleHostnamesRule : public SchemeHostPortMatcherRule {};

class SubtractImplicitBypassesRule : public SchemeHostPortMatcherRule {};

std::unique_ptr<SchemeHostPortMatcherRule> ParseRule(
    std::string_view raw_untrimmed) {}

}  // namespace

constexpr char net::ProxyBypassRules::kBypassListDelimeter[];

ProxyBypassRules::ProxyBypassRules() = default;

ProxyBypassRules::ProxyBypassRules(const ProxyBypassRules& rhs) {}

ProxyBypassRules::ProxyBypassRules(ProxyBypassRules&& rhs) {}

ProxyBypassRules::~ProxyBypassRules() = default;

ProxyBypassRules& ProxyBypassRules::operator=(const ProxyBypassRules& rhs) {}

ProxyBypassRules& ProxyBypassRules::operator=(ProxyBypassRules&& rhs) {}

void ProxyBypassRules::ReplaceRule(
    size_t index,
    std::unique_ptr<SchemeHostPortMatcherRule> rule) {}

bool ProxyBypassRules::Matches(const GURL& url, bool reverse) const {}

bool ProxyBypassRules::operator==(const ProxyBypassRules& other) const {}

void ProxyBypassRules::ParseFromString(const std::string& raw) {}

void ProxyBypassRules::PrependRuleToBypassSimpleHostnames() {}

bool ProxyBypassRules::AddRuleFromString(std::string_view raw_untrimmed) {}

void ProxyBypassRules::AddRulesToSubtractImplicit() {}

std::string ProxyBypassRules::GetRulesToSubtractImplicit() {}

std::string ProxyBypassRules::ToString() const {}

void ProxyBypassRules::Clear() {}

bool ProxyBypassRules::MatchesImplicitRules(const GURL& url) {}

}  // namespace net