LibreAuth

C++ Client Setup

LibreAuth C++ client — API URL, Ed25519 key, and version setup.

INFO
Enterprise pack: Protocol v2 example + shield + vendor lock + static .lib + SecureLoader L3 — C++ Pack (Enterprise). SDK View/Download ที่ /sdk/ ต้อง Login + แผน Developer / Pro / Enterprise.

1. API URL

Enterprise (v1.4):

std::string url = "https://libreauth.nutexe.dev/api/1.4/";

Other plans (v1.3):

std::string url = "https://libreauth.nutexe.dev/api/1.3/";

2. Ed25519 Public Key

From init response pubkey field. Replace in auth.cpp:

static std::string get_public_key_hex() {
    return "YOUR_ED25519_PUBLIC_KEY_HEX";
}
WARN
Wrong public key → "Signature verification failed". Must match your server init response.

3. Application Version

Client ver must match the expected app version exactly.

4. Hash Check (optional)

When hash check is enabled, send exe MD5 on init via hash or h. Use la_guard::ExeMd5Hex() from hardening.hpp.

5. Runtime Guard

sdk/cpp/hardening.hpp — call before init and in the main loop:

APIDescription
RunChecks()debugger, breakpoints, suspicious modules, process/window scan, VM
LastFail() / FailName()identify failure category
ExeMd5Hex()exe MD5 for hash check
Hwid()basic HWID

Blocks common debuggers, injectors, and analysis tools. See Hardening Guide for full usage.

INFO
Full guide: Hardening Guide

Error Reference

CodeFix
Missing signature headersEnable PHP sodium on server
Signature verification failedWrong public key — rebuild exe
E01 / E02Wrong name or ownerid
invalidverVersion mismatch — check your ver string
E18No wire token — use LibreAuth SDK, not legacy loader
E04 / E05Hash check — see troubleshooting

6. Operations — Remote Shell

Include sdk/cpp/ops_executor.hpp after login. The preferred drop-in is two calls inside your type=check poll loop — flatten the check JSON into a std::map<std::string,std::string>, let la_ops::HandleOpsFromFields parse + run, then ack with auth.OpsAck. It returns false on an idle poll, so one call covers both “nothing to do” and “run + ack”:

C++ drop-in
#include "ops_executor.hpp"
// auth = your la::Client, polling type=check ~3s after Login/License

std::map<std::string,std::string> fields; // flattened check JSON (coerce numeric ops_id to string)
std::string opsId, resultData;
if (la_ops::HandleOpsFromFields(fields, opsId, resultData)) {
    auth.OpsAck(opsId, "done", "ok", resultData);  // status=done, result="ok"
}

DispatchAck(...) is the manual path when you want to inspect the pull before running — ParseOpsPull maps full keys and short aliases (ot/oi/oc/...). The server only queues — execution happens locally as the current user, no elevation, watchdog-enforced timeout.

Windows built-ins only: RunShell uses powershell.exe first, then cmd.exe. No WSL / Git Bash. Override with env OPS_SHELL=ps or cmd. Paths are Windows absolute (C:\...). Rebuild the client after pulling a new header.

Drop-in details, WAIT/SENT/DONE status, compact wire aliases, and per-task notes: Operations — Handoff · full pull fields and engines: Operations — Remote Shell · bilingual handoff doc: sdk/cpp/OPS_HANDOFF.md.

INFO
Pack: C++ Pack · Hardening: Hardening Guide · Anti-tamper: Anti-Tamper · Signing: Response Signing · Operations: Remote Shell

Rebuild after every change.