Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIProxyAutoConfig Interface Reference

The nsIProxyAutoConfig interface is used for setting arbitrary proxy configurations based on the specified URL. More...

import "nsIProxyAutoConfig.idl";

Inheritance diagram for nsIProxyAutoConfig:
Inheritance graph
[legend]
Collaboration diagram for nsIProxyAutoConfig:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void init (in ACString aPACURI, in AString aPACScript)
 This method initializes the object.
ACString getProxyForURI (in ACString aTestURI, in ACString aTestHost)
 Get the proxy string for the specified URI.

Detailed Description

The nsIProxyAutoConfig interface is used for setting arbitrary proxy configurations based on the specified URL.

Note this interface wraps (at least in the implementation) the older hacks of proxy auto config.

Definition at line 54 of file nsIProxyAutoConfig.idl.


Member Function Documentation

ACString nsIProxyAutoConfig::getProxyForURI ( in ACString  aTestURI,
in ACString  aTestHost 
)

Get the proxy string for the specified URI.

The proxy string is given by the following:

result = proxy-spec *( proxy-sep proxy-spec ) proxy-spec = direct-type | proxy-type LWS proxy-host [":" proxy-port] direct-type = "DIRECT" proxy-type = "PROXY" | "SOCKS" | "SOCKS4" | "SOCKS5" proxy-sep = ";" LWS proxy-host = hostname | ipv4-address-literal proxy-port = <any 16-bit unsigned integer> LWS = *( SP | HT ) SP = <US-ASCII SP, space (32)> HT = <US-ASCII HT, horizontal-tab (9)>

NOTE: direct-type and proxy-type are case insensitive NOTE: SOCKS implies SOCKS4

Examples: "PROXY proxy1.foo.com:8080; PROXY proxy2.foo.com:8080; DIRECT" "SOCKS socksproxy" "DIRECT"

XXX add support for IPv6 address literals. XXX quote whatever the official standard is for PAC.

Parameters:
aTestURIThe URI as an ASCII string to test.
aTestHostThe ASCII hostname to test.
Returns:
PAC result string as defined above.
void nsIProxyAutoConfig::init ( in ACString  aPACURI,
in AString  aPACScript 
)

This method initializes the object.

This method may be called multiple times. If either parameter is an empty value, then the object is reset to its initial state.

Parameters:
aPACURIURI used to fetch the PAC script. This is needed for properly constructing the JS sandbox used to evaluate the PAC script.
aPACScriptJavascript program text.

The documentation for this interface was generated from the following file: