Interface SessionOptions

Represents options for creating a session.

interface SessionOptions {
    alpnProtocols?: string[];
    alpsProtocols?: string[];
    certCompressionAlgo?: CertCompressionAlgo;
    clientIdentifier?: ClientIdentifier;
    connectionFlow?: number;
    debug?: boolean;
    disableIPV4?: boolean;
    disableIPV6?: boolean;
    forceHttp1?: boolean;
    h2Settings?: H2Settings;
    h2SettingsOrder?: (keyof H2Settings)[];
    headerOrder?: string[];
    headerPriority?: PriorityParam;
    headers?: OutgoingHttpHeaders;
    insecureSkipVerify?: boolean;
    ja3string?: string;
    keyShareCurves?: KeyShareCurves[];
    priorityFrames?: PriorityFrames[];
    proxy?: string;
    pseudoHeaderOrder?: PseudoHeaderOrder[];
    randomTlsExtensionOrder?: boolean;
    sessionId?: string;
    supportedSignatureAlgorithms?: SupportedSignatureAlgorithms[];
    supportedVersions?: SupportedVersions[];
    timeout?: number;
}

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.

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?: string[]

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.

ja3string?: string

The JA3 string for the session.

keyShareCurves?: KeyShareCurves[]

The supported elliptic curves for key exchange.

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.

sessionId?: string

The unique identifier for the session.

supportedSignatureAlgorithms?: SupportedSignatureAlgorithms[]

The supported signature algorithms.

supportedVersions?: SupportedVersions[]

The supported versions of TLS.

timeout?: number

The timeout duration for each request, in milliseconds.