{"id":21968169,"url":"https://github.com/theshobhitsingh/concurrentcacheproxy","last_synced_at":"2026-02-27T09:11:58.825Z","repository":{"id":258962915,"uuid":"875082766","full_name":"theshobhitsingh/ConcurrentCacheProxy","owner":"theshobhitsingh","description":"A multi-threaded HTTP proxy server in C with dynamic caching for improved performance and response times.","archived":false,"fork":false,"pushed_at":"2025-03-14T13:11:50.000Z","size":83,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T12:32:13.311Z","etag":null,"topics":["c","library","makefile","proxyparser","proxyserver"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theshobhitsingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-19T04:01:57.000Z","updated_at":"2025-03-14T13:11:53.000Z","dependencies_parsed_at":"2025-10-10T12:31:24.058Z","dependency_job_id":"90bb165a-5a68-4d06-930f-ebd8e7791c03","html_url":"https://github.com/theshobhitsingh/ConcurrentCacheProxy","commit_stats":null,"previous_names":["theshobhitsingh/concurrentcacheproxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theshobhitsingh/ConcurrentCacheProxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theshobhitsingh%2FConcurrentCacheProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theshobhitsingh%2FConcurrentCacheProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theshobhitsingh%2FConcurrentCacheProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theshobhitsingh%2FConcurrentCacheProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theshobhitsingh","download_url":"https://codeload.github.com/theshobhitsingh/ConcurrentCacheProxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theshobhitsingh%2FConcurrentCacheProxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29889064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","library","makefile","proxyparser","proxyserver"],"created_at":"2024-11-29T13:43:45.820Z","updated_at":"2026-02-27T09:11:58.792Z","avatar_url":"https://github.com/theshobhitsingh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConcurrentCacheProxy\n\n## Overview\n\nThis project implements a Multi-Threaded HTTP Proxy Server in C, which supports the caching of responses to optimize performance. The server can handle multiple client requests concurrently using threads with a caching mechanism to store responses for faster retrieval.\n\n## Features\n\n- **Multi-threaded Handling**: Each client request is managed in a separate thread, allowing concurrent processing of multiple requests.\n- **Caching**: Responses from remote servers are cached to minimize redundant network traffic and improve response times.\n- **Error Handling**: The proxy server responds with appropriate HTTP error messages (400, 403, 404, etc.) based on request validity.\n- **HTTP Request Parsing**: Requests are parsed to extract essential information such as method, host, path, and HTTP version.\n\n## Requirements\n\n- GCC (GNU Compiler Collection) \u003cbr\u003e\n- pthread library for multi-threading support \u003cbr\u003e\n- POSIX-compliant system (Linux or macOS) \u003cbr\u003e\n\n## Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd \u003crepository-directory\u003e\n   \n2. **Compile the Proxy Server**: Use the provided Makefile to compile the server.\n   ```bash\n   make\n   \n3. **Run the Proxy Server**:\n   ```bash\n   Copy code\n  ./proxy \u003cport_number\u003e\n\n  ---\u003e Replace \u003cport_number\u003e with the desired port for the proxy server (default is 8080).\n  \n## Usage\n\n1. Configure your browser or HTTP client to use the proxy server's IP address and port.\n2. Send HTTP GET requests through the proxy, and it will forward the requests to the specified servers.\n\n## File Structure\n. \u003cbr\u003e\n├── README.md              # Project documentation \u003cbr\u003e\n├── Makefile               # Build instructions \u003cbr\u003e\n├── proxy_server_with_cache.c  # Main server implementation \u003cbr\u003e\n├── proxy_parse.c          # HTTP request parsing and caching logic \u003cbr\u003e\n└── proxy_parse.h          # Header file for parsing functions and cache structure \u003cbr\u003e\n\n## Key Functions\n\nhandle_request(): Manages the client's request, checking the cache and forwarding the request if necessary. \u003cbr\u003e\nadd_cache_element(): Adds a response to the cache. \u003cbr\u003e\nfind(): Searches for a URL in the cache and updates its access time. \u003cbr\u003e\nremove_cache_element(): Removes the least recently used cache element when the cache exceeds its size limit. \u003cbr\u003e\n\n## Error Handling\n\n**The proxy server implements various HTTP status codes**:\n\n400 Bad Request: Invalid request format. \u003cbr\u003e\n403 Forbidden: Access denied to the requested resource. \u003cbr\u003e\n404 Not Found: The requested resource could not be found. \u003cbr\u003e\n500 Internal Server Error: Server encountered an unexpected condition. \u003cbr\u003e\n\n## Cleanup\nTo remove compiled files, use:\n   ```bash\n   make clean\n   ```\nTo create a tarball of the project:\n```bash\nmake tar\n```\n ## Acknowledgments\n \n\u003e\u003c Inspired by various networking and concurrent programming resources. \u003cbr\u003e\n\u003e\u003c Utilized the pthread library for multi-threading capabilities. \u003cbr\u003e\n\n## Contributing\n\nContributions are encouraged! Please follow these steps to contribute:\n\nI. Fork the repository: git checkout -b feature/YourFeature \u003cbr\u003e\nII.Make your changes and commit: git commit -m \"Add your feature\" \u003cbr\u003e\nIII. Push to the branch: git push origin feature/YourFeature \u003cbr\u003e\nIV. Create a pull request. \u003cbr\u003e\n\nFeel free to reach out for any questions or collaborations!\n\n## Developer\n\nThis project is developed by ***Shobhit Singh***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheshobhitsingh%2Fconcurrentcacheproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheshobhitsingh%2Fconcurrentcacheproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheshobhitsingh%2Fconcurrentcacheproxy/lists"}