-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
V2Root Core is compiled with Go -buildmode=c-shared. The resulting DLL or
shared object embeds Xray-core and exports a flat C ABI.
| Layer | Responsibilities |
|---|---|
| Runtime | Start, stop, and report the state of one embedded Xray instance |
| Configuration | Parse share URIs, validate Xray JSON, and generate share URIs |
| Operations | Latency tests, traffic metrics, logs, geo assets, and metadata |
The library stores runtime state globally. A process can host one active Xray instance. Loading the same binary more than once does not create independent engines.
Use separate operating-system processes when isolated concurrent engines are required.
Parsed configurations create:
- HTTP proxy, default port
10809 - SOCKS proxy, default port
10808
The host application configures its own traffic or system proxy settings to use these endpoints. V2Root Core does not manage TUN or VPN interfaces.
At startup, the library allocates an available loopback port, enables Xray
StatsService, injects API routing, and queries metrics through internal gRPC.
The service binds to 127.0.0.1 and should never be exposed externally.