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"
9 * This interface identifies a proxy server.
11 [scriptable
, uuid(63fff172
-2564-4138-96c6
-3ae7d245fbed
)]
12 interface nsIProxyInfo
: nsISupports
15 * This attribute specifies the hostname of the proxy server.
17 readonly attribute AUTF8String host
;
20 * This attribute specifies the port number of the proxy server.
22 readonly attribute
long port
;
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)
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
34 * "unknown" unknown proxy (see nsIProtocolProxyService::resolve)
36 * A future version of this interface may define additional types.
38 readonly attribute ACString type
;
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
;
48 * This attribute specifies flags that were used by nsIProxyProtocolService when
49 * creating this ProxyInfo element.
51 readonly attribute
unsigned long resolveFlags
;
54 * Specifies a proxy username.
56 readonly attribute ACString username
;
59 * Specifies a proxy password.
61 readonly attribute ACString password
;
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
69 readonly attribute
unsigned long failoverTimeout
;
72 * This attribute specifies the proxy to failover to when this proxy fails.
74 attribute nsIProxyInfo failoverProxy
;
77 /****************************************************************************
78 * The following "Proxy Flags" may be bit-wise combined to construct the
79 * flags attribute defined on this interface. All unspecified bits are
80 * reserved for future use.
84 * This flag is set if the proxy is to perform name resolution itself. If
85 * this is the case, the hostname is used in some fashion, and we shouldn't
86 * do any form of DNS lookup ourselves.
88 const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST
= 1 << 0;