Commit Graph

88 Commits

Author SHA1 Message Date
bcdeedb91e Potential fix for code scanning alert no. 9: Workflow does not contain permissions (#14)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-10 12:21:00 +00:00
46d2b5af82 Enhance CI workflow for multiple branches and jobs
Updated CI workflow to include 'develop' branch and added build, test, code quality, and security scan jobs.
2025-12-10 12:06:51 +00:00
25dc0e5e78 Update Dockerfile to use alpine:edge and replace wget with curl for healthcheck 2025-11-26 22:27:28 +01:00
b3370b3646 Update Dockerfile and .gitignore to include entrypoint script and docker-push.sh 2025-11-26 17:15:17 +01:00
2173258a21 Update documentation to reflect current implementation and add Docker support details 2025-11-25 17:45:36 +01:00
200cc8ad7f Implement dynamic rate limiting and ETag support for conditional requests 2025-11-25 17:10:14 +01:00
2cca952f6e Refactor Dockerfile and docker-compose.yml for improved configuration and dependency management 2025-11-25 00:16:18 +01:00
bc57f6803d Add zlib1g-dev to Dockerfile dependencies 2025-11-24 21:26:08 +01:00
729844a13c Added gzip compression support to file caching mechanism (can be broken idk we will see) 2025-11-24 21:22:16 +01:00
88fee91088 Develop (#13)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts

* Enhance performance and security features:
- Update compiler flags for better optimization and security.
- Implement MIME type caching for improved response handling.
- Introduce worker thread pool for efficient connection management.
- Optimize socket settings for low latency and enhanced performance.
- Add support for CPU affinity in worker threads.
- Implement graceful shutdown for worker threads during cleanup.

* Optimize HTTP response handling and increase request limits for improved performance

* Add gzip compression support for HTTP responses

* Implement Keep-Alive support for HTTP connections with timeout handling
Why is it not merging like this huh
2025-11-24 20:03:01 +00:00
b9ffe8bd27 Develop (#12)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts

* Enhance performance and security features:
- Update compiler flags for better optimization and security.
- Implement MIME type caching for improved response handling.
- Introduce worker thread pool for efficient connection management.
- Optimize socket settings for low latency and enhanced performance.
- Add support for CPU affinity in worker threads.
- Implement graceful shutdown for worker threads during cleanup.

* Optimize HTTP response handling and increase request limits for improved performance

* Add gzip compression support for HTTP responses
2025-11-24 19:57:52 +00:00
e0c7fd8db3 Added: gzip (#11)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts

* Enhance performance and security features:
- Update compiler flags for better optimization and security.
- Implement MIME type caching for improved response handling.
- Introduce worker thread pool for efficient connection management.
- Optimize socket settings for low latency and enhanced performance.
- Add support for CPU affinity in worker threads.
- Implement graceful shutdown for worker threads during cleanup.

* Optimize HTTP response handling and increase request limits for improved performance
2025-11-24 19:46:36 +00:00
00424ae05e Develop (#10)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts

* Enhance performance and security features:
- Update compiler flags for better optimization and security.
- Implement MIME type caching for improved response handling.
- Introduce worker thread pool for efficient connection management.
- Optimize socket settings for low latency and enhanced performance.
- Add support for CPU affinity in worker threads.
- Implement graceful shutdown for worker threads during cleanup.

* Optimize HTTP response handling and increase request limits for improved performance
2025-11-24 19:04:52 +00:00
9535e0d2c8 Develop (#9)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts

* Enhance performance and security features:
- Update compiler flags for better optimization and security.
- Implement MIME type caching for improved response handling.
- Introduce worker thread pool for efficient connection management.
- Optimize socket settings for low latency and enhanced performance.
- Add support for CPU affinity in worker threads.
- Implement graceful shutdown for worker threads during cleanup.
2025-11-24 18:10:38 +00:00
91e300afbc Add Docker build and test job to CI workflow
Added a new job to build and test the Docker image for the carbon-server.
2025-11-24 12:54:24 +00:00
af3f926704 Change HTTPS port mapping from 443 to 8443 2025-11-24 12:54:04 +00:00
fd3cedd1f3 Update Dockerfile to add SSL key directory and change port 2025-11-24 12:53:44 +00:00
5f0ba87967 Develop (#8)
* Add Dockerfile and docker-compose.yml for containerized setup; create .dockerignore

* Update CI pipeline and Docker configuration for improved build process and health checks
2025-11-24 12:48:45 +00:00
8d26913c62 Develop (#7)
* Add Dockerfile and docker-compose.yml for containerized setup; create .dockerignore

* Update CI pipeline and Docker configuration for improved build process and health checks
2025-11-24 12:42:34 +00:00
1c3c31a7b8 Add Dockerfile and docker-compose.yml for containerized setup; create .dockerignore (#6) 2025-11-03 14:32:17 +01:00
eff5206b7e Merge pull request #5 from Azreyo/develop
Prettier distribution of files
2025-11-03 10:43:05 +00:00
f4d0ddcb68 Merge branch 'main' into develop 2025-11-03 10:41:01 +00:00
2c74ed2b0c Update Makefile to create bin directory and adjust object file paths; add initial Dockerfile 2025-11-03 11:38:35 +01:00
3e3ab1f6f2 Update config_parser.c 2025-11-03 11:36:44 +01:00
ceadc3cbe6 Merge pull request #4 from Azreyo/develop
fix: Add critical memory safety and error handling improvements
2025-11-02 12:16:10 +00:00
0f63d95ef2 Merge branch 'main' into develop 2025-11-02 12:12:48 +00:00
c588d560d7 fix: Add critical memory safety and error handling improvements
- Add NULL checks after malloc() calls in HTTP/HTTPS thread creation
- Add error checking for fcntl() calls to prevent silent failures
- Add integer overflow protection in WebSocket frame handling
- Improve socket option error handling with proper validation
- Add SIZE_MAX check in ws_send_frame to prevent overflow

These fixes address potential crashes and security issues in high-load
scenarios and improve overall robustness of the server.
2025-11-02 13:11:07 +01:00
6fa4bc96a6 Merge pull request #3 from Azreyo/develop
Develop
2025-11-02 12:00:56 +00:00
e26c11615f ci: add comprehensive GitHub Actions workflow with security scanning and code quality checks 2025-11-02 12:58:58 +01:00
c0706a8d6f remove: delete DEVELOPMENT.md file 2025-11-02 12:48:35 +01:00
1f1dbf044a docs: add develop branch marker 2025-11-02 12:27:42 +01:00
01874b0e5a Enhance error handling for HTTP/2 file size, validate mmap cache entries, improve WebSocket connection handling, enforce maximum URI length, and limit WebSocket payload size. 2025-11-02 12:22:12 +01:00
636b221d62 Test verified commit" 2025-11-01 23:47:05 +01:00
301d408647 tst 2025-11-01 23:38:17 +01:00
7c555b5cb9 tst 2025-11-01 23:31:15 +01:00
3dd50edc3c tst 2025-11-01 23:20:03 +01:00
2fc7edf37d Validate input parameters and enhance error handling in configuration loading, task queue management, SSL initialization, and WebSocket handshake processes. 2025-11-01 23:20:01 +01:00
72df6a73fc Enhance server ssl configuration
- Added SSL certificate and key paths to ServerConfig structure.
- Updated init_config function to initialize new SSL paths.
- Formated code for better readability.
2025-10-05 17:35:00 +00:00
46b653efe0 Enhance server configuration and performance optimizations
- Added max_connections option to server configuration
- Updated Makefile to include performance.c and related headers
- Implemented memory-mapped file caching and buffer pooling for improved performance
- Refactored config parser to handle new configuration options
- Increased maximum request size and optimized file handling
2025-10-03 22:08:55 +00:00
b5a30a5268 Add www_path configuration option and update related parsing logic 2025-10-03 21:10:16 +00:00
e93e65f882 Refactor config parsing to use a switch statement for improved readability and maintainability 2025-10-03 08:56:32 +00:00
8b87e77db8 Changes
- Forgot to change my testing configuration before publishing
2025-10-02 21:55:37 +00:00
f6d5db4a0b FFS 2025-10-02 21:46:42 +00:00
730cdc2bfc Update README.md and add comprehensive documentation for Carbon HTTP Server 2025-10-02 21:44:23 +00:00
a2c4617493 Implement HTTP/2 and WebSocket support; remove legacy JavaScript and CSS files
- Added HTTP/2 support in src/http2.c and src/http2.h, including session management, frame handling, and response sending.
- Introduced WebSocket functionality in src/websocket.c and src/websocket.h, covering handshake, frame parsing, and message sending.
- Created a WebSocket test page (www/websocket-test.html) for client-side interaction.
- Removed outdated JavaScript (www/script.js) and CSS (www/style.css) files.
2025-10-02 21:14:23 +00:00
7028a0cb11 Update server_name placeholder in configuration file from lan testing 2025-10-02 19:00:15 +00:00
c9ac352bb4 Refactor server configuration management
- Removed old server configuration files (server.json, server.log, server_config.c, server_config.h).
- Introduced a new configuration file (server.conf) with a more structured format.
- Implemented a configuration parser (config_parser.c) to read and apply settings from server.conf.
- Updated server logic to utilize the new configuration structure.
- Enhanced logging functionality and added rate limiting features.
- Improved error handling and security measures in request processing.
2025-10-02 18:57:05 +00:00
a34ae2a43e Improve HTTPS connection handling and enhance error logging
- Added a delay for non-blocking accept errors in HTTPS server.
- Refactored HTTPS redirection to dynamically allocate response buffer.
- Improved SSL handshake error logging.
- Adjusted shutdown logic to ensure proper socket closure based on HTTPS configuration.
- Fixed memory handling for rate limit IP storage.
2025-10-02 20:17:14 +02:00
6be17d9de5 Add work-in-progress notice to README.md 2025-10-02 15:41:07 +02:00
93e93064f7 Update .gitignore to include certs/*.pem and fix redirect response formatting in server.c 2025-10-02 11:59:58 +02:00