admin 管理员组文章数量: 1086019
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.
本文标签: Can client JavaScript use its own HTTP proxyStack Overflow
版权声明:本文标题:Can client JavaScript use its own HTTP proxy? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744068005a2527965.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论