A proxy server supporting HTTP/HTTPS protocols, built with Python. Features include caching, dynamic site blocking, real-time statistics, comprehensive logging, and a menu-driven management interface.
- Caching Mechanism: Speeds up browsing by storing frequently accessed content.
- Dynamic Site Blocking: Block access to specific sites in real-time.
- Real-time Statistics: Monitor requests, cache hits, and blocked sites.
- Logging System: Tracks access logs, errors, and security events.
- Centralized Management Interface: Easily configure, monitor, and control the proxy.
- Graceful Shutdown & Data Persistence: Saves logs, cache, and settings before exiting.
- Python
- Flask
- Socket Programming
- Threading
- Logging
- SQLite
- HTTP/HTTPS Protocols
Ensure you have Python 3.x installed on your system.
# Clone the repository
git clone https://github.com/your-username/proxy-http-https-server.git
cd proxy-http-https-server
# Install dependencies
pip install -r requirements.txt
# Run the proxy server
python proxy_server.py
- Start the Proxy Server
python proxy.py
- Configure Your Browser or System to Use the Proxy
- HTTP Proxy:
http://localhost:8080
- HTTPS Proxy:
http://localhost:8080
- HTTP Proxy:
- Manage the Proxy Using the Interface
- View logs & statistics
- Modify blocklists
- Stop the server gracefully
- Handling HTTPS Traffic: Implemented SSL/TLS certificate handling for secure tunneling.
- Efficient Caching: Used hash-based storage with expiration policies.
- Real-time Blocklist Updates: Used thread-safe data structures for smooth updates.
- Graceful Shutdown: Implemented signal handling to save data before exiting.
Final_V/
│── cache/ # Stores cached web pages
│── logs/ # Stores logs for access and errors
│── blocked_sites.pkl # Pickle file for blocked websites
│── cached_sites.pkl # Pickle file for cached websites
│── proxy.py # Main proxy server script
│── README.md # Project documentation
- Logs are stored in the
logs/
directory. - Cached responses are stored in
cache/
. - Run
proxy.py
with appropriate flags for additional functionalities.
Karthikeyan