How wyx2685/v2bx works
V2bX is a V2Board node server that runs multiple proxy cores and serves several protocol types from one instance. Its principal workflow loads server and node configuration, retrieves node and user data from V2Board, applies limits and certificate handling, then configures a selected core to serve traffic. Periodic node tasks report usage and refresh state. The README also documents automatic TLS renewal, DNS and audit rules, online-IP and connection limits, and dynamic/user speed limits. Wiring beyond the sampled controller and selector is represented only where supported by the tree or README.
Main entry points: controller.go Node controller · server.go Server command · selector.go Core selector · task.go Node tasks
Components 18
Runtime lifecycle
- Server command
cmd/server.go - Configuration
conf/conf.go - Config watching
conf/watch.go - Node manager
node/node.go - Node controller
node/controller.go - Node tasks
node/task.go
Panel integration
- Panel API client
api/panel/panel.go - Node and user data
api/panel/node.go - Protocol configuration
api/panel/node.go
Proxy cores
- Core selector
core/selector.go - Xray core
core/xray - sing-box core
core/sing - Hysteria 2 core
core/hy2
Limits and certificates
- Traffic counters
common/counter - Limit enforcement
limiter/limiter.go - TLS certificates
node/cert.go
Other components
- Operator
- V2Board
Connections 21
- Operator → Server command: starts
- Server command → Configuration: loads
- Server command → Core selector: creates and starts
- Server command → Node manager: starts nodes
- Configuration → Config watching: watches changes
- Config watching → Server command: triggers restart
- Node manager → Node controller: starts controllers
- Node controller → Panel API client: requests data
- Panel API client → V2Board: fetches node and users
- V2Board → Node and user data: returns configuration
- Node controller → Limit enforcement: sets limits
- Node controller → TLS certificates: requests certificates
- Node controller → Core selector: adds node and users
- Core selector → Xray core: dispatches node
- Core selector → sing-box core: dispatches node
- Core selector → Hysteria 2 core: dispatches node
- Node controller → Node tasks: starts periodic tasks
- Node tasks → Panel API client: reports and refreshes
- Node tasks → Traffic counters: collects usage
- Node tasks → Limit enforcement: updates limits
- Node and user data → Protocol configuration: parses protocol settings