2.5 KiB
2.5 KiB
DPS Manager Server
This directory contains the current C++17 service implementation. The legacy Java project is kept only as a behavior reference under 旧的java项目/.
Build targets
The server now uses one codebase with the same runtime behavior on:
- Windows:
MSVC + xmake - Linux:
gcc/clang + xmake
mingw is no longer the primary target for this service.
Dependencies
Xmake resolves these shared dependencies for both platforms:
openssl3zlibmariadb-connector-c
Platform system links:
- Windows:
ws2_32 - Linux:
pthread,crypt
Linux builds also rely on the system crypt.h header and libcrypt for bcrypt support. Windows builds continue to use the vendored Openwall bcrypt sources.
Database TLS
database.ssl_mode=disable: disable TLS for local Windows testingdatabase.ssl_mode=preferred: allow TLS without strict certificate validationdatabase.ssl_mode=required: require TLS but skip certificate validationdatabase.ssl_mode=verify_ca: require TLS and verify the server certificate chaindatabase.ssl_mode=verify_identity: same strict verification path asverify_cain the current Connector/C integrationdatabase.ssl_ca: optional CA certificate file path for strict verification modesdatabase.plugin_dir: optional MariaDB auth plugin directory override; Windows builds also copy connector plugins tomariadb-pluginbeside the executable
Build
Windows local testing
xmake f -p windows -a x64 -m debug
xmake
Copy-Item config/server.windows.conf config/server.conf
Linux deployment build
xmake f -p linux -a x86_64 -m release
xmake
cp config/server.conf.example config/server.conf
Run
Windows:
./build/windows/x64/debug/dps_manager_server.exe --config config/server.conf
Linux:
./build/linux/x86_64/release/dps_manager_server --config config/server.conf
Notes
- Password hashing, JWT signing, RSA operations, and gzip payload generation all use the same OpenSSL/zlib-based implementation on Windows and Linux.
- The server fails fast on startup if the database connection cannot be established.
- Windows local testing can set
database.ssl_mode=disablewhen the remote database presents a certificate chain that Windows does not trust yet. - Proxy headers are ignored by default; enable
server.trust_proxy=trueonly when the service runs behind a trusted reverse proxy. config/server.conf.exampleis the Linux-oriented template, andconfig/server.windows.confis the Windows local test template.