Skip to content

Simple http proxy that passes requests and data between a web client and server

Notifications You must be signed in to change notification settings

swathiiyer2/Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

#Proxy Single-threaded http proxy that passes requests and data between a web client and server

Usage

Compile using

gcc -o proxy main.cpp

Run the proxy in the terminal with the following command:

./proxy <port>

Specify a port number outside of the reserved range (1-1024) for the proxy to listen on.

Request a page using telnet:

telnet localhost <port>
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
GET http://www.stanford.edu/ HTTP/1.0

HTTP request line format:

<request-method-name> <request-URI> <HTTP/version>
<---Empty line--->

##Specs
Supports GET and HEAD requests. Does not support https. URI must have absolute path and end with "/". Proxy returns the headers and HTML of the requested page.

About

Simple http proxy that passes requests and data between a web client and server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages