Commit Graph

104 Commits

Author SHA1 Message Date
fcac920bc9 fix: Simplify initialization and improve type safety in socket handling 2025-12-17 21:10:43 +01:00
f6662e2f59 fix: Correct configuration parsing for port and max_threads 2025-12-17 20:52:42 +01:00
519f5e13c8 Reapply "fix: Improve error handling in HTTP client and free socket pointer in worker thread"
This reverts commit 12de9d8c00.
2025-12-17 20:28:35 +01:00
12de9d8c00 Revert "fix: Improve error handling in HTTP client and free socket pointer in worker thread"
This reverts commit 25e8e1bb34.
2025-12-17 20:26:57 +01:00
ae4ac3b1fb fix: Enhance error handling for data transmission and simplify URL handling 2025-12-17 19:52:39 +01:00
25e8e1bb34 fix: Improve error handling in HTTP client and free socket pointer in worker thread 2025-12-17 19:07:10 +01:00
a38df76922 Refactor code for consistency and readability
- Updated function parameter formatting to use consistent pointer notation.
- Removed unnecessary whitespace and adjusted comments for clarity.
- Improved variable declarations and initializations in websocket.c for better readability.
- Ensured consistent use of types and formatting across server_config and websocket headers.
- Enhanced overall code style to align with best practices.
2025-12-17 15:26:36 +01:00
c1a3aff71e Update .gitignore and README.md for clarity and consistency 2025-12-17 14:10:11 +01:00
d07d77c4da Update issue templates
Added to cve report labels
2025-12-11 22:29:06 +00:00
870d89d5ac Update issue templates
Added CVE report
2025-12-11 22:27:50 +00:00
0616e5124e docs: Add contributing and security policy documentation 2025-12-11 23:13:33 +01:00
e564f6f292 Update issue templates
Added Templates
2025-12-11 21:53:27 +00:00
71c0670d7f Enhance WebSocket handling: remove socket timeout, improve frame creation, and update test page UI 2025-12-11 21:08:15 +01:00
5d32e8c2e0 Fix potential buffer overflow in log_hexdump function 2025-12-11 20:17:52 +01:00
1b83097f00 Refactor logging system and enhance Dockerfile configuration
- Introduced a new logging system with configurable log levels and categories.
- Added support for different log formats: plain text, JSON, and syslog.
- Updated Dockerfile to use Alpine 3.19 and improved build process.
- Enhanced server configuration to replace verbose logging with log modes (off, classic, debug, advanced).
- Improved security measures in SSL context configuration.
- Added health checks and resource limits in docker-compose.yml.
- Refactored Makefile to include new logging source files.
- Updated server configuration to set default log file path and SSL certificate paths.
- Enhanced performance tracking and logging capabilities.
- Added hex dump utility for debugging binary data.
2025-12-11 20:04:54 +01:00
4e018c428b Potential fix for code scanning alert no. 8: Workflow does not contain permissions (#15)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-10 12:23:18 +00:00
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