import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { IPOrDomain } from "../../common/net/address"; import { PortList } from "../../common/net/port"; import { TypedMessage } from "../../common/serial/typed_message"; import { DomainStrategy, ProxyConfig, StreamConfig } from "../../transport/internet/config"; export declare const protobufPackage = "xray.app.proxyman"; export interface InboundConfig { $type: "xray.app.proxyman.InboundConfig"; } export interface SniffingConfig { $type: "xray.app.proxyman.SniffingConfig"; /** Whether or not to enable content sniffing on an inbound connection. */ enabled: boolean; /** * Override target destination if sniff'ed protocol is in the given list. * Supported values are "http", "tls", "fakedns". */ destinationOverride: string[]; domainsExcluded: string[]; /** * Whether should only try to sniff metadata without waiting for client input. * Can be used to support SMTP like protocol where server send the first * message. */ metadataOnly: boolean; routeOnly: boolean; } export interface ReceiverConfig { $type: "xray.app.proxyman.ReceiverConfig"; /** PortList specifies the ports which the Receiver should listen on. */ portList: PortList | undefined; /** Listen specifies the IP address that the Receiver should listen on. */ listen: IPOrDomain | undefined; streamSettings: StreamConfig | undefined; receiveOriginalDestination: boolean; sniffingSettings: SniffingConfig | undefined; } export interface InboundHandlerConfig { $type: "xray.app.proxyman.InboundHandlerConfig"; tag: string; receiverSettings: TypedMessage | undefined; proxySettings: TypedMessage | undefined; } export interface OutboundConfig { $type: "xray.app.proxyman.OutboundConfig"; } export interface SenderConfig { $type: "xray.app.proxyman.SenderConfig"; /** Send traffic through the given IP. Only IP is allowed. */ via: IPOrDomain | undefined; streamSettings: StreamConfig | undefined; proxySettings: ProxyConfig | undefined; multiplexSettings: MultiplexingConfig | undefined; viaCidr: string; targetStrategy: DomainStrategy; } export interface MultiplexingConfig { $type: "xray.app.proxyman.MultiplexingConfig"; /** Whether or not Mux is enabled. */ enabled: boolean; /** Max number of concurrent connections that one Mux connection can handle. */ concurrency: number; /** Transport XUDP in another Mux. */ xudpConcurrency: number; /** "reject" (default), "allow" or "skip". */ xudpProxyUDP443: string; } export declare const InboundConfig: MessageFns; export declare const SniffingConfig: MessageFns; export declare const ReceiverConfig: MessageFns; export declare const InboundHandlerConfig: MessageFns; export declare const OutboundConfig: MessageFns; export declare const SenderConfig: MessageFns; export declare const MultiplexingConfig: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in Exclude]?: DeepPartial; } : Partial; export interface MessageFns { readonly $type: V; encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {}; //# sourceMappingURL=config.d.ts.map