Source code

Revision control

Other Tools

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
* "direct" no proxy
34
* "unknown" unknown proxy (see nsIProtocolProxyService::resolve)
35
*
36
* A future version of this interface may define additional types.
37
*/
38
readonly attribute ACString type;
39
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.
44
*/
45
readonly attribute unsigned long flags;
46
47
/**
48
* This attribute specifies flags that were used by nsIProxyProtocolService when
49
* creating this ProxyInfo element.
50
*/
51
attribute unsigned long resolveFlags;
52
53
/**
54
* Specifies a proxy username.
55
*/
56
readonly attribute ACString username;
57
58
/**
59
* Specifies a proxy password.
60
*/
61
readonly attribute ACString password;
62
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.
68
*/
69
readonly attribute unsigned long failoverTimeout;
70
71
/**
72
* This attribute specifies the proxy to failover to when this proxy fails.
73
*/
74
attribute nsIProxyInfo failoverProxy;
75
76
/**
77
* Any non-empty value will be passed directly as Proxy-Authorization header
78
* value for the CONNECT request attempt. However, this header set on the
79
* resource request itself takes precedence.
80
*/
81
readonly attribute ACString proxyAuthorizationHeader;
82
83
/**
84
* An optional key used for additional isolation of this proxy connection.
85
*/
86
readonly attribute ACString connectionIsolationKey;
87
88
/****************************************************************************
89
* The following "Proxy Flags" may be bit-wise combined to construct the
90
* flags attribute defined on this interface. All unspecified bits are
91
* reserved for future use.
92
*/
93
94
/**
95
* This flag is set if the proxy is to perform name resolution itself. If
96
* this is the case, the hostname is used in some fashion, and we shouldn't
97
* do any form of DNS lookup ourselves.
98
*/
99
const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;
100
};