Implement a real-world application of http

Assignment Help Computer Network Security
Reference no: EM131434825

Computer Networks Assignment Laboratory: Web Proxy Server

I. Outline

Note that you are neither required to follow these steps nor required to use the skeleton code [link]. In the skeleton code, the missing parts that require your implementation is marked with a comment /********TO BE IMPLEMENTED********/. Please feel free to modify the helper classes if you prefer.

1. Run the client program ( client.h/cc) and understand the usage of the helper classes. Refer to .h files for function definitions and their purposes. Refer to .cc files for implementations. More information can be found in Section 4.

2. Complete the missing part of proxy.cc. Create a TCP socket to accept connection. For TCPSocket class, please use try/catch to capture exceptions. You can find samples in client program. Refer to Section 12 for logs.

3. Complete the five functions that has missing part in ProxyWorker.cc, in the following order, getRequest, checkRequest, forwardRequest, getResponse, and returnResponse. More details can be found in Section 8.

4. In getResponse, complete identify/default transfer encoding before working on chun- ked transfer encoding (Section 4). Refer to client program for more details.

5. Work on keyword filtering. Note that one requirement is filtering the hostname and the other is filtering the path. (Section 8).

6. Work on subliminal messages (Section 5).

7. Try your proxy with real browsers (not required).

II. Goals

Apply your knowledge of socket programming in order to implement a real-world application and gain some basic understanding of HTTP.

III. Overview

In this lab, you will implement a simple proxy server for HTTP that forwards requests from clients to end servers and returns responses from end servers to the clients. You will also implement a special function that inserts subliminal messages between HTTP web pages.

IV. Guidelines

Working alone or in pairs. You may work on this assignment individually or in pairs (not in groups of 3 or more, however). If you prefer to work in a pair, both students must submit a copy of the solution and identify their MSU NetID in a README file. If you prefer to work individually, please clearly state that you are working individually and include your MSU NetID in the README file.

Programming Language. You must implement this project using C++. The skeleton code is written in C++. Please clearly state the command to compile your project submission in your README file.

Testing your code. Each Linux distribution might be slightly different. It is the students' responsibility to make sure that the lab submissions compile on at least one of the following machines in 3353 EB: carl, ned, marge, mcclure, apu, krusty, rod or skinner. A statement must be provided in the README file's header. You will not be awarded any credit if your lab submission does not compile on any of those machines.

V. Specification

In this lab, you are required to implement a proxy that forwards GET requests from a client to the server and returns the responses from the server back to the client. The port for

listening to incoming request is assigned by the operating system. This lab addresses only non-persistent connections. The proxy is expected to be able to handle multiple requests by spawning a separate thread to handle each request. Both default (identity) encoding and chunked transfer encoding must be handled by this proxy. The requirement of the proxy is listed as follows.

Subliminal messages: The proxy needs to insert subliminal message webpages for HTTP requests where the target webpages has a filename extension of either .html or .htm. A supporting function HTTPRequest::isHtml is also provided for this purpose. A support- ing function ProxyWorker::subliminalResponse is provided to generate the subliminal response. Set the message duration to 0 will makes the response to flash and act like a subliminal message.

Modify Server field in the response header: To help with debugging, you are re- quired to add/modify a field in the response header, saying that this response is returned by your proxy. Specifically, you are required to add (or modify) the field Server with a string, such as your MSU NetID, showing the header has been modified. The method HTTPResponse::setHeaderField is able to do this.

Host not found: The proxy is expected to respond with error messages to bad requests. For a request that tries to download an object from a host that does not exist, the proxy returns a 404 Not Found response. As long as the end server exists, it is the responsibility of the server, not the proxy, to determine whether or not the requested web object exists. The proxy simply forwards the request and returns the response. A supporting function ProxyWorker::proxyResponse is provided for you to create response when error occurs.

Filtering: The proxy is expected to perform simple filtering.

1. The proxy rejects any request to a host containing the keyword "umich.edu" but allows requests where the file path contains the "umich.edu" keyword. The proxy returns a 403 Forbidden response for the former request. For example, the proxy shoud reject a request to https://umich.edu, but should forward to the server a request for
https://www.cse.msu.edu/~liuchinj/cse422ss17/lab2 files/umich.html

2. The proxy redirects any request to a path containing the keyword "harbaugh" to
https://www.cse.msu.edu/~liuchinj/cse422ss17/lab2 files/whoa.html

You can operate on the host and path information in the request using the supporting func- tions HTTPRequest::getHost, HTTPRequest::getPath, HTTPRequest::setHost and HTTPRequest::setPath before forwarding the request to the server. Alternatively, your proxy can also create a response that gives the client the Webpage you want using HTTPResponse class and replies the new response to the client without contacting the actual server.

Transfer Encoding: The proxy is required to handle both default transfer encoding and chunked transfer encoding. For default transfer encoding, the proxy is required to display (print to the console) the content length. For chunked transfer encoding, the proxy is required to display (print to the console) the length of each chunk.

Attachment:- Attachments.rar

Reference no: EM131434825

Questions Cloud

What should be the fair price of this asset today : a) What should be the fair price of this asset today? b) Suppose the price of this asset today equals $4. Is there anything you could do to make arbitrage money? Show formally the arbitrage strategy.
Describe a communication skill or interpersonal relationship : This assignment will take the entire term to complete and will be graded in the following three stages: First, you will select and describe a communication skill or interpersonal relationship you would like to improve (1-2 pages). Second, you wi..
Company that its default risk premium : You told the company that its default risk premium is 3%, the liquidity premium is 0.5%, the maturity risk premium is 1.0%, the rate on a 10 year government bond is 3.5% and inflation is expected to be 4% next year. What should the compny expect t..
Health care and the health care manager : Explain what impact the federal and state government in health care have on health care and the health care manager.
Implement a real-world application of http : CSE422-Apply your knowledge of socket programming in order to implement a real-world application and gain some basic understanding of HTTP.
What are the advantages of each type of survey : If you decided to do a survey, why, or under what conditions, would you choose to do a self-administered questionnaire as opposed to a face-to-face interview with subjects, a telephone survey, or an email survey? What are the advantages and disadv..
Devise an appropriate organogram for the company : CIS013-6 Develop an appropriate set of business objectives that incorporate the new online ordering system and outline the overall direction of the business over the next five years
Assumption of global macro economy : 1. What's your assumption of global macro economy in 2017? 2. How do you allocate your investment in different kinds of products this year? (please describe as detailed as you can, e.g. percentage of all products, durations, heding tools size(if ..
Forward price and initial value of forward contract : A stock is expected to pay a dividend of $1 per share in two months and in five months. The stock price is $50, and the risk-free rate of interest is 8% per annum with continuous compounding for all maturities. An investor has just taken a short p..

Reviews

Write a Review

Computer Network Security Questions & Answers

  Assignment on cryptographic systems

The Week 10 Critical Thinking assignment continues with the scenario set up for the Critical Thinking assignment in Week 8. You have been hired as the chief officer of information technology at a retail store in Medina City. The store has 5000 cus..

  Discuss fisma and its relevance to cybersecurity

Discuss FISMA and its relevance to cybersecurity. Define the terms below and describe the environment in which each access control model works best.

  Disadvantages of your remote access solution

Describe the advantages and disadvantages of your remote access solution. Describe the network protocols that will be used on your suggested network.

  What is the total number of public key

An organization has 100 members. It is desired that each member of the organization be able to communicate securely with any other member, without any other member being able to decrypt their messages.

  What is cyber security and what are some of its key concept

What is cyber security, and what are some of its key concepts? What are the most significant threats to your data, and what are some of the root causes of those threats

  How will ids and passwords be properly maintained?

How will IDs and passwords be properly maintained?

  Explain how would you apply operation security opsec

network security-operation security in a corporation - word count 200how would you apply operation security opsec

  Develop skills to independently think of a situation

The purpose of this assignment is to develop skills to independently think of a situation and Apply skills to analyze complex problems in network security under supervision.

  Discuss how this and other information security

write a 1400- to 2100-word paper that describes the security authentication process.discuss how this and other

  What is the correct command syntax to force gpo settings

What is the correct command syntax to force GPO settings? Why is it important to set a strict password policy as part of your security template?

  What is the decrypted plaintext

A 1,024-bit message is used to generate a 24-bit hash. On the average, how many other messages could be expected to generate the same hash value? What is the probability that two massages that generate the same 24-bit hash?

  Primary steps to database design

We explored the 2-primary steps to database design - conceptual design and physical design. We discussed importance of having representatives from all key stakeholders in conceptual design to ensure accuracy of the design.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd