import { TransportProtocol, SecurityType } from './common'; import { TCPConfig } from './tcp'; import { KCPConfig } from './kcp'; import { WebSocketConfig } from './websocket'; import { HTTPTransportConfig } from './http'; import { GRPCConfig } from './grpc'; import { HTTPUpgradeConfig } from './httpupgrade'; import { SplitHTTPConfig } from './splithttp'; import { HysteriaConfig } from './hysteria'; import { TLSConfig } from './tls'; import { REALITYConfig } from './reality'; import { SocketConfig } from './sockopt'; import { FinalMaskConfig } from './finalmask'; /** * Stream settings (transport layer) for Xray-Core inbound/outbound connections. * * @see https://xtls.github.io/en/config/transport.html#streamsettingsobject */ export interface StreamSettingsConfig { /** Override address for this stream. */ address?: string; /** Override port for this stream. */ port?: number; /** Transport protocol type. */ network?: TransportProtocol; /** Security layer type. */ security?: SecurityType; /** FinalMask configuration for advanced masking. */ finalmask?: FinalMaskConfig; /** TLS settings (when security = "tls"). */ tlsSettings?: TLSConfig; /** REALITY settings (when security = "reality"). */ realitySettings?: REALITYConfig; /** Raw TCP settings (alias for tcpSettings). */ rawSettings?: TCPConfig; /** TCP transport settings (when network = "tcp" or "raw"). */ tcpSettings?: TCPConfig; /** XHTTP/SplitHTTP settings (when network = "xhttp"). */ xhttpSettings?: SplitHTTPConfig; /** SplitHTTP settings (alias, when network = "splithttp"). */ splithttpSettings?: SplitHTTPConfig; /** mKCP settings (when network = "kcp" or "mkcp"). */ kcpSettings?: KCPConfig; /** gRPC settings (when network = "grpc" or "gun"). */ grpcSettings?: GRPCConfig; /** WebSocket settings (when network = "ws" or "websocket"). */ wsSettings?: WebSocketConfig; /** HTTPUpgrade settings (when network = "httpupgrade"). */ httpupgradeSettings?: HTTPUpgradeConfig; /** HTTP/2 settings (when network = "http" or "h2"). */ httpSettings?: HTTPTransportConfig; /** Hysteria2 settings (when network = "hysteria2"). */ hysteriaSettings?: HysteriaConfig; /** Socket options. */ sockopt?: SocketConfig; } /** * Maps transport protocol to its corresponding settings type. * * @example * ```typescript * type WsSettings = TransportSettingsMap['ws']; // WebSocketConfig * ``` */ export interface TransportSettingsMap { tcp: TCPConfig; raw: TCPConfig; kcp: KCPConfig; ws: WebSocketConfig; grpc: GRPCConfig; httpupgrade: HTTPUpgradeConfig; xhttp: SplitHTTPConfig; hysteria: HysteriaConfig; } /** * Maps security type to its corresponding settings type. * * @example * ```typescript * type TlsSettings = SecuritySettingsMap['tls']; // TLSConfig * ``` */ export interface SecuritySettingsMap { none: never; tls: TLSConfig; reality: REALITYConfig; } //# sourceMappingURL=stream.d.ts.map