Type Alias MockttpHttpsOptions

MockttpHttpsOptions: CAOptions & {
    defaultDomain?: string;
    tlsInterceptOnly?: {
        hostname: string;
    }[];
    tlsPassthrough?: {
        hostname: string;
    }[];
}

Type declaration

  • OptionaldefaultDomain?: string

    The domain name that will be used in the certificate for incoming TLS connections which don't use SNI to request a specific domain.

  • OptionaltlsInterceptOnly?: {
        hostname: string;
    }[]

    A limited list of the only hostnames whose TLS should be intercepted.

    This is the opposite of tlsPassthrough. When set, only connections to these hostnames will be intercepted, and all other TLS connections will be passed through without interception.

    This option is mutually exclusive with tlsPassthrough and setting both options will throw an error.

    Each element in this list must be an object with a 'hostname' field for the hostname that should be matched. Wildcards are supported (following the URLPattern specification), eg. {hostname: '*.example.com'}.

    In future more options may be supported here for additional configuration of this behaviour.

  • OptionaltlsPassthrough?: {
        hostname: string;
    }[]

    A list of hostnames where TLS interception should always be skipped.

    When a TLS connection is started that references a matching hostname in its server name indication (SNI) extension, or which uses a matching hostname in a preceeding CONNECT request to create a tunnel, the connection will be sent raw to the upstream hostname, without handling TLS within Mockttp (i.e. with no TLS interception performed).

    This option is mutually exclusive with tlsInterceptOnly and setting both options will throw an error.

    Each element in this list must be an object with a 'hostname' field for the hostname that should be matched. Wildcards are supported (following the URLPattern specification), eg. {hostname: '*.example.com'}.

    In future more options may be supported here for additional configuration of this behaviour.