How 2dust/v2rayn works
v2rayN is a cross-platform desktop proxy client for managing proxy profiles and running Xray/sing-box and other supported cores. Users add or subscribe to server profiles, configure routing and DNS, select a core, then start proxying and inspect connection or speed-test results. The graph preserves those domain stages and the separate WebAPI management surface visible in the tree. Edges are limited to relationships demonstrated by excerpts, the source index, or README; unsampled feature wiring is not inferred.
Main entry points: CoreManager.cs Core process manager · ProfileItem.cs Server profiles · App.axaml.cs Desktop apps · AppManager.cs App state
Components 25
Desktop experience
- Desktop apps
v2rayN/v2rayN.Desktop/App.axaml.cs - Main window
v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
Profiles and configuration
- App state
v2rayN/ServiceLib/Manager/AppManager.cs - App config
v2rayN/ServiceLib/Models/Configs/Config.cs - Profile management
v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs - Profile config
v2rayN/ServiceLib/Handler/ConfigHandler.cs - Server profiles
v2rayN/ServiceLib/Models/Entities/ProfileItem.cs - Profile persistence
v2rayN/ServiceLib/Manager/AppManager.cs - Subscriptions
v2rayN/ServiceLib/Handler/SubscriptionHandler.cs - Share formats
v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs - Routing and DNS
v2rayN/ServiceLib/Services/CoreConfig
Proxy runtime
- Core config generation
v2rayN/ServiceLib/Handler/CoreConfigHandler.cs - Core context
v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs - Core process manager
v2rayN/ServiceLib/Manager/CoreManager.cs - Proxy core
- System proxy
v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs - Speed tests
v2rayN/ServiceLib/Services/SpeedtestService.cs - Downloads
v2rayN/ServiceLib/Services/DownloadService.cs - HTTP client
v2rayN/ServiceLib/Helper/HttpClientHelper.cs
Web management
- Web API host
v2rayN/v2rayN.WebAPI/Program.cs - Web authentication
v2rayN/v2rayN.WebAPI/Security/WebAuthService.cs - API endpoints
v2rayN/v2rayN.WebAPI/Api/WebApiEndpoints.cs - Web runtime
v2rayN/v2rayN.WebAPI/Services/V2rayRuntime.cs
Other components
- User
- Web client
Connections 25
- User → Desktop apps: launches
v2rayN/v2rayN.Desktop/App.axaml.cs - Desktop apps → App state: initializes
v2rayN/v2rayN.Desktop/App.axaml.cs - Desktop apps → Main window: creates
v2rayN/v2rayN.Desktop/App.axaml.cs - Main window → Profile management: manages profiles
- App state → Profile config: loads config
v2rayN/ServiceLib/Manager/AppManager.cs - App state → Profile persistence: queries profiles
v2rayN/ServiceLib/Manager/AppManager.cs - Profile persistence → Server profiles: stores
v2rayN/ServiceLib/Manager/AppManager.cs - Profile management → Profile config: updates profiles
- Profile config → Server profiles: validates and maps
v2rayN/ServiceLib/Handler/ConfigHandler.cs - Subscriptions → Downloads: fetches subscriptions
- Subscriptions → Share formats: parses content
- Share formats → Server profiles: produces profiles
v2rayN/ServiceLib.Tests/Fmt/ShareUriQueryTests.cs - Routing and DNS → Core config generation: contributes settings
- Core process manager → Core context: builds context
v2rayN/ServiceLib/Manager/CoreManager.cs - Core process manager → Core config generation: requests generation
v2rayN/ServiceLib/Manager/CoreManager.cs - Core config generation → Core context: uses context
- Core process manager → Proxy core: starts and stops
v2rayN/ServiceLib/Manager/CoreManager.cs - Core process manager → System proxy: coordinates proxy
- Speed tests → Core process manager: runs test core
v2rayN/ServiceLib/Services/SpeedtestService.cs - Speed tests → Server profiles: tests profiles
v2rayN/ServiceLib/Services/SpeedtestService.cs - Downloads → HTTP client: creates clients
v2rayN/ServiceLib/Services/DownloadService.cs - Web client → Web API host: sends requests
- Web API host → Web authentication: configures authentication
v2rayN/v2rayN.WebAPI/Program.cs - Web API host → API endpoints: hosts endpoints
v2rayN/v2rayN.WebAPI/Program.cs - API endpoints → Web runtime: dispatches operations