$ show pCloud/console-client
pCloud Console Client is a native C/C++ desktop sync client for pCloud cloud storage. In production it runs as a background daemon/CLI front-end (main.cpp with Boost.Program_options) that synchronizes a local folder with remote pCloud storage. The core sync engine is compiled into a static library (psynclib.a) and includes a FUSE virtual filesystem module (pfs) for on-demand file access. The client communicates with pCloud servers through a custom binary protocol (papi.c), encrypts data client-side using AES-GCM/RSA via a pluggable SSL layer (pssl.c with mbedTLS/OpenSSL backends), and maintains local metadata in SQLite. It also supports peer-to-peer transfers (pp2p.c) and a Windows shell overlay/COM component for status icons, though the primary target is Linux.
The LLM identified 5 files worth highlighting for reuse:
Custom binary protocol client for the pCloud API. Encapsulates request serialization, response parsing, and socket I/O. The compact request/response framing is reusable as a reference for implementing a binary protocol over TCP/TLS.
Pluggable TLS/crypto abstraction over mbedTLS and OpenSSL. Provides AES-GCM, RSA, X.509 certificate handling, and a cipher definition table. The backend-switch pattern is reusable for any C project needing portable cryptography.
Key-value configuration store for sync parameters such as API endpoints, timeouts, buffer sizes, and crypto settings. Demonstrates a simple persistent settings pattern with typed getters/setters that can be adapted to other daemons.
FUSE filesystem exposing remote pCloud storage as a local mount. Implements path-status checks and sync state queries. The FUSE integration pattern is reusable for building virtual filesystems over any remote backend.
Peer-to-peer transfer module with socket read/write helpers and RSA/AES encrypted data transfer. The socket_read_all/socket_write_all helpers are reusable for robust network I/O in C applications.