nsIProxyAutoConfig
| IID: | a42619df-0a1c-46fb-8154-0e9b8f8f1ea8 |
| Inherits From: | nsISupports |
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.
- Gagan Saksena 04/23/00
Methods
ACString getProxyForURI ( ACString testURI , ACString testHost )
void init ( ACString PACURI , AString PACScript )
ACString getProxyForURI ( ACString testURI , ACString testHost )
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 =
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.
- Arguments:
- testURI: The URI as an ASCII string to test.
- testHost: The ASCII hostname to test.
- Returns:
- PAC result string as defined above.
void init ( ACString PACURI , AString PACScript )
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.
- Arguments:
- PACURI: URI used to fetch the PAC script. This is needed for properly constructing the JS sandbox used to evaluate the PAC script.
- PACScript: Javascript program text.
Reference documentation is generated from Mozilla's source.
