tags:

views:

76

answers:

2

Is it possible to detect and get proxy server name and port in javascript?

+1  A: 

No. The browser proxy settings are not available from JavaScript running in a web page.

Maybe. The browser proxy settings may be available (in some web browsers) from JavaScript running with elevated permissions (for example, a Firefox add-on).

Grant Wagner
I like your "Maybe". +1.
Chris W. Rea
A: 

For what it's worth: While you're asking about JavaScript, getting access to the browser proxy settings even from any kind of browser plug-in such as a Flash or Java applet is also not possible, or at the very least not in any reliable or compliant way.

I mention this only because sometimes such plug-ins provide viable workarounds when JavaScript can't do something ... but here I think you are S.O.L.

Perhaps you could tell us a little bit more about what you are trying to accomplish? Maybe there's another way to address your needs.

Chris W. Rea
I am also really curious as to why would you even want to detect that..
shylent
Here is the more information :I've a dll that exports a function that takes proxy details and some other data as parameters,when this function is called it uses proxy details and data passed to make connection.exported function can be called from native application or from javascript.native app is capable of detecting proxy and load the dll and calls the exported fnction.wondering how to detect the proxy and pass that to the function in dll.It is not allowed to change the dll's function.
Suresh
What environment is the JavaScript running in ... the browser, or elsewhere?
Chris W. Rea
Firefox Browser
Suresh