Skip to main content

Interface: TLSSocketOptions

Options for creating a TLS client socket.

Properties

alpn?

optional alpn: string[]

ALPN protocol list to negotiate.


ca?

optional ca: string

PEM-encoded CA certificate(s) to trust. Defaults to the embedded Mozilla CA bundle.


cert?

optional cert: string

PEM-encoded client certificate for mutual TLS.


dnsQueryType?

optional dnsQueryType: "ipv4" | "ipv6"


keepAliveDelay?

optional keepAliveDelay: number


key?

optional key: string

PEM-encoded client private key for mutual TLS.


noDelay?

optional noDelay: boolean


sni?

optional sni: string

Server Name Indication hostname. Defaults to remoteAddress.


verifyPeer?

optional verifyPeer: boolean

Whether to verify the peer's certificate. Defaults to true for clients, false for servers.