Merge mozilla-central to autoland. CLOSED TREE
[gecko.git] / netwerk / base / nsIProxyInfo.idl
blobdc762fbd2d50252ec275c2647d947b8a6da5fb74
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 /**
9 * This interface identifies a proxy server.
11 [scriptable, uuid(63fff172-2564-4138-96c6-3ae7d245fbed)]
12 interface nsIProxyInfo : nsISupports
14 /**
15 * This attribute specifies the hostname of the proxy server.
17 readonly attribute AUTF8String host;
19 /**
20 * This attribute specifies the port number of the proxy server.
22 readonly attribute long port;
24 /**
25 * This attribute specifies the type of the proxy server as an ASCII string.
27 * Some special values for this attribute include (but are not limited to)
28 * the following:
29 * "http" HTTP proxy (or SSL CONNECT for HTTPS)
30 * "https" HTTP proxying over TLS connection to proxy
31 * "socks" SOCKS v5 proxy
32 * "socks4" SOCKS v4 proxy
33 * "direct" no proxy
34 * "unknown" unknown proxy (see nsIProtocolProxyService::resolve)
36 * A future version of this interface may define additional types.
38 readonly attribute ACString type;
40 /**
41 * This attribute specifies flags that modify the proxy type. The value of
42 * this attribute is the bit-wise combination of the Proxy Flags defined
43 * below. Any undefined bits are reserved for future use.
45 readonly attribute unsigned long flags;
47 /**
48 * This attribute specifies flags that were used by nsIProxyProtocolService when
49 * creating this ProxyInfo element.
51 readonly attribute unsigned long resolveFlags;
53 /**
54 * Specifies a proxy username.
56 readonly attribute ACString username;
58 /**
59 * Specifies a proxy password.
61 readonly attribute ACString password;
63 /**
64 * This attribute specifies the failover timeout in seconds for this proxy.
65 * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
66 * getFailoverForProxy, then the failed proxy will not be used again for this
67 * many seconds.
69 readonly attribute unsigned long failoverTimeout;
71 /**
72 * This attribute specifies the proxy to failover to when this proxy fails.
74 attribute nsIProxyInfo failoverProxy;
76 /**
77 * Specifies an ID related to the source of this proxy configuration. If
78 * it is created in response to an extension API, it will be the extension ID.
80 attribute ACString sourceId;
82 /**
83 * Any non-empty value will be passed directly as Proxy-Authorization header
84 * value for the CONNECT request attempt. However, this header set on the
85 * resource request itself takes precedence.
87 readonly attribute ACString proxyAuthorizationHeader;
89 /**
90 * An optional key used for additional isolation of this proxy connection.
92 readonly attribute ACString connectionIsolationKey;
94 /****************************************************************************
95 * The following "Proxy Flags" may be bit-wise combined to construct the
96 * flags attribute defined on this interface. All unspecified bits are
97 * reserved for future use.
101 * This flag is set if the proxy is to perform name resolution itself. If
102 * this is the case, the hostname is used in some fashion, and we shouldn't
103 * do any form of DNS lookup ourselves.
105 const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;