Giter Club home page Giter Club logo

http-proxy's Introduction

HTTP-Proxy

HTTP-Proxy in C using Princeton's assignment as a template.

Assignment under Prof. Manikantan Srinivasan

README file for CS3205 Assignment - HTTP Proxy

       Name: Akash N A and Vamsi KV
       Roll: CS17B020 and CS17B045 (Respectively)

================================================================

Instructions to run: The code to be used is contained in "proxy.c".

1.Testing using telnet:

Run on two different terminals the following (in order):

a] Terminal-1: run the command :-
                |>./proxy <port-no of proxy>

b] Terminal-2: run the command :-
                |>telnet localhost <port-no of proxy>
                |Trying 127.0.0.1...
                |Connected to localhost.
                |Escape character is '^]'.
                |GET <URL> HTTP/1.0\r\n\r\n                   ------> This input from the user.
Make note that the last command on Terminal-2 will not work as it is. Its is best to copy the next two lines along with the url
from the "paster" file. Contact author for more information.

2.Testing using the testing python scripts provided:

a] "proxy_tester.py": run the following command on a system enabled with python2 (and python2 only)-
                python proxy_tester.py proxy <port-no of proxy>
                
b] "proxy_tester_conc.py": run the following command on a system enabled with python2 (and python2 only)
                            and also has apache benchmarks installed (try the command "ab" on the terminal,
                            it will give the command to install apache benchmarks)-
                python proxy_tester_conc.py proxy <port-no of proxy>

If there are any errors in connecting to the sockets (or any other), code will generate error messages. Invalid test cases - HTTP error 400 and 501 have also been enabled.

A common occurance while testing might be "Error in binding with socket ". Try using a different socket or try waiting for a while before using the same socket(so that it can be cleared). To avoid this, try avoiding abnormal termination of proxy. Emphasis on this while using telnet to test. Use Ctrl-C to terminate the proxy.

http-proxy's People

Contributors

grasscannoli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.