nsIProxyInfo.idl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. #include "nsISupports.idl"
  6. /**
  7. * This interface identifies a proxy server.
  8. */
  9. [scriptable, uuid(63fff172-2564-4138-96c6-3ae7d245fbed)]
  10. interface nsIProxyInfo : nsISupports
  11. {
  12. /**
  13. * This attribute specifies the hostname of the proxy server.
  14. */
  15. readonly attribute AUTF8String host;
  16. /**
  17. * This attribute specifies the port number of the proxy server.
  18. */
  19. readonly attribute long port;
  20. /**
  21. * This attribute specifies the type of the proxy server as an ASCII string.
  22. *
  23. * Some special values for this attribute include (but are not limited to)
  24. * the following:
  25. * "http" HTTP proxy (or SSL CONNECT for HTTPS)
  26. * "https" HTTP proxying over TLS connection to proxy
  27. * "socks" SOCKS v5 proxy
  28. * "socks4" SOCKS v4 proxy
  29. * "direct" no proxy
  30. * "unknown" unknown proxy (see nsIProtocolProxyService::resolve)
  31. *
  32. * A future version of this interface may define additional types.
  33. */
  34. readonly attribute ACString type;
  35. /**
  36. * This attribute specifies flags that modify the proxy type. The value of
  37. * this attribute is the bit-wise combination of the Proxy Flags defined
  38. * below. Any undefined bits are reserved for future use.
  39. */
  40. readonly attribute unsigned long flags;
  41. /**
  42. * This attribute specifies flags that were used by nsIProxyProtocolService when
  43. * creating this ProxyInfo element.
  44. */
  45. readonly attribute unsigned long resolveFlags;
  46. /**
  47. * Specifies a proxy username.
  48. */
  49. readonly attribute ACString username;
  50. /**
  51. * Specifies a proxy password.
  52. */
  53. readonly attribute ACString password;
  54. /**
  55. * This attribute specifies the failover timeout in seconds for this proxy.
  56. * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
  57. * getFailoverForProxy, then the failed proxy will not be used again for this
  58. * many seconds.
  59. */
  60. readonly attribute unsigned long failoverTimeout;
  61. /**
  62. * This attribute specifies the proxy to failover to when this proxy fails.
  63. */
  64. attribute nsIProxyInfo failoverProxy;
  65. /****************************************************************************
  66. * The following "Proxy Flags" may be bit-wise combined to construct the
  67. * flags attribute defined on this interface. All unspecified bits are
  68. * reserved for future use.
  69. */
  70. /**
  71. * This flag is set if the proxy is to perform name resolution itself. If
  72. * this is the case, the hostname is used in some fashion, and we shouldn't
  73. * do any form of DNS lookup ourselves.
  74. */
  75. const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;
  76. };