Hi Umesh,
Thanks for your answer.
Using the below code i am able to get the proxyinfo object, is it
possible to get host and port with this.
Thanks & Regards,
Raghavan
Umesh Bywar wrote:
Yes. It is possible. See the following snippet of JS code
var proxyService =
Components.classes["@mozilla.org/network/protocol-proxy-service;1"].getService(Components.interfaces.nsIProtocolProxyService);
var proxyInfo;
try {
var ios =
Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ios.newURI(URL,null,null);
proxyInfo = proxyService.examineForProxy(uri);
}
catch(ee) {
proxyInfo = null;
}
Regards,
Umesh.
----- Original Message ----- From: "Srinivasa Raghavan"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, September 22, 2005 8:36 PM
Subject: Get Proxy for the given URL
Dear All,
I am developing a extension where i need to open a socket to a
destination server host which is an internet application.
If the client is behind the firewall , i need to contact the proxy
server to establish the connection to the destination server.
Is it possible to get the proxy server and port for the given url
using javascript / C++ ?
Please let me know the details.
Thanks & Regards,
Raghavan
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom