$ show KNG7-P/Se7en-Pro
Se7en Pro is a Windows 10/11 anti-censorship VPN client that aggregates eleven circumvention protocols into one desktop application. In production it runs a Flutter glassmorphic GUI (Se7enFlutter) that talks over authenticated named pipes to a .NET 8 daemon (Se7enCore), which orchestrates child processes for Psiphon, Tor, Xray/sing-box, Aether (MASQUE/WireGuard/WARP), and SHARD (Cloudflare TLS fragmentation over VLESS/Trojan nodes). Chained multi-hop modes (Psiphon-over-WARP, Tor-over-V2Ray, etc.) are first-class features, and a Wintun/tun2socks TUN adapter provides system-managed routing with split tunneling by app, domain, and IP along with a kill switch, system proxy, DNS handling, LAN sharing, and admin elevation. Architecturally the daemon's ConnectionManager selects active engines behind an IConnectionEngine abstraction; LocalSocksEngineBase supplies a shared process-spawn/SOCKS5-probe/auto-restart lifecycle for every engine. The Flutter side is a Riverpod-driven dashboard with live speed/ping telemetry, engine-filtered log viewing, region picking, and a large settings surface. Primary data flows are: UI command → PipeCoreClient → IpcDaemonService JSON dispatch → ConnectionManager → engine process → local SOCKS5/HTTP proxy → system proxy or TUN; status and logs stream back over the same pipe. The daemon persists settings to settings.json, caches Aether edge pools, and fetches SHARD node lists from GitHub. The repo is hybrid in a narrow sense: it bundles curated operational datasets (Akamai/Cloudflare/Fastly IP ranges, Akamai seed IPs, SHARD seed nodes, Tor bridge strings) used at runtime for CDN fronting and edge discovery. These are static resource inputs to the application machinery, not research artifacts or pipeline outputs, so the dominant character is application. Craftsmanship is solid but uneven. The engine abstraction, IPC layer, Authenticode trust checks, DPAPI secret storage, and route-pinning logic are genuinely reusable. However, multi-thousand-line widget files (settings_page.dart ~2200 lines, split_tunnel_section.dart ~1200 lines), incomplete i18n coverage with hardcoded English/Chinese/Russian strings, version drift (UI reports v1.0.4 while the engine UA says 1.1.0), brittle relative resource paths, and bundled third-party binaries with limited update channels create real maintenance friction. Test coverage is thin (a few model/round-trip widget tests).
The LLM identified 7 files worth highlighting for reuse:
Abstract base class shared by all proxy engines. Encapsulates spawning a third-party tunnel binary, probing its SOCKS5 listener until ready, monitoring health, and auto-restarting with exponential backoff and consecutive-failure counters. Any project that wraps a standalone proxy/daemon executable behind a local port (Psiphon, Tor, Xray, sing-box, WARP) can extract this lifecycle pattern with minimal modification.
Authenticode trust verification for bundled third-party executables. Distinguishes valid signatures from unsigned binaries (ENosignature → explicit failure) and tampered files before launch, mitigating supply-chain risk in an app that redistributes Psiphon, Tor, Xray, sing-box, Aether, and lyrebird binaries. A non-obvious security pattern for any desktop app that stages and executes external tools.
DPAPI-based at-rest secret encryption with entropy, Blob marshaling, an XOR fallback when DPAPI is unavailable, and an 'enc:v1:' envelope prefix for format detection. A clean Windows-specific pattern for storing tokens or sensitive settings locally without a keychain, directly reusable in any .NET desktop application.
Scrubs sensitive material (server entries, keys, tokens, connection details) from diagnostic logs before they are written or displayed. Directly reusable in any tool that captures third-party process stdout/stderr and needs to ship or show logs without leaking credentials.
Programmatically constructs Psiphon FrontedMeekDialOverrides JSON from custom IP/SNI/CDN range lists, enabling configurable CDN fronting with custom SNI and multi-transport fallback. Demonstrates a clean builder pattern for generating circumvention engine configs; relevant to any CDN-testing or anti-censorship tool that needs dynamic fronting profiles.
Parses large CIDR and plain-IP range files (Akamai, Cloudflare, Fastly) into structured, deduplicated sets used for CDN scanning and route decisions. The parsing and normalization pattern transfers directly to any network tooling that consumes ISP/CDN prefix lists.
Proxy subscription importer handling vmess://, vless://, trojan://, ss://, hysteria2://, tuic:// URLs, base64-encoded lists, and HTTPS subscription feeds, with explicit rejection of HTTP or HTTP-downgrade redirects. Includes a latency-batching ping pattern (batchSize=4) for node testing. Buried inside a large widget file, but the parsing logic is cleanly separable and highly reusable for other VPN/proxy clients.