My server, server.example, isn't accessible from the Internet. However, there's an accessible HTTP proxy, proxy.example, that can talk to the server.
If users configure their browser to go through proxy.example for *.example, or use a proxy autoconfig file I supply, they can access the server (after authenticating with the proxy). I want to avoid making them go through this manual process.
Is it possible to do this programmatically? The JavaScript will be served from an Internet-accessible www.example site, so there doesn't seem to be a security issue which would make this impossible in principle.
My constraint is that proxy.example is an HTTP proxy and I cannot touch it. I only control server.example and www.example, and my web app can only be run on server.example.
My server, server.example., isn't accessible from the Internet. However, there's an accessible HTTP proxy, proxy.example., that can talk to the server.
If users configure their browser to go through proxy.example. for *.example., or use a proxy autoconfig file I supply, they can access the server (after authenticating with the proxy). I want to avoid making them go through this manual process.
Is it possible to do this programmatically? The JavaScript will be served from an Internet-accessible www.example. site, so there doesn't seem to be a security issue which would make this impossible in principle.
My constraint is that proxy.example. is an HTTP proxy and I cannot touch it. I only control server.example. and www.example., and my web app can only be run on server.example..
Share Improve this question asked Aug 8, 2011 at 20:54 Adam MorrisonAdam Morrison 2063 silver badges8 bronze badges2 Answers
Reset to default 6No, but...
This is not possible in the way you asked it. However, the same can be acplished by using an iframe that opens an address of an URL chaining proxy. In your example, you have to call the following address (if your proxy allows URL chaining)
http://proxy.example./http://server.example.
i hope that helps.
cheers, michael
No, you cannot set the proxy by Javascript.
there doesn't seem to be a security issue
Arbitrary Javascript altering browser settings IS a security issue.