import { Channel } from 'nice-grpc'; import { RoutingServiceClient } from '../xray-protos/app/router/command/command'; import { AddSourceIpRuleResponseModel, RemoveRuleByRuleTagResponseModel } from './models'; import { IAddSourceIpRule, IRemoveRuleByRuleTag } from './interfaces'; import { ISdkResponse } from '../common/types/sdk-response'; /** * Service for managing routing rules in XRAY/XTLS * RoutingService is required (enable on XRay Config) to add/remove routing rules. */ export declare class RouterService { private readonly channel; private readonly client; /** * Creates an instance of RouterService * @param channel - The gRPC channel to use for communication */ constructor(channel: Channel); /** * Adds a new routing rule based on source IP address * @param dto - Data transfer object containing rule configuration * @param dto.ruleTag - Unique identifier for the rule * @param dto.outbound - Outbound tag to route matched traffic * @param dto.ip - Source IP address to match * @param dto.append - Whether to append the rule or replace existing rules * @returns Promise resolving to response indicating success or failure */ addSrcIpRule(dto: IAddSourceIpRule): Promise>; /** * Removes a routing rule by its tag * @param dto - Data transfer object containing rule tag * @param dto.ruleTag - Tag of the rule to remove * @returns Promise resolving to response indicating success or failure */ removeRuleByRuleTag(dto: IRemoveRuleByRuleTag): Promise>; /** * Gets the raw gRPC client for direct access to all routing service methods * @returns The underlying RoutingServiceClient instance */ get rawClient(): RoutingServiceClient; } //# sourceMappingURL=router.service.d.ts.map