$ show 2dust/v2rayN
v2rayN is a cross-platform GUI client for managing proxy configurations (V2Ray, Xray, sing-box, etc.). It features dual UI frameworks (WPF for Windows, Avalonia for Linux/macOS) with shared MVVM architecture using ReactiveUI. The application handles server management, subscription processing, routing rules, DNS configuration, system proxy control, and traffic statistics. Core functionality includes generating core-specific configuration files, testing server performance, and integrating with external proxy binaries. The codebase demonstrates strong separation of concerns with distinct layers for models, services, handlers, and viewmodels.
The LLM identified 5 files worth highlighting for reuse:
Provides robust JSON serialization/deserialization with error handling, safe type conversion, and fallback mechanisms. Isolated from internal dependencies, making it reusable in any .NET project requiring reliable JSON processing.
Encapsulates QR code generation and decoding using Qrcoder library. Handles error correction, image encoding, and format conversion. Minimal external dependencies and no tight coupling to internal modules, allowing easy extraction for use in other applications needing QR code functionality.
Collection of string extension methods (IsNullOrEmpty, NullIfEmpty, ToBase64Url, etc.) that simplify common string operations. Lightweight, dependency-free, and follows .NET extension method best practices, making it safe to reuse across projects.
Implements an observable collection optimized for bulk operations (AddRange, RemoveRange) to minimize change notifications. Inherits from ObservableCollection and overrides key methods for performance. Essential for MVVM applications with frequent bulk updates to UI-bound collections.
Simple typed event channel for loose communication between components using publish-subscribe pattern. Avoids magic strings and provides compile-time safety. Zero dependencies beyond core .NET types, enabling reuse in any application requiring decoupled event handling.