GRPC client for Xray, providing typed gRPC bindings for Xray-core management APIs. Current stable version is 0.3.1. This package wraps Xray's gRPC services (HandlerService, StatsService, etc.) with TypeScript definitions, enabling programmatic control of Xray proxies, routing, and statistics. It is a lightweight, type-safe alternative to manual protobuf usage or CLI-based config management. The library is actively maintained with a focus on compatibility with Xray-core's gRPC interface. Release cadence is irregular, tied to upstream Xray changes. It differentiates itself by being the only dedicated npm package for Xray gRPC with TypeScript support.
npm install xray-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a gRPC client, constructs an AddInbound request with VMess configuration, and sends it to Xray.
Replace 'import { X } from 'xray-grpc/handler'' with 'import { HandlerServiceClient } from 'xray-grpc''.Use named exports: `import { HandlerServiceClient } from 'xray-grpc'` or import namespace: `import * as xray from 'xray-grpc'`.Remove `protoRoot` from client options. Proto loading is now automatic.
Use `import type { GrpcService } from 'xray-grpc'` for type-only imports.Install the package: `npm install xray-grpc`. Then use correct import: `import { HandlerServiceClient } from 'xray-grpc'`.Use named import: `import { HandlerServiceClient } from 'xray-grpc'`.Ensure Xray server version matches the gRPC definitions. Update Xray or use a compatible xray-grpc version.