Giter Site home page Giter Site logo

http-proxy's Introduction

##Description :

This HTTP proxy server made in C++ language. It supports only HTTP protocol get method requests .
In  simple words proxy server acts as middleware between you and the server u request. 
It hides the client  from the server as server can only track details of proxy server. 
We can also filter the browser requests by allowing only those requests  to secure websites. 

##College - proxy :

Yes, this codes works also with any college - proxy (I tested it on my college proxy) 
. Just u need to comment line no 240 and uncomment   lines  244 to 247.In this case,we are making a 
proxy server which connects to another proxy server present in our college network and sends the 
request to that proxy server and receives data back  from that server.basically it means there 
are 2 proxy servers running in middle between client and server. 

##How to Run :

clone this project and go to the folder and run "make" through terminal and provide a port 
number too.

$make
$./proxy 6789

BAAAM ..!! your proxy server starts running on ur local machine port 6789 . 
(U can have a port of max number around 65k other than first 1000 system registered ports )

##How to test :

In the browser , go to Preferences -> Advanced -> Network -> Settings -> 
Manual Proxy Configuration.
Now, Enter 127.0.0.1 in HTTP proxy field and 6789  in port number field. and press ok .

(enter the same port number that used in the command line  )

We can also run through telnet command.

EX :
$ telnet 127.0.0.1 6789
$ GET http://www.google.com:80/index.html/ HTTP/1.0\r\nContent-Length:
	 80\r\nIf-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT\r\n\r\n

##How I Made :

First i created a socket which listens to http requests and used fork for handling 
multiple requests at a time . Then after recieving request from the client socket , 
I used functions present in proxy_parse.h for parsing these requests . Then i created another
socket to the host present in that request, and i send parsed  request to that host.
Once i recieve data from the server socket , i am passing this data back to the client socket 
then the browser shows us the page we want.

We will not have more than 100 requests. Error-checking is done at every step . Errors
will be displayed in terminal.

http-proxy's People

Contributors

sameer2800 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.