nsIProxyInfo 编辑

This interface identifies a proxy server.

netwerk/base/public/nsIProxyInfo.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Inherits from: nsISupports

Attributes

AttributeTypeDescription
failoverProxynsIProxyInfoThis attribute specifies the proxy to failover to when this proxy fails.
failoverTimeoutunsigned longThis attribute specifies the failover timeout in seconds for this proxy. If a nsIProxyInfo is reported as failed via nsIProtocolProxyService.getFailoverForProxy(), then the failed proxy will not be used again for this many seconds. Read only.
flagsunsigned longThis attribute specifies flags that modify the proxy type. The value of this attribute is the bit-wise combination of the Proxy Flags defined below. Any undefined bits are reserved for future use. Read only.
hostAUTF8StringThis attribute specifies the hostname of the proxy server. Read only. Note:  Prior to Gecko 1.8 host was available by the host method.
nextnsIProxyInfoProxy info objects may be chained if several proxies could be treated equivalently. This is used to support proxy failover. Read only. Obsolete since Gecko 1.8
portlongThis attribute specifies the port number of the proxy server. Read only. Note:  Prior to Gecko 1.8 port was available by the port method.
typeACString

This attribute specifies the type of the proxy server as a case insensitive ASCII string.

Some special values for this attribute include (but are not limited to) the following:

  • "http" - HTTP proxy (or SSL CONNECT for HTTPS)
  • "socks" - SOCKS v5 proxy
  • "socks4" - SOCKS v4 proxy
  • "direct" - no proxy
  • "unknown" - unknown proxy (see nsIProtocolProxyService.resolve())
A future version of this interface may define additional types. Read only. Note: Prior to Gecko 1.8 type was available by the type method.

Constants

The following "Proxy Flags" may be bit-wise combined to construct the flags attribute defined on this interface. All unspecified bits are reserved for future use.

ConstantValueDescription
TRANSPARENT_PROXY_RESOLVES_HOST1 << 0This flag is set if the proxy is to perform name resolution itself. If this is the case, the hostname is used in some fashion, and we shouldn't do any form of DNS lookup ourselves.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:58 次

字数:5279

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文