2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-07-25 04:28:28 +04:00
|
|
|
|
2003-04-11 22:24:55 +04:00
|
|
|
#ifndef nsProtocolProxyService_h__
|
|
|
|
#define nsProtocolProxyService_h__
|
2000-02-14 13:04:56 +03:00
|
|
|
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2004-07-02 03:31:47 +04:00
|
|
|
#include "nsAutoPtr.h"
|
2009-02-23 04:05:28 +03:00
|
|
|
#include "nsTArray.h"
|
2006-03-30 21:31:15 +04:00
|
|
|
#include "nsIProtocolProxyService2.h"
|
2005-03-25 06:41:33 +03:00
|
|
|
#include "nsIProtocolProxyFilter.h"
|
2001-09-13 06:21:05 +04:00
|
|
|
#include "nsIProxyInfo.h"
|
2003-07-15 01:36:24 +04:00
|
|
|
#include "nsIObserver.h"
|
2004-07-02 03:31:47 +04:00
|
|
|
#include "nsDataHashtable.h"
|
|
|
|
#include "nsHashKeys.h"
|
2003-04-11 22:24:55 +04:00
|
|
|
#include "prio.h"
|
2012-06-06 07:18:25 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-02-14 13:04:56 +03:00
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
class nsIPrefBranch;
|
|
|
|
class nsISystemProxySettings;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
typedef nsDataHashtable<nsCStringHashKey, uint32_t> nsFailedProxyTable;
|
2004-07-02 03:31:47 +04:00
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
class nsPACMan;
|
2004-07-02 03:31:47 +04:00
|
|
|
class nsProxyInfo;
|
2005-07-06 21:42:06 +04:00
|
|
|
struct nsProtocolInfo;
|
2004-07-02 03:31:47 +04:00
|
|
|
|
2015-01-21 23:13:00 +03:00
|
|
|
// CID for the nsProtocolProxyService class
|
|
|
|
// 091eedd8-8bae-4fe3-ad62-0c87351e640d
|
|
|
|
#define NS_PROTOCOL_PROXY_SERVICE_IMPL_CID \
|
|
|
|
{ 0x091eedd8, 0x8bae, 0x4fe3, \
|
|
|
|
{ 0xad, 0x62, 0x0c, 0x87, 0x35, 0x1e, 0x64, 0x0d } }
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsProtocolProxyService final : public nsIProtocolProxyService2
|
2015-03-27 21:52:19 +03:00
|
|
|
, public nsIObserver
|
2002-09-23 05:31:17 +04:00
|
|
|
{
|
2000-02-14 13:04:56 +03:00
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
2006-03-30 21:31:15 +04:00
|
|
|
NS_DECL_NSIPROTOCOLPROXYSERVICE2
|
2000-02-14 13:04:56 +03:00
|
|
|
NS_DECL_NSIPROTOCOLPROXYSERVICE
|
2003-07-15 01:36:24 +04:00
|
|
|
NS_DECL_NSIOBSERVER
|
2000-02-14 13:04:56 +03:00
|
|
|
|
2015-01-21 23:13:00 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROTOCOL_PROXY_SERVICE_IMPL_CID)
|
|
|
|
|
2014-06-02 16:08:24 +04:00
|
|
|
nsProtocolProxyService();
|
2000-02-24 00:17:17 +03:00
|
|
|
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult Init();
|
2000-02-14 13:04:56 +03:00
|
|
|
|
|
|
|
protected:
|
2005-04-02 03:31:04 +04:00
|
|
|
friend class nsAsyncResolveRequest;
|
2005-03-25 06:41:33 +03:00
|
|
|
|
2014-06-02 16:08:24 +04:00
|
|
|
~nsProtocolProxyService();
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is called whenever a preference may have changed or
|
|
|
|
* to initialize all preferences.
|
|
|
|
*
|
|
|
|
* @param prefs
|
|
|
|
* This must be a pointer to the root pref branch.
|
|
|
|
* @param name
|
|
|
|
* This can be the name of a fully-qualified preference, or it can
|
|
|
|
* be null, in which case all preferences will be initialized.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void PrefsChanged(nsIPrefBranch *prefs, const char *name);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is called to create a nsProxyInfo instance from the given
|
|
|
|
* PAC-style proxy string. It parses up to the end of the string, or to
|
|
|
|
* the next ';' character.
|
|
|
|
*
|
|
|
|
* @param proxy
|
|
|
|
* The PAC-style proxy string to parse. This must not be null.
|
2011-05-13 21:53:27 +04:00
|
|
|
* @param aResolveFlags
|
|
|
|
* The flags passed to Resolve or AsyncResolve that are stored in
|
|
|
|
* proxyInfo.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param result
|
|
|
|
* Upon return this points to a newly allocated nsProxyInfo or null
|
|
|
|
* if the proxy string was invalid.
|
|
|
|
*
|
|
|
|
* @return A pointer beyond the parsed proxy string (never null).
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
const char * ExtractProxyInfo(const char *proxy,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aResolveFlags,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsProxyInfo **result);
|
|
|
|
|
2006-03-30 21:31:15 +04:00
|
|
|
/**
|
|
|
|
* Load the specified PAC file.
|
|
|
|
*
|
|
|
|
* @param pacURI
|
|
|
|
* The URI spec of the PAC file to load.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult ConfigureFromPAC(const nsCString &pacURI, bool forceReload);
|
2006-03-30 21:31:15 +04:00
|
|
|
|
2005-03-25 06:41:33 +03:00
|
|
|
/**
|
|
|
|
* This method builds a list of nsProxyInfo objects from the given PAC-
|
|
|
|
* style string.
|
|
|
|
*
|
|
|
|
* @param pacString
|
|
|
|
* The PAC-style proxy string to parse. This may be empty.
|
2011-05-13 21:53:27 +04:00
|
|
|
* @param aResolveFlags
|
|
|
|
* The flags passed to Resolve or AsyncResolve that are stored in
|
|
|
|
* proxyInfo.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param result
|
|
|
|
* The resulting list of proxy info objects.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void ProcessPACString(const nsCString &pacString,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aResolveFlags,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsIProxyInfo **result);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method generates a string valued identifier for the given
|
|
|
|
* nsProxyInfo object.
|
|
|
|
*
|
|
|
|
* @param pi
|
|
|
|
* The nsProxyInfo object from which to generate the key.
|
|
|
|
* @param result
|
|
|
|
* Upon return, this parameter holds the generated key.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void GetProxyKey(nsProxyInfo *pi, nsCString &result);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Seconds since start of session.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
uint32_t SecondsSinceSessionStart();
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method removes the specified proxy from the disabled list.
|
|
|
|
*
|
|
|
|
* @param pi
|
|
|
|
* The nsProxyInfo object identifying the proxy to enable.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void EnableProxy(nsProxyInfo *pi);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method adds the specified proxy to the disabled list.
|
|
|
|
*
|
|
|
|
* @param pi
|
|
|
|
* The nsProxyInfo object identifying the proxy to disable.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void DisableProxy(nsProxyInfo *pi);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method tests to see if the given proxy is disabled.
|
|
|
|
*
|
|
|
|
* @param pi
|
|
|
|
* The nsProxyInfo object identifying the proxy to test.
|
|
|
|
*
|
|
|
|
* @return True if the specified proxy is disabled.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
bool IsProxyDisabled(nsProxyInfo *pi);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method queries the protocol handler for the given scheme to check
|
|
|
|
* for the protocol flags and default port.
|
|
|
|
*
|
|
|
|
* @param uri
|
|
|
|
* The URI to query.
|
|
|
|
* @param info
|
|
|
|
* Holds information about the protocol upon return. Pass address
|
|
|
|
* of structure when you call this method. This parameter must not
|
|
|
|
* be null.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult GetProtocolInfo(nsIURI *uri, nsProtocolInfo *result);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is an internal version nsIProtocolProxyService::newProxyInfo
|
|
|
|
* that expects a string literal for the type.
|
|
|
|
*
|
|
|
|
* @param type
|
|
|
|
* The proxy type.
|
|
|
|
* @param host
|
|
|
|
* The proxy host name (UTF-8 ok).
|
|
|
|
* @param port
|
|
|
|
* The proxy port number.
|
2015-11-25 00:56:00 +03:00
|
|
|
* @param username
|
|
|
|
* The username for the proxy (ASCII). May be "", but not null.
|
|
|
|
* @param password
|
|
|
|
* The password for the proxy (ASCII). May be "", but not null.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param flags
|
|
|
|
* The proxy flags (nsIProxyInfo::flags).
|
|
|
|
* @param timeout
|
|
|
|
* The failover timeout for this proxy.
|
|
|
|
* @param next
|
|
|
|
* The next proxy to try if this one fails.
|
2011-05-13 21:53:27 +04:00
|
|
|
* @param aResolveFlags
|
|
|
|
* The flags passed to resolve (from nsIProtocolProxyService).
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param result
|
|
|
|
* The resulting nsIProxyInfo object.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult NewProxyInfo_Internal(const char *type,
|
2005-03-25 06:41:33 +03:00
|
|
|
const nsACString &host,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t port,
|
2015-11-25 00:56:00 +03:00
|
|
|
const nsACString &username,
|
|
|
|
const nsACString &password,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t flags,
|
|
|
|
uint32_t timeout,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsIProxyInfo *next,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aResolveFlags,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsIProxyInfo **result);
|
2000-04-22 04:35:05 +04:00
|
|
|
|
2005-03-25 06:41:33 +03:00
|
|
|
/**
|
|
|
|
* This method is an internal version of Resolve that does not query PAC.
|
|
|
|
* It performs all of the built-in processing, and reports back to the
|
|
|
|
* caller with either the proxy info result or a flag to instruct the
|
|
|
|
* caller to use PAC instead.
|
|
|
|
*
|
2015-01-21 23:13:00 +03:00
|
|
|
* @param channel
|
|
|
|
* The channel to test.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param info
|
|
|
|
* Information about the URI's protocol.
|
2010-06-17 22:33:42 +04:00
|
|
|
* @param flags
|
|
|
|
* The flags passed to either the resolve or the asyncResolve method.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param usePAC
|
|
|
|
* If this flag is set upon return, then PAC should be queried to
|
|
|
|
* resolve the proxy info.
|
|
|
|
* @param result
|
|
|
|
* The resulting proxy info or null.
|
|
|
|
*/
|
2015-01-21 23:13:00 +03:00
|
|
|
nsresult Resolve_Internal(nsIChannel *channel,
|
2015-03-26 10:11:05 +03:00
|
|
|
const nsProtocolInfo &info,
|
|
|
|
uint32_t flags,
|
|
|
|
bool *usePAC,
|
|
|
|
nsIProxyInfo **result);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method applies the registered filters to the given proxy info
|
|
|
|
* list, and returns a possibly modified list.
|
|
|
|
*
|
2015-01-21 23:13:00 +03:00
|
|
|
* @param channel
|
|
|
|
* The channel corresponding to this proxy info list.
|
2005-03-25 06:41:33 +03:00
|
|
|
* @param info
|
|
|
|
* Information about the URI's protocol.
|
|
|
|
* @param proxyInfo
|
|
|
|
* The proxy info list to be modified. This is an inout param.
|
|
|
|
*/
|
2015-01-21 23:13:00 +03:00
|
|
|
void ApplyFilters(nsIChannel *channel, const nsProtocolInfo &info,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsIProxyInfo **proxyInfo);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is a simple wrapper around ApplyFilters that takes the
|
|
|
|
* proxy info list inout param as a nsCOMPtr.
|
|
|
|
*/
|
2015-01-21 23:13:00 +03:00
|
|
|
inline void ApplyFilters(nsIChannel *channel, const nsProtocolInfo &info,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsCOMPtr<nsIProxyInfo> &proxyInfo)
|
|
|
|
{
|
2012-07-30 18:20:58 +04:00
|
|
|
nsIProxyInfo *pi = nullptr;
|
2005-03-25 06:41:33 +03:00
|
|
|
proxyInfo.swap(pi);
|
2015-01-21 23:13:00 +03:00
|
|
|
ApplyFilters(channel, info, &pi);
|
2005-03-25 06:41:33 +03:00
|
|
|
proxyInfo.swap(pi);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method prunes out disabled and disallowed proxies from a given
|
|
|
|
* proxy info list.
|
|
|
|
*
|
|
|
|
* @param info
|
|
|
|
* Information about the URI's protocol.
|
|
|
|
* @param proxyInfo
|
|
|
|
* The proxy info list to be modified. This is an inout param.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void PruneProxyInfo(const nsProtocolInfo &info,
|
2005-03-25 06:41:33 +03:00
|
|
|
nsIProxyInfo **proxyInfo);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method populates mHostFiltersArray from the given string.
|
|
|
|
*
|
|
|
|
* @param hostFilters
|
|
|
|
* A "no-proxy-for" exclusion list.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void LoadHostFilters(const char *hostFilters);
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method checks the given URI against mHostFiltersArray.
|
|
|
|
*
|
|
|
|
* @param uri
|
|
|
|
* The URI to test.
|
|
|
|
* @param defaultPort
|
|
|
|
* The default port for the given URI.
|
|
|
|
*
|
|
|
|
* @return True if the URI can use the specified proxy.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
bool CanUseProxy(nsIURI *uri, int32_t defaultPort);
|
2003-04-11 22:24:55 +04:00
|
|
|
|
2012-09-15 00:27:46 +04:00
|
|
|
/**
|
|
|
|
* Disable Prefetch in the DNS service if a proxy is in use.
|
|
|
|
*
|
|
|
|
* @param aProxy
|
|
|
|
* The proxy information
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
void MaybeDisableDNSPrefetch(nsIProxyInfo *aProxy);
|
2012-09-15 00:27:46 +04:00
|
|
|
|
2012-09-15 00:27:46 +04:00
|
|
|
private:
|
|
|
|
nsresult SetupPACThread();
|
|
|
|
nsresult ResetPACThread();
|
2014-09-05 17:29:00 +04:00
|
|
|
nsresult ReloadNetworkPAC();
|
2012-09-15 00:27:46 +04:00
|
|
|
|
2004-04-20 01:59:26 +04:00
|
|
|
public:
|
|
|
|
// The Sun Forte compiler and others implement older versions of the
|
|
|
|
// C++ standard's rules on access and nested classes. These structs
|
|
|
|
// need to be public in order to deal with those compilers.
|
|
|
|
|
2004-04-16 09:46:27 +04:00
|
|
|
struct HostInfoIP {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint16_t family;
|
|
|
|
uint16_t mask_len;
|
2004-04-16 09:46:27 +04:00
|
|
|
PRIPv6Addr addr; // possibly IPv4-mapped address
|
|
|
|
};
|
|
|
|
|
|
|
|
struct HostInfoName {
|
|
|
|
char *host;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t host_len;
|
2004-04-16 09:46:27 +04:00
|
|
|
};
|
|
|
|
|
2009-05-07 01:26:33 +04:00
|
|
|
protected:
|
|
|
|
|
2000-04-22 04:35:05 +04:00
|
|
|
// simplified array of filters defined by this struct
|
2003-04-11 22:24:55 +04:00
|
|
|
struct HostInfo {
|
2011-09-29 10:19:26 +04:00
|
|
|
bool is_ipaddr;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t port;
|
2003-04-11 22:24:55 +04:00
|
|
|
union {
|
2004-04-16 09:46:27 +04:00
|
|
|
HostInfoIP ip;
|
|
|
|
HostInfoName name;
|
2003-04-11 22:24:55 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
HostInfo()
|
2011-10-17 18:59:28 +04:00
|
|
|
: is_ipaddr(false)
|
2016-05-30 16:39:00 +03:00
|
|
|
, port(0)
|
2003-04-11 22:24:55 +04:00
|
|
|
{ /* other members intentionally uninitialized */ }
|
|
|
|
~HostInfo() {
|
|
|
|
if (!is_ipaddr && name.host)
|
2015-03-27 03:01:12 +03:00
|
|
|
free(name.host);
|
2003-04-11 22:24:55 +04:00
|
|
|
}
|
2000-04-22 04:35:05 +04:00
|
|
|
};
|
|
|
|
|
2015-01-21 23:13:00 +03:00
|
|
|
// An instance of this struct is allocated for each registered
|
|
|
|
// nsIProtocolProxyFilter and each nsIProtocolProxyChannelFilter.
|
2005-03-25 06:41:33 +03:00
|
|
|
struct FilterLink {
|
|
|
|
struct FilterLink *next;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t position;
|
2015-01-21 23:13:00 +03:00
|
|
|
nsCOMPtr<nsIProtocolProxyFilter> filter;
|
|
|
|
nsCOMPtr<nsIProtocolProxyChannelFilter> channelFilter;
|
2012-08-22 19:56:38 +04:00
|
|
|
FilterLink(uint32_t p, nsIProtocolProxyFilter *f)
|
2015-01-21 23:13:00 +03:00
|
|
|
: next(nullptr), position(p), filter(f), channelFilter(nullptr) {}
|
|
|
|
FilterLink(uint32_t p, nsIProtocolProxyChannelFilter *cf)
|
|
|
|
: next(nullptr), position(p), filter(nullptr), channelFilter(cf) {}
|
2005-03-25 06:41:33 +03:00
|
|
|
// Chain deletion to simplify cleaning up the filter links
|
|
|
|
~FilterLink() { if (next) delete next; }
|
|
|
|
};
|
|
|
|
|
2015-01-21 23:13:00 +03:00
|
|
|
private:
|
|
|
|
// Private methods to insert and remove FilterLinks from the FilterLink chain.
|
|
|
|
nsresult InsertFilterLink(FilterLink *link, uint32_t position);
|
|
|
|
nsresult RemoveFilterLink(nsISupports *givenObject);
|
|
|
|
|
|
|
|
protected:
|
2011-09-21 23:13:45 +04:00
|
|
|
// Indicates if local hosts (plain hostnames, no dots) should use the proxy
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mFilterLocalHosts;
|
2011-09-21 23:13:45 +04:00
|
|
|
|
2005-03-25 06:41:33 +03:00
|
|
|
// Holds an array of HostInfo objects
|
2009-02-23 04:05:28 +03:00
|
|
|
nsTArray<nsAutoPtr<HostInfo> > mHostFiltersArray;
|
2005-03-25 06:41:33 +03:00
|
|
|
|
|
|
|
// Points to the start of a sorted by position, singly linked list
|
|
|
|
// of FilterLink objects.
|
|
|
|
FilterLink *mFilters;
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t mProxyConfig;
|
2000-02-14 13:04:56 +03:00
|
|
|
|
2004-07-02 03:31:47 +04:00
|
|
|
nsCString mHTTPProxyHost;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mHTTPProxyPort;
|
2000-02-14 13:04:56 +03:00
|
|
|
|
2004-07-02 03:31:47 +04:00
|
|
|
nsCString mFTPProxyHost;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mFTPProxyPort;
|
2000-04-22 04:35:05 +04:00
|
|
|
|
2004-07-02 03:31:47 +04:00
|
|
|
nsCString mHTTPSProxyHost;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mHTTPSProxyPort;
|
2016-06-30 06:23:40 +03:00
|
|
|
|
2016-09-01 10:48:39 +03:00
|
|
|
// mSOCKSProxyTarget could be a host, a domain socket path,
|
|
|
|
// or a named-pipe name.
|
2016-06-30 06:23:40 +03:00
|
|
|
nsCString mSOCKSProxyTarget;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mSOCKSProxyPort;
|
|
|
|
int32_t mSOCKSProxyVersion;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mSOCKSProxyRemoteDNS;
|
2014-05-20 00:29:46 +04:00
|
|
|
bool mProxyOverTLS;
|
2001-04-17 06:34:47 +04:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsPACMan> mPACMan; // non-null if we are using PAC
|
2008-01-29 21:38:15 +03:00
|
|
|
nsCOMPtr<nsISystemProxySettings> mSystemProxySettings;
|
2004-07-02 03:31:47 +04:00
|
|
|
|
|
|
|
PRTime mSessionStart;
|
|
|
|
nsFailedProxyTable mFailedProxies;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mFailedProxyTimeout;
|
2013-06-28 01:02:04 +04:00
|
|
|
|
|
|
|
private:
|
2015-01-21 23:13:00 +03:00
|
|
|
nsresult AsyncResolveInternal(nsIChannel *channel, uint32_t flags,
|
2013-06-28 01:02:04 +04:00
|
|
|
nsIProtocolProxyCallback *callback,
|
|
|
|
nsICancelable **result,
|
|
|
|
bool isSyncOK);
|
|
|
|
|
2000-02-14 13:04:56 +03:00
|
|
|
};
|
|
|
|
|
2015-01-21 23:13:00 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsProtocolProxyService, NS_PROTOCOL_PROXY_SERVICE_IMPL_CID)
|
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2003-04-11 22:24:55 +04:00
|
|
|
#endif // !nsProtocolProxyService_h__
|