Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (39 loc) · 2.97 KB

README.md

File metadata and controls

43 lines (39 loc) · 2.97 KB

bithub

Proxy server in python

Tools and libraries used:

  • Python 3.11
  • tkinter and custom tkinter
  • os, time, datetime, socket, threading
  • pickle

Resources:

Steps followed:

  1. We created our own http library where we created the 2 classes Request and Response that parse the http requests and responses into Request and Responses objects to be able to manipulate them.
  2. We received requests and responses in all the possible ways in which HTTP sends information (direct way, as in old browsers; content-length; chunked transfer)
  3. We created an LRU caching system, which saves all caching on disk and also deletes least recently used data once needed.
  4. We implemented basic security features, such as: blacklisting hosts, blacklisting clients, access to websites which are protected by a password.
  5. We created the user interface using tkinter, customtkinter libraries.

Extra Features:

  • Complete and fail-proof parsing of request headers and response headers into Request and Response header objects with most header fields found in modern and old http requests with their correct corresponsing types. The reason is for easier reception and manipulation of different forms of requests and responses as well as changing the headers of these requests and responses.
  • Users can send HTTP requests directly from browsers and without the need for a client side.
  • Caching directly onto computer disk and persisting the cache between proxy sessions.
  • Implementing the Least Recently Used (LRU) algorithm using a minimum-heap and a dictionary for fast efficient caching.
  • Limitations and accommodations of implementations:
    • a maximum of 50 global concurrent connections at a time
    • a maximum of 5 connections per host at a time
    • a maximum of 10 hosts using the server at the same time
  • Implemented a graphical user interface that displays all required and additional information.
  • To secure and access the GUI, administrators must create an account and authenticate their sign in which is done using a secure hashing system.
  • Admins can choose to run the proxy server as well as exist and terminate the proxy server without the need for terminal/cmd interference.
  • Handle all file types, ex: html, gif, css, any binary object.
  • Handling cases of cache control: no-cache, no-store.
  • Handling all reception types: chunked, with content length, timeout default case.