naiveproxy/services/network/public/mojom/proxy_config.mojom
2018-12-09 21:59:24 -05:00

45 lines
1.1 KiB
Plaintext

// 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 "url/mojom/url.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;
url.mojom.Url pac_url;
bool pac_mandatory;
ProxyRules proxy_rules;
};