程序代写接单-COMP3310 2022 - Assignment 2: An annoying web-proxy

COMP3310 2022 - Assignment 2: An annoying web-proxy Background: • This assignment is worth 15% of the final mark • It is due by 23:55 Friday 22 April AEST - note: CANBERRA TIME (gmt+10) • Late submissions will not be accepted, except in special circumstances o Extensionsmustberequestedasearlyaspossiblebeforetheduedate,viathecourse convenor, with suitable evidence or justification. • If you would like feedback on particular aspects of your submission, please note that in the README file within your submission. This is a coding assignment, to enhance and check your network programming skills. The main focus is on native socket programming, and your ability to understand and implement the key elements of an application protocol from its RFC specification. Assignment 2 outline A web-proxy is a simple web-client and web-server wrapped in a single application. It receives requests from one or more clients (web-browsers) for particular content URLs, and forwards them on to the intended server, then returns the result to your web-browser - in some form. How is this useful? • It can cache content, so the second and later clients to make the same request get a more rapid response, and free up network capacity. • It can filter content, to ensure that content coming back is ‘safe’, e.g. for children or your home, or for staff/their computers inside an organisation. • It can filter requests, to ensure that people don’t access things they shouldn’t, for whatever policy reasons one might have. • It can listen to requests/responses and learn things, i.e. snoop on the traffic. Getting people to use your proxy though is a different challenge... o Andofcourseitcanlistentoandmodifyrequests/responses,forfunorprofit. For this assignment, you need to write a web proxy in C, Java or Python1, without the use of any external web/http-related libraries (html-parsing support is ok though). Your code MUST open sockets in the standard socket() API way, as per the tutorial exercises. Your code MUST make appropriate and correctly-formed HTTP/1.0 (RFC1945) or HTTP/1.1 enhanced requests (to a web-server, as a client) and responses (to a web-browser, as a server) on its own, and capture/interpret the results on its own in both directions. You will be handcrafting HTTP packets, so you’ll need to understand the structures of requests/responses and key HTTP headers. Wireshark will be helpful for debugging purposes. The most common trap is not getting your line-ending ‘\n\n’ right on requests, and this is rather OS and language-specific. Remember to be conservative in what you send and reasonably liberal in what you accept. 1 As most high-performance networking servers, and kernel networking modules, are written in C with other languages a distant second, it is worth learning it. But, time is short. If you want to use another language (outside

51作业君 51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: ITCSdaixie