import { createChannel, Channel, ChannelOptions } from 'nice-grpc'; import { HandlerService } from './services'; export class XrayClient { public readonly channel: Channel; public readonly handler: HandlerService; constructor(ip: string, port: string, options?: ChannelOptions) { this.channel = createChannel(`${ip}:${port}`, undefined, { ...options, }); this.handler = new HandlerService(this.channel); return this; } }