the proxy server basically works as the middle man between the web and the internet browser. you provide the IP and the port number of the machine that runs the proxy server to the internet browser like IE or mozilla, example: 192.168.xxx.xx or even localhost can do and its port number 1000.
now the browser, IE, will direct all the request to this machine. whatever the link is, even the hyperlink in the html page will be directed to this machine only. the proxy will connect to the web address given and returns back the page. the rules can be set in the proxy server to disable the client connecting to particular sites like porn or public mail sites.
working: the proxy server receives the request given by browser and creates a new
thread that takes care of this request. till this session is finished this thread can take care of this client. the proxy server is similar to a web server but only different being, proxy server forwards the link with the internet and fetch the page to the requester, where as the web server just serves you the request page in its system (plainly).
to design the proxy in
java we can use sockets. i suppose we can do it in the
servlets too. each session will be run as threads.
do develop in any other language like "C" or c++ the main process forks to create child processes for each sessions.
[ October 15, 2008: Message edited by: V Vijay Veeraraghavan ]
[ October 15, 2008: Message edited by: V Vijay Veeraraghavan ]