next up previous
Next: A little comparison shopping Up: Assignment 3: The Socket Previous: Java Sockets

A proxy server

A proxy server is a server that acts as an intermediate between a client and a server. Instead of connecting directly to the server, the client connect to the proxy. The proxy forwards requests from the client to the server and then forwards the replies from the server back to the client.

In the real world, proxy servers are useful for privacy (the client needn't know who the server is and vice versa) and security (the proxy might sit outside a firewall and provide carefully controlled and monitored access to the things inside the firewall).

For this assignment, the proxy server will just be silly.

  1. Using the code you have as a template, write a proxy server. You might want the proxy server to listen to a different port number, so that the proxy server and the real server can run on the same machine.
  2. Test your program by starting the real server, then the proxy server, then the client. The behavior seen by the server and the client should be exactly the same; you should not have to make any changes to either (except changing the port number the client connects to).

SUGGESTION: Debugging distributed programs like this is hard. The more time you spend planning and desk-checking your program, the less time this assignment will take.



Allen Downey
Tue Sep 12 11:58:47 EDT 2000