import { Int32Range } from './common'; import type { StreamSettingsConfig } from './stream'; /** * SplitHTTP / XHTTP transport configuration. * * @see https://xtls.github.io/en/config/transports/splithttp.html */ export interface SplitHTTPConfig { /** Host header value. */ host?: string; /** HTTP path (default: "/"). */ path?: string; /** Operation mode. */ mode?: SplitHTTPMode; /** Custom HTTP headers. */ headers?: Record; /** Padding bytes range for obfuscation (e.g. "100-1000"). */ xPaddingBytes?: Int32Range; /** Enable obfuscation mode for padding. */ xPaddingObfsMode?: boolean; /** Key for padding obfuscation. */ xPaddingKey?: string; /** Header name for padding. */ xPaddingHeader?: string; /** Placement of padding data. */ xPaddingPlacement?: string; /** HTTP method for padding. */ xPaddingMethod?: string; /** HTTP method for uplink data (default: "POST"). */ uplinkHTTPMethod?: string; /** Session placement strategy. */ sessionPlacement?: string; /** Key for session placement. */ sessionKey?: string; /** Sequence number placement strategy. */ seqPlacement?: string; /** Key for sequence number placement. */ seqKey?: string; /** Uplink data placement strategy. */ uplinkDataPlacement?: string; /** Key for uplink data placement. */ uplinkDataKey?: string; /** Uplink chunk size range (e.g. "10000-50000"). */ uplinkChunkSize?: Int32Range; /** Disable gRPC-style content-type header. */ noGRPCHeader?: boolean; /** Disable SSE content-type header. */ noSSEHeader?: boolean; /** Maximum bytes per POST request (e.g. "1000000-2000000"). */ scMaxEachPostBytes?: Int32Range; /** Minimum interval between POST requests in ms (e.g. "10-50"). */ scMinPostsIntervalMs?: Int32Range; /** Maximum number of buffered POST requests. */ scMaxBufferedPosts?: number; /** Server-side stream-up duration range in seconds (e.g. "10-30"). */ scStreamUpServerSecs?: Int32Range; /** Maximum header bytes for the server to accept. */ serverMaxHeaderBytes?: number; /** Connection multiplexing configuration. */ xmux?: XmuxConfig; /** Download stream settings (for separate download connection). */ downloadSettings?: StreamSettingsConfig; /** Extra settings as raw JSON. */ extra?: Record; } export interface XmuxConfig { /** Maximum concurrent streams per connection (e.g. "8-16"). */ maxConcurrency?: Int32Range; /** Maximum connections (e.g. "1-4"). */ maxConnections?: Int32Range; /** Maximum reuse times per connection (e.g. "32-64"). */ cMaxReuseTimes?: Int32Range; /** Maximum request times per HTTP stream (e.g. "16-32"). */ hMaxRequestTimes?: Int32Range; /** Maximum reusable seconds for HTTP stream (e.g. "300-600"). */ hMaxReusableSecs?: Int32Range; /** Keep-alive period in seconds. */ hKeepAlivePeriod?: number; } export type SplitHTTPMode = 'auto' | 'packet-up' | 'stream-up' | 'stream-one'; //# sourceMappingURL=splithttp.d.ts.map