UNPKG

@localzet/xtls-sdk

Version:

TypeScript SDK for XRAY/AURA Core

18 lines (17 loc) 728 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.XtlsApi = void 0; const nice_grpc_1 = require("nice-grpc"); const stats_service_1 = require("./src/stats/stats.service"); const handler_service_1 = require("./src/handler/handler.service"); const router_service_1 = require("./src/router/router.service"); class XtlsApi { constructor(ip, port) { this.channel = (0, nice_grpc_1.createChannel)(`${ip}:${port}`); 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;