How hiddify/hiddify-core works
Hiddify Core is a cross-platform proxy engine and service layer built on sing-box. A typical user workflow is to supply a proxy configuration or profile, start the core, and route traffic through its supported protocols; platform apps can also use privileged VPN service support. The repository additionally documents router mode and third-party extensions with custom UI and config hooks. The graph retains these documented capabilities, but several links are dashed because their implementation was not sampled; solid links are limited to relationships visible in excerpts.
Main entry points: service.go Core service · profile_repository.go Profile repository · extension.go Extension API · server.go gRPC web harness
Components 22
Entry and API
- CLI commands
cmd - gRPC web harness
cmd/grpcweb/server.go - Core gRPC API
v2/hcore/grpc_server.go
Profiles and config
- Profile repository
v2/profile/profile_repository.go - Profile parser
v2/profile/profile_parser.go - Config builder
v2/config/builder.go - Local database
v2/db/hiddify_db.go
Proxy runtime
- Core service
v2/hcore/service.go - Core lifecycle
v2/hcore/start.go - sing-box engine
- Router mode
v2/config/router_mode.go
Platform services
- Foreground service command
cmd/cmd_core_service.go - Privileged VPN service
v2/hcore/adminbgservice/admin_bg_service.go - Admin core service
v2/hcore/admin_bgservice.go - Desktop integration
platform/desktop/custom.go - Mobile integration
platform/mobile/mobile.go
Extensions
- Extension API
extension/extension.go - Extension host
extension/extension_host.go - Extension UI
extension/ui/form.go - Extension SDK
extension/sdk/interface.go - Extension browser UI
extension/html/rpc/client.js
Other components
- App user
Connections 24
- App user → CLI commands: runs
- CLI commands → gRPC web harness: launches
- gRPC web harness → Core gRPC API: registers
cmd/grpcweb/server.go - App user → Profile repository: manages profiles
README.md - Profile repository → Local database: reads and writes
v2/profile/profile_repository.go - Profile repository → Profile parser: parses profiles
- Profile repository → Config builder: uses config
- App user → Core gRPC API: controls core
- gRPC web harness → Core service: starts core
cmd/grpcweb/server.go - Core service → Core lifecycle: manages lifecycle
- Core lifecycle → sing-box engine: runs engine
- Config builder → sing-box engine: configures protocols
README.md - Router mode → sing-box engine: enables routing
README.md - Foreground service command → Privileged VPN service: starts service
cmd/cmd_core_service.go - Privileged VPN service → Admin core service: starts full core
v2/hcore/adminbgservice/admin_bg_service.go - Privileged VPN service → Core service: creates service
v2/hcore/adminbgservice/admin_bg_service.go - Desktop integration → Core service: integrates core
README.md - Mobile integration → Core service: integrates core
README.md - App user → Extension browser UI: uses extensions
README.md - Extension browser UI → Extension host: calls extension API
- Extension host → Extension API: hosts extensions
README.md - Extension API → Extension UI: renders custom UI
README.md - Extension API → Extension SDK: exposes SDK
README.md - Extension API → Config builder: modifies configs
README.md