Interface SessionOptions

Represents options for creating a session.

interface SessionOptions {
    alpnProtocols?: string[];
    alpsProtocols?: string[];
    certCompressionAlgo?: CertCompressionAlgo;
    clientIdentifier?: ClientIdentifier;
    connectHeaders?: Record<string, string[]>;
    connectionFlow?: number;
    debug?: boolean;
    disableIPV4?: boolean;
    disableIPV6?: boolean;
    forceHttp1?: boolean;
    h2Settings?: H2Settings;
    h2SettingsOrder?: (keyof H2Settings)[];
    headerOrder?: OutgoingHttpHeaders[];
    headerPriority?: PriorityParam;
    headers?: OutgoingHttpHeaders;
    insecureSkipVerify?: boolean;
    isRotatingProxy?: boolean;
    ja3string?: string;
    keyShareCurves?: KeyShareCurves[];
    localAddress?: string;
    priorityFrames?: PriorityFrames[];
    proxy?: string;
    pseudoHeaderOrder?: PseudoHeaderOrder[];
    randomTlsExtensionOrder?: boolean;
    serverNameOverwrite?: string;
    sessionId?: string;
    streamOutputBlockSize?: number;
    streamOutputEOFSymbol?: string;
    streamOutputPath?: string;
    supportedSignatureAlgorithms?: SupportedSignatureAlgorithms[];
    supportedVersions?: SupportedVersions[];
    timeout?: number;
    transportOptions?: TransportOptions;
}

Properties

alpnProtocols?: string[]

The ALPN protocols.

alpsProtocols?: string[]

The ALPS protocols.

certCompressionAlgo?: CertCompressionAlgo

The certificate compression algorithm.

clientIdentifier?: ClientIdentifier

The client identifier for the session.

connectHeaders?: Record<string, string[]>

The headers for the connect request.

connectionFlow?: number

The connection flow for the session.

debug?: boolean

Whether to enable debugging.

disableIPV4?: boolean

If true, IPv4 is disabled for the session requests.

disableIPV6?: boolean

If true, IPv6 is disabled for the session requests.

forceHttp1?: boolean

Whether to force HTTP/1 protocol.

h2Settings?: H2Settings

The settings for HTTP/2.

h2SettingsOrder?: (keyof H2Settings)[]

The order of HTTP/2 settings.

headerOrder?: OutgoingHttpHeaders[]

The order of headers.

headerPriority?: PriorityParam

The priority of headers.

headers?: OutgoingHttpHeaders

The headers for the session.

insecureSkipVerify?: boolean

Whether to skip SSL certificate verification.

isRotatingProxy?: boolean

Whether the proxy is rotating proxy.

ja3string?: string

The JA3 string for the session.

keyShareCurves?: KeyShareCurves[]

The supported elliptic curves for key exchange.

localAddress?: string

The local address for the session.

priorityFrames?: PriorityFrames[]

The priority frames for HTTP/2 streams.

proxy?: string

The proxy server to use for the session.

pseudoHeaderOrder?: PseudoHeaderOrder[]

The order of pseudo headers.

randomTlsExtensionOrder?: boolean

Whether to randomize TLS extension order.

serverNameOverwrite?: string

The server name to overwrite.

sessionId?: string

The unique identifier for the session.

streamOutputBlockSize?: number

The block size for the stream output.

streamOutputEOFSymbol?: string

The symbol to use for the stream output.

streamOutputPath?: string

The path for the stream output.

supportedSignatureAlgorithms?: SupportedSignatureAlgorithms[]

The supported signature algorithms.

supportedVersions?: SupportedVersions[]

The supported versions of TLS.

timeout?: number

The timeout duration for each request, in milliseconds.

transportOptions?: TransportOptions

The transport options for the session.