Proxy writeup

Proxy writeup - ECE 14:332:456 Spring 2012 Assignment 2 A...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 14:332:456, Spring 2012 Assignment 2: A Basic Sequential Web Proxy 1. Introduction A web proxy is a program that acts as a middleman between a web server and browser. Instead of contacting the server directly to get a web page, the browser contacts the proxy, which forwards the request on to the server. When the server replies to the proxy, the proxy sends the reply on to the browser. Proxies are used for many purposes. Sometimes proxies are used in firewalls, such that the proxy is the only way for a browser inside the firewall to contact a server outside. The proxy may do translation on the page, for instance, to make it viewable on a web-enabled cell phone. In this assignment, you will write a basic sequential web proxy. You will set up the proxy to accept a request, forward the request to the server, and return the result back to the browser, keeping a log of such requests in a disk file. In this part, you will learn how to write programs that interact with each other over a network (socket programming), as well as some basic HTTP. 2. Handout Instruction Start by downloading proxy-handout.tar from Sakai to a directory in which you plan to do your work. The tar file is a file archive that can be extracted on UNIX machines with the command tar xvf proxy-handout.tar This will cause a number of files to be unpacked in the directory. The three files you will be modifying and turning in are proxy.c, csapp.c, and csapp.h. You may add any files you wish to this directory as you will be submitting the entire directory (Make sure you update the Makefile as you add any new files). The proxy.c file should eventually contain the bulk of the logic for your proxy. The csapp.c and csapp.h files are described in your textbook. The csapp.c file contains error handling wrappers and helper functions such as the RIO functions, the open clientfd function, and the open listenfd function. It is not mandatory to use the helper functions in csapp.c. You can write yours if you feel so. Include in your report if you make any changes in the csapp.h and/or csapp.c file. 3.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Proxy writeup - ECE 14:332:456 Spring 2012 Assignment 2 A...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online