且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 JavaScript 中设置代理

更新时间:2023-09-18 17:20:28

单独使用 javascript 无法做到这一点.

You won't be able to do that with javascript alone.

如果浏览器允许这种行为,您只需访问受感染的页面即可在未经您同意的情况下设置代理.想想即时跟踪和大量安全蠕虫.

If browsers allowed that behavior you'd only need to visit a compromised page to have a proxy set without your consent. Think instant tracking and a huge can of security worms.

您需要做的是重新考虑您的方法.

为什么需要通过代理下载视频/flash/什么的?可能你需要的不是http proxy?你想完成什么?

Why does it need to download the video/flash/whatever through a proxy? May be you need is not a http proxy? What are you trying to accomplish?