A fast C++ HTTP server built with Boost.Asio that handles authentication, file operations, encryption, database connections, and real-time WebSocket messaging.
- START.md - Build and run the server
- API_USAGE.md - How to use all endpoints with examples
- ARCHITECTURE.md - Technical design and project structure
Server runs on: http://localhost:8080/
- User authentication and session management
- File upload/download with security checks
- HTTP GET/POST request proxying to external APIs
- RSA encryption and decryption for secure data
- HTML template rendering and static file serving
- SQLite database integration
- Real-time WebSocket messaging
Web Interface:
GET /or/home- Main web interfaceGET /render-html?filePath=templates/stream_text.html- WebSocket chat interface
API Endpoints:
GET /health- Health check and system monitoringGET /sys-server-info?sysInfo=true- System informationGET /download-file?filePath=<path>- Download filesPOST /upload-file- Upload filesGET /authenticate- User authenticationPOST /encrypt-data- RSA encryptionPOST /decrypt-data- RSA decryptionGET /get-request?host=<host>&ep=<endpoint>- HTTP GET proxyPOST /post-request?host=<host>&ep=<endpoint>- HTTP POST proxy
Usage examples and testing instructions: API_USAGE.md
- Install dependencies:
sudo apt-get install -y libboost-all-dev nlohmann-json3-dev libssl-dev libsqlite3-dev cmake - Build bcrypt:
cd bcrypt && mkdir -p build && cd build && cmake .. && make && cd ../.. - Build server:
make clean && make - Run server:
./server
Complete setup guide: START.md
Browser testing:
- Home page: http://localhost:8080/
- Health check: http://localhost:8080/health
- System info: http://localhost:8080/sys-server-info?sysInfo=true
- WebSocket chat: http://localhost:8080/render-html?filePath=templates/stream_text.html
API testing:
- Use the provided
tests/rest.httpfile with REST Client extension - Or use curl commands from API_USAGE.md
src/main.cpp- Server entry point with configuration and loggingsrc/routes/http_route.cpp- HTTP request routingsrc/routes/ws_route.cpp- WebSocket routingsrc/health/health_check.cpp- Health monitoring endpointsrc/utils/logger.hpp- Structured logging systemsrc/utils/config.hpp- Configuration managementtemplates/home.html- Main web interfacetemplates/stream_text.html- WebSocket chat clientconfig/server.conf- Server configuration fileconfig/- RSA keys for encryptiontests/rest.http- API test requestsDockerfile- Container deploymentDEPLOYMENT.md- Production deployment guide
- Boost Libraries (system, filesystem, asio)
- nlohmann/json - JSON parsing
- OpenSSL - Encryption/SSL support
- SQLite3 - Database support
- bcrypt - Password hashing (built from source)
Load test reports are available in reports/ directory.