A Linux implementation of the CloudTcpServer for TCP/IP communication with clients.
- Fully compatible with the original Delphi CloudTcpServer protocol
- TCP server for accepting client connections
- HTTP server for interfacing with web applications
- Cryptographic support for secure client communication
- Support for multiple server interfaces
- Logging and error handling
- Docker support for easy deployment
- Python 3.9+
- Dependencies listed in requirements.txt
- Docker (optional, for containerized deployment)
- Clone the repository or extract the source code
- Make sure Docker and Docker Compose are installed
- Build and start the server:
docker-compose up -d
When using Docker, you can set the following environment variables in docker-compose.yml:
SERVER_SERIAL
- Override the hardware serial number detectionSERVER_KEY
- Use a specific registration key
Example:
environment:
- SERVER_SERIAL=my-server-id
- SERVER_KEY=your-base64-encoded-key
If these variables are not set, the entrypoint script will attempt to detect the hardware serial and generate a key automatically.
- Clone the repository or extract the source code
- Install dependencies:
pip install -r requirements.txt
- Make the start script executable:
chmod +x start_server.sh
- Run the server:
./start_server.sh
The server configuration is stored in config/server.ini
. The main configuration sections are:
COMMONSETTINGS
: General settingsREGISTRATION INFO
: Server registration informationSRV_X_COMMON
: Common settings for server interface XSRV_X_HTTP
: HTTP settings for server interface XSRV_X_TCP
: TCP settings for server interface XSRV_X_AUTHSERVER
: Authentication server settings for interface XSRV_X_HTTPLOGINS
: HTTP login credentials for interface X
To generate a new server registration key:
python3 src/key_generator.py --output config/registration.ini
Then copy the registration info to your server.ini
file:
[REGISTRATION INFO]
SERIAL NUMBER=your_serial_number
KEY=your_generated_key
For detailed instructions on registration key management, see REGISTRATION_KEY_HOWTO.md.
To test your registration key:
python test_custom_key.py
Note: The registration key is tied to the hardware serial number of the server. When moving the server to different hardware, you will need to generate a new key.
The server implements the original CloudTcpServer protocol with the following commands:
INIT
: Initialize connection and crypto keyINFO
: Send client info and get authorizationPING
: Keep connection aliveGREQ
: Get pending requestSRSP
: Send response to requestVERS
: Check for software updatesDWNL
: Download update fileERRL
: Log error message
LinuxCloudReportServer/
├── config/ # Configuration files
├── docker/ # Docker-related files
├── logs/ # Log files (created at runtime)
├── src/ # Source code
├── updates/ # Update files (for client updates)
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Docker build configuration
├── requirements.txt # Python dependencies
├── README.md # This file
└── start_server.sh # Server startup script
If you encounter any issues, check the log files in the logs
directory. The main log file is CloudReportLog.txt
.
Common issues:
- Invalid registration key: Make sure the registration key in
server.ini
is valid - Port conflicts: Check if ports 8016 (TCP) and 8080 (HTTP) are available
- Connection refused: Make sure firewall settings allow connections to the configured ports
- Client ID=1 decryption issues: Special handling is implemented for clients with ID=1 sending 152-byte packets. If you still have issues, check the logs for detailed error messages and verify the client is using the correct encryption key.
Recent improvements in version 1.2:
- Enhanced support for 152-byte packets from ID=1 clients
- Improved decryption and decompression algorithms
- Better error handling for compressed and uncompressed data
This software is proprietary and confidential.