nsIProxyInfo.idl (3912B)
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/. */ 5 6 #include "nsISupports.idl" 7 8 /** 9 * This interface identifies a proxy server. 10 */ 11 [scriptable, uuid(63fff172-2564-4138-96c6-3ae7d245fbed)] 12 interface nsIProxyInfo : nsISupports 13 { 14 /** 15 * This attribute specifies the hostname of the proxy server. 16 */ 17 readonly attribute AUTF8String host; 18 19 /** 20 * This attribute specifies the port number of the proxy server. 21 */ 22 readonly attribute long port; 23 24 /** 25 * This attribute specifies the type of the proxy server as an ASCII string. 26 * 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 * "masque" Similar to an HTTPS proxy, but supports 34 * "connect-udp" and/or "connect-tcp" with masqueTemplate 35 * "direct" no proxy 36 * "unknown" unknown proxy (see nsIProtocolProxyService::resolve) 37 * 38 * A future version of this interface may define additional types. 39 */ 40 readonly attribute ACString type; 41 42 /** 43 * This attribute specifies flags that modify the proxy type. The value of 44 * this attribute is the bit-wise combination of the Proxy Flags defined 45 * below. Any undefined bits are reserved for future use. 46 */ 47 readonly attribute unsigned long flags; 48 49 /** 50 * This attribute specifies flags that were used by nsIProxyProtocolService when 51 * creating this ProxyInfo element. 52 */ 53 readonly attribute unsigned long resolveFlags; 54 55 /** 56 * Specifies a proxy username. 57 */ 58 readonly attribute ACString username; 59 60 /** 61 * Specifies a proxy password. 62 */ 63 readonly attribute ACString password; 64 65 /** 66 * This attribute specifies the failover timeout in seconds for this proxy. 67 * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService:: 68 * getFailoverForProxy, then the failed proxy will not be used again for this 69 * many seconds. 70 */ 71 readonly attribute unsigned long failoverTimeout; 72 73 /** 74 * This attribute specifies the proxy to failover to when this proxy fails. 75 */ 76 attribute nsIProxyInfo failoverProxy; 77 78 /** 79 * Specifies an ID related to the source of this proxy configuration. If 80 * it is created in response to an extension API, it will be the extension ID. 81 */ 82 attribute ACString sourceId; 83 84 /** 85 * Any non-empty value will be passed directly as Proxy-Authorization header 86 * value for the CONNECT request attempt. However, this header set on the 87 * resource request itself takes precedence. 88 */ 89 readonly attribute ACString proxyAuthorizationHeader; 90 91 /** 92 * An optional key used for additional isolation of this proxy connection. 93 */ 94 readonly attribute ACString connectionIsolationKey; 95 96 /** 97 * Used when the type is "masque" 98 */ 99 attribute AUTF8String masqueTemplate; 100 101 /** 102 * The following two constants can be used to compare against 103 * network.proxy.socks_version 104 */ 105 const unsigned short SOCKS_V4 = 4; 106 const unsigned short SOCKS_V5 = 5; 107 108 /**************************************************************************** 109 * The following "Proxy Flags" may be bit-wise combined to construct the 110 * flags attribute defined on this interface. All unspecified bits are 111 * reserved for future use. 112 */ 113 114 /** 115 * This flag is set if the proxy is to perform name resolution itself. If 116 * this is the case, the hostname is used in some fashion, and we shouldn't 117 * do any form of DNS lookup ourselves. 118 */ 119 const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0; 120 };