Welcome to the Multi-Threaded Proxy Server project! This project demonstrates the implementation of a proxy server with and without caching using C. It handles HTTP requests, supports multiple threads for concurrent connections, and utilizes an LRU (Least Recently Used) caching mechanism to optimize performance.
- Multi-threaded proxy server handling multiple client connections simultaneously.
- HTTP request parsing and response handling.
- Caching mechanism using the Least Recently Used (LRU) algorithm.
- Configurable cache size to balance performance and memory usage.
- Ability to handle concurrent requests and responses efficiently.
- C: Programming language used for implementation.
- HTTP Parsing: Handling HTTP requests and responses.
- Multi-threading: Utilizing threads to handle concurrent connections.
- Caching: Implementing the Least Recently Used (LRU) caching algorithm.
To get started with the proxy server, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/multi-threaded-proxy-server.git cd multi-threaded-proxy-server -
Compile the code:
gcc -o proxy server.c -lpthread
Replace
server.cwith the name of your C source file if different. -
Run the proxy server:
./proxy
Ensure that you have the necessary permissions and configurations to run the server.
- The proxy server will start listening for HTTP requests on the specified port.
- You can configure the cache size by modifying the source code or providing command-line arguments if supported.
- Use your browser or any HTTP client to make requests through the proxy server.
If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -am 'Add new feature'). - Push your branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to adjust the instructions and details according to your project’s specifics and additional functionalities.