Thanks for Christian's help. It works with your suggested way.

have a good day!
John

"John" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
> I am using following pac file. Ironically, when the host is in 10.30. 0.0
it
> return nothing. When goes out of the domain, it return s 10.20.1.10:3128.
> The result is just opposte to my expectation. Here is my javascript for
> interpret pac file. Is there something wrong with my code snippet or it's
> well known bug in firefox?
>
> Thanks very much for help!
>
> John
> --------------------------------------------------------------------------
--
> --
> /* PAC file*/
> /** If the target URL is in 10.30.0.0/16 use a proxy else go direct */
> function FindProxyForURL(url, host)
> {
> if (isInNet(host, "10.30.0.0","255.255.0.0"))
>   {
>    return "PROXY 10.20.1.10:3128";
>   }
>  }
>  /* here is signed Javascript code */
> var
>
URI=Components.classes["@mozilla.org/network/standard-url;1"].getService(Com
> ponents.interfaces.nsIURI);
> var
>
ProxyAutoConfig=Components.classes["@mozilla.org/network/proxy-auto-config;1
> "].getService Components.interfaces.nsIProxyAutoConfig);
> var proxyPac=ProxyAutoConfig.getProxyForURI(URI);
> alert(proxyPac);
>
>
>


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to