$ show ViRb3/wgcf
wgcf is an unofficial, cross-platform command-line tool for Cloudflare WARP. It reverse-engineers the official Android client's undocumented API to register WARP accounts, bind license keys, and emit ready-to-use WireGuard profiles. The codebase is organized as a Cobra-based CLI with distinct subcommands (register, update, generate, status, trace), a Viper-backed TOML config layer, a custom OpenAPI-generated API client for api.cloudflareclient.com, and a dedicated WireGuard profile generator. Its most distinctive piece is a uTLS-based HTTP transport that replicates the exact TLS ClientHello of Cloudflare's Android app, allowing the tool to pass server-side fingerprint checks. The OpenAPI specification is actively maintained and version-pinned to WARP build 5641, with generated Go client code that should be regenerated when the spec changes. This is a pure application repository; the only data-like artifacts are the OpenAPI contract and schema models, which serve the client rather than enable research or analytics.
The LLM identified 3 files worth highlighting for reuse:
Core API client that mimics the official Cloudflare Android client's TLS ClientHello via uTLS, including exact cipher suites, extensions, and ordering. It also wires custom headers and content-type normalization into an http.RoundTripper. This demonstrates non-obvious reverse-engineering skill and can be extracted as a pattern for any project needing to impersonate a mobile client or bypass TLS fingerprint-based detection.
Transforms a Cloudflare WARP API device config into a valid WireGuard profile, mapping interface addresses, private key, DNS, peer public key, endpoint, and keepalive settings. It is self-contained enough to be reused as a template-driven config generator for any tunnel configuration payload, and it is covered by unit tests.
Provides curve25519 key pair generation and Base64 encoding for WireGuard keys. The package is small, isolated, and directly reusable in any Go project that needs WireGuard key handling without external dependencies.