UNPKG

@remnawave/xtls-sdk

Version:

A Typescript SDK for XRAY (XTLS) Core GRPC Api

20 lines (19 loc) 807 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.XtlsApi = void 0; const nice_grpc_1 = require("nice-grpc"); const handler_service_1 = require("./src/handler/handler.service"); const router_service_1 = require("./src/router/router.service"); const stats_service_1 = require("./src/stats/stats.service"); class XtlsApi { constructor({ connectionUrl, options, credentials }) { this.channel = (0, nice_grpc_1.createChannel)(connectionUrl, credentials, { ...options, }); this.stats = new stats_service_1.StatsService(this.channel); this.handler = new handler_service_1.HandlerService(this.channel); this.router = new router_service_1.RouterService(this.channel); return this; } } exports.XtlsApi = XtlsApi;