Project Structure
The 2.x SDK separates infrastructure, domain models, native ABI concerns, and
application services. Public imports remain available from v2root while
advanced users can depend on narrower subpackages.
Client API
v2root/client.pyHigh-level configuration, lifecycle, metrics, latency testing, and subscription integration.
v2root/v2root.pyCompatibility facade preserving the familiar
V2ROOTclass.
Core Management
v2root/core/manager.pySecure installation, update, activation, removal, and rollback.
v2root/core/transport.pyInjectable GitHub metadata and binary download transport.
v2root/core/platforms.pyOperating-system and architecture normalization.
Native Boundary
v2root/native.pyStrict ABI declarations, UTF-8 conversion, native memory ownership, JSON decoding, and synchronized calls.
Models and Errors
v2root/models/Separate core, runtime, and testing value objects.
v2root/errors/Typed exceptions plus structured explanations for current failures and legacy numeric errors.
Subscriptions
v2root/subscriptions/entities.pySubscription and configuration domain entities. This distinct name avoids confusion with the public
v2root/models/value-object package.v2root/subscriptions/parser.pyPlain-text, Base64, VMess, URI, IPv6, and deduplication logic.
v2root/subscriptions/transport.pyBounded network fetching with explicit decoding.
v2root/subscriptions/repository.pyAtomic JSON persistence.
v2root/subscriptions/scheduler.pyJoinable background update lifecycle.
v2root/subscriptions/manager.pyApplication service for concurrent updates, filtering, ranking, test result recording, and persistence coordination.
Tests
Tests are separated by subsystem under tests/. Native and network
dependencies are injectable, allowing deterministic unit tests without
shipping a core binary or contacting external services.