netwerk/base/public/nsIProxyInfo.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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"
     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;
    19   /**
    20    * This attribute specifies the port number of the proxy server.
    21    */
    22   readonly attribute long port;
    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    *   "socks"    SOCKS v5 proxy
    31    *   "socks4"   SOCKS v4 proxy
    32    *   "direct"   no proxy
    33    *   "unknown"  unknown proxy (see nsIProtocolProxyService::resolve)
    34    *
    35    * A future version of this interface may define additional types.
    36    */
    37   readonly attribute ACString type; 
    39   /**
    40    * This attribute specifies flags that modify the proxy type.  The value of
    41    * this attribute is the bit-wise combination of the Proxy Flags defined
    42    * below.  Any undefined bits are reserved for future use.
    43    */
    44   readonly attribute unsigned long flags;
    46   /**
    47    * This attribute specifies flags that were used by nsIProxyProtocolService when
    48    * creating this ProxyInfo element. 
    49    */
    50   readonly attribute unsigned long resolveFlags;
    52   /**
    53    * Specifies a SOCKS5 username.
    54    */
    55   readonly attribute ACString username;
    57   /**
    58    * Specifies a SOCKS5 password.
    59    */
    60   readonly attribute ACString password;
    62   /**
    63    * This attribute specifies the failover timeout in seconds for this proxy.
    64    * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
    65    * getFailoverForProxy, then the failed proxy will not be used again for this
    66    * many seconds.
    67    */
    68   readonly attribute unsigned long failoverTimeout;
    70   /**
    71    * This attribute specifies the proxy to failover to when this proxy fails.
    72    */
    73   attribute nsIProxyInfo failoverProxy;
    76   /****************************************************************************
    77    * The following "Proxy Flags" may be bit-wise combined to construct the
    78    * flags attribute defined on this interface.  All unspecified bits are
    79    * reserved for future use.
    80    */
    82   /**
    83    * This flag is set if the proxy is to perform name resolution itself.  If
    84    * this is the case, the hostname is used in some fashion, and we shouldn't
    85    * do any form of DNS lookup ourselves.
    86    */
    87   const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;
    88 };

mercurial