How goresense/gorebox works
GoreBox is a Windows WPF proxy/VPN client that manages connection profiles and routing, builds sing-box configuration, then starts the vendored nekobox_core over authenticated local gRPC or falls back to run -c. Its runtime supports proxy/TUN operation, traffic statistics and latency via Clash API, plus profile/rule storage, updates, and DPI-bypass tooling. The README documents the main launch contract and protocol capabilities; source excerpts show selected storage, startup, routing, and DPI behavior, not the full application wiring.
Main entry points: MainViewModel.cs Main UI · CoreService.cs Core lifecycle · box.go sing-box engine · App.xaml.cs App startup
Components 23
Client workflow
- App startup
src/GoreBox/App.xaml.cs - Main UI
src/GoreBox/ViewModels/MainViewModel.cs - Profile import
src/GoreBox/Utils/LinkParser.cs - Config builder
src/GoreBox/Services/SingBoxConfigBuilder.cs
Profiles and settings
- Profile model
src/GoreBox/Models/ProxyProfile.cs - Routing editor
src/GoreBox/ViewModels/RoutingViewModel.cs - Route storage
src/GoreBox/Services/RouteStore.cs - Data location
src/GoreBox/Services/StorageLocation.cs
Proxy runtime
- Core lifecycle
src/GoreBox/Services/CoreService.cs - Core RPC client
src/GoreBox/Services/NekoCoreRpcClient.cs - nekobox entry
core/nekoray/go/cmd/nekobox_core/main.go - gRPC service mode
core/nekoray/go/cmd/nekobox_core/grpc_box.go - sing-box engine
core/sing-box/box.go - Proxy inbounds
core/sing-box/inbound/builder.go - Traffic routing
core/sing-box/route/router.go - Proxy outbounds
core/sing-box/outbound/builder.go - TUN service
core/sing-box/experimental/libbox/tun.go
Diagnostics and operations
- Latency tests
src/GoreBox/Services/LatencyService.cs - Clash API
core/sing-box/experimental/clashapi/server.go - DPI bypass
src/GoreBox/Services/DpiBypassEngine.cs - App updates
src/GoreBox/Services/AppUpdateService.cs
Other components
- User
- Core binary
Connections 26
- User → Main UI: manages connections
README.md - App startup → Data location: initializes data
src/GoreBox/App.xaml.cs - App startup → Main UI: opens window
src/GoreBox/App.xaml.cs - Main UI → Profile import: imports profiles
README.md - Profile import → Profile model: creates profiles
README.md - Main UI → Config builder: builds configuration
README.md - Profile model → Config builder: converts profile
README.md - Main UI → Core lifecycle: starts core
README.md - Config builder → Core lifecycle: supplies JSON
README.md - Core lifecycle → Core RPC client: uses gRPC client
README.md - Core RPC client → gRPC service mode: sends commands
README.md - Core lifecycle → Core binary: launches fallback
README.md - Core binary → nekobox entry: runs nekobox mode
README.md - nekobox entry → gRPC service mode: dispatches mode
- gRPC service mode → sing-box engine: controls engine
- sing-box engine → Proxy inbounds: starts listeners
- sing-box engine → Traffic routing: routes traffic
- Traffic routing → Proxy outbounds: selects egress
- sing-box engine → TUN service: supports TUN
README.md - Main UI → Routing editor: edits routing
- Routing editor → Route storage: loads and saves
src/GoreBox/ViewModels/RoutingViewModel.cs - Main UI → Latency tests: tests profiles
- Latency tests → Core lifecycle: tests core proxy
src/GoreBox/Services/LatencyService.cs - Main UI → Clash API: reads statistics
README.md - Main UI → DPI bypass: configures bypass
- App startup → App updates: cleans old executable
src/GoreBox/App.xaml.cs