michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * This interface identifies a proxy server. michael@0: */ michael@0: [scriptable, uuid(63fff172-2564-4138-96c6-3ae7d245fbed)] michael@0: interface nsIProxyInfo : nsISupports michael@0: { michael@0: /** michael@0: * This attribute specifies the hostname of the proxy server. michael@0: */ michael@0: readonly attribute AUTF8String host; michael@0: michael@0: /** michael@0: * This attribute specifies the port number of the proxy server. michael@0: */ michael@0: readonly attribute long port; michael@0: michael@0: /** michael@0: * This attribute specifies the type of the proxy server as an ASCII string. michael@0: * michael@0: * Some special values for this attribute include (but are not limited to) michael@0: * the following: michael@0: * "http" HTTP proxy (or SSL CONNECT for HTTPS) michael@0: * "socks" SOCKS v5 proxy michael@0: * "socks4" SOCKS v4 proxy michael@0: * "direct" no proxy michael@0: * "unknown" unknown proxy (see nsIProtocolProxyService::resolve) michael@0: * michael@0: * A future version of this interface may define additional types. michael@0: */ michael@0: readonly attribute ACString type; michael@0: michael@0: /** michael@0: * This attribute specifies flags that modify the proxy type. The value of michael@0: * this attribute is the bit-wise combination of the Proxy Flags defined michael@0: * below. Any undefined bits are reserved for future use. michael@0: */ michael@0: readonly attribute unsigned long flags; michael@0: michael@0: /** michael@0: * This attribute specifies flags that were used by nsIProxyProtocolService when michael@0: * creating this ProxyInfo element. michael@0: */ michael@0: readonly attribute unsigned long resolveFlags; michael@0: michael@0: /** michael@0: * Specifies a SOCKS5 username. michael@0: */ michael@0: readonly attribute ACString username; michael@0: michael@0: /** michael@0: * Specifies a SOCKS5 password. michael@0: */ michael@0: readonly attribute ACString password; michael@0: michael@0: /** michael@0: * This attribute specifies the failover timeout in seconds for this proxy. michael@0: * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService:: michael@0: * getFailoverForProxy, then the failed proxy will not be used again for this michael@0: * many seconds. michael@0: */ michael@0: readonly attribute unsigned long failoverTimeout; michael@0: michael@0: /** michael@0: * This attribute specifies the proxy to failover to when this proxy fails. michael@0: */ michael@0: attribute nsIProxyInfo failoverProxy; michael@0: michael@0: michael@0: /**************************************************************************** michael@0: * The following "Proxy Flags" may be bit-wise combined to construct the michael@0: * flags attribute defined on this interface. All unspecified bits are michael@0: * reserved for future use. michael@0: */ michael@0: michael@0: /** michael@0: * This flag is set if the proxy is to perform name resolution itself. If michael@0: * this is the case, the hostname is used in some fashion, and we shouldn't michael@0: * do any form of DNS lookup ourselves. michael@0: */ michael@0: const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0; michael@0: };