blob: a1965d2022a769c1056e0917e7574cfefe920d8a [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module network.mojom;
import "mojo/public/mojom/base/big_string.mojom";
// This corresponds to the string representation of net::ProxyConfigBypassRules.
struct ProxyBypassRules {
array<string> rules;
};
// A list of proxies, each in the format of a single semi-colon delimited entry
// in the output of a PAC script (e.g., "PROXY foo.com", "DIRECT").
struct ProxyList {
array<string> proxies;
};
// This corresponds to net::ProxyConfig::ProxyRules::Type.
enum ProxyRulesType {
EMPTY,
PROXY_LIST,
PROXY_LIST_PER_SCHEME,
};
// These fields mirror those of net::ProxyConfig::ProxyRules.
struct ProxyRules {
ProxyBypassRules bypass_rules;
bool reverse_bypass;
ProxyRulesType type;
ProxyList single_proxies;
ProxyList proxies_for_http;
ProxyList proxies_for_https;
ProxyList proxies_for_ftp;
ProxyList fallback_proxies;
};
// These fields mirror those of net::ProxyConfig.
struct ProxyConfig {
bool auto_detect;
// Note that a |BigString| is used rather than a |url.mojom.Url|, since
// |url.mojom.Url| imposes a smaller limit on URL size than GURL, and
// ProxyConfig::pac_url may contain large data: URLs that exceed this limit.
mojo_base.mojom.BigString pac_url;
bool pac_mandatory;
ProxyRules proxy_rules;
};