Create a proxy server that can be connected by a single client and would only al
ID: 3587122 • Letter: C
Question
Create a proxy server that can be connected by a single client and would only allow http requests. Requirements:
1. Create a C-based client-server architecture using sockets
2. The proxy server should be able to accept and service single client’s http requests
3. The proxy server should run on the cse01.cse.unt.edu server machine and the client should run on the cse02.cse.unt.edu server machine
Procedure:
1. Create a C-based server that can accept single client’s request using sockets.
2. The created proxy server should also be able to connect to the client requested website through port 80.
3. Make sure the proxy server runs on cse01.cse.unt.edu and the format to start the proxy server as follows
pserver <port_numer>
where pserver is the proxy server executable and port_number is the port number on which the proxy server listens.
4. Create a C-based client that can connect to the proxy server using sockets.
5. Make sure the client runs on cse02.cse.unt.edu and connects the proxy server. The user can request the desired web page using the below format.
client <port_numer>
url: <url>
where client is the client executable, port_number is the port number on which the client connects the server and url is the requested url.
6. Once the proxy server gets a request from the client, it then forwards the request to the web server.
7. The web server responds with the requested web page. Capture the returned webpage from the web server and forward it to the client.
8. Verify to see if the returned page is same as the browser returned page. Figure 1 shows the overall architecture.
There are examples of the client and server C code in the links below to help start the programming. They can be tested.
Server.c - https://gist.github.com/anonymous/ef79a81afa25aef441810a39b766e6ec
Client.c - https://gist.github.com/anonymous/5b1e52c416fb97c7c01d042b42e73103
Pseudo Code of the above codes - https://gist.github.com/anonymous/c0923f7ddf89045a40915254328d15c7
Explanation / Answer
client.c
proxy server.c
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.