File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes How does a proxy work!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How does a proxy work!!!!" Watch "How does a proxy work!!!!" New topic

How does a proxy work!!!!

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have following doubt regarding proxy... I have a applet which gets data from a server (which is a http server) listening port other than 80 (which is the http default one) Now through applet I connect to the server using URL.openConnection() & the url is say "". Now question is how does proxy work!!! Now say that a person is sitting behind the proxy & http port on proxy is registered as 8080... Now I am able to get the data in the servlet. But I am in a delima how does the proxy work then?? When I make conection through applet the browser understands that the request is "http" now irrespective of what port I specify!!! Now the request comes to the proxy on port 8080 (since the browser has been configured to 8080 port on proxy for any http request). Now the proxy understands that the request is for http server but the server is listening on port other than 80.. so gets the data from teh server & servers its clients. Well I know that proxy can be configured in a way where in data from any other port won't will be accepted other than the default ports. Am I on correct path??? What ever I am thinking is correct???. If any body would like to add anything to my comments pls feel free. Thanx in advance.
I agree. Here's the link:
subject: How does a proxy work!!!!
It's not a secret anymore!