views:

119

answers:

1

the following is the code for seting proxy on server side.

# System.setProperty("http.proxyHost", "220.134.110.231");  
# System.setProperty("http.proxyPort", "80");

I want to achieve the same thing on clint side. Means the people visit my webpage (it will contain some javascript/applet). so my applet /javascript code should do this work for me MEans whatever data the javascript /applet is trying to download showd go throught a proxy

+1  A: 

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.

What you would need to do, is rethink your approach.

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?

voyager