summaryrefslogtreecommitdiff
path: root/chromium/services/network/public/mojom/proxy_config.mojom
blob: a1965d2022a769c1056e0917e7574cfefe920d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// 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;
};