interface AutoTLSInit {
    accountPrivateKeyBits?: number;
    accountPrivateKeyName?: string;
    acmeDirectory?: string;
    autoConfirmAddress?: boolean;
    certificateDatastoreKey?: string;
    certificatePrivateKeyBits?: number;
    certificatePrivateKeyName?: string;
    forgeDomain?: string;
    forgeEndpoint?: string;
    provisionDelay?: number;
    provisionRequestTimeout?: number;
    provisionTimeout?: number;
    renewThreshold?: number;
}

Properties

accountPrivateKeyBits?: number

How many bits the RSA private key for the account should be

Default

2048
accountPrivateKeyName?: string

The name the ACME account RSA private key is stored in the keychain with

Default

'auto-tls-acme-account-private-key'
acmeDirectory?: string

Default

'https://acme-v02.api.letsencrypt.org/directory'
autoConfirmAddress?: boolean

Any mapped addresses are added to the observed address list. These addresses require additional verification by the @libp2p/autonat protocol or similar before they are trusted.

To skip this verification and trust them immediately pass true here

Default

false
certificateDatastoreKey?: string

The key the certificate is stored in the datastore under

Default

'/libp2p/auto-tls/certificate'
certificatePrivateKeyBits?: number

How many bits the RSA private key for the certificate should be

Default

2048
certificatePrivateKeyName?: string

The name the certificate RSA private key is stored in the keychain with

Default

'auto-tls-certificate-private-key'
forgeDomain?: string

The top level domain under which we will request certificate for

Default

'libp2p.direct'
forgeEndpoint?: string

Where to send requests to answer an ACME DNS challenge on our behalf - note that /v1/_acme-challenge will be added to the end of the URL

Default

'https://registration.libp2p.direct'
provisionDelay?: number

Certificates are acquired when the self:peer:update event fires, which happens when the node's addresses change. To avoid starting to map ports while multiple addresses are being added, the mapping function is debounced by this number of ms

Default

5000
provisionRequestTimeout?: number

How long asking the forge endpoint to answer a DNS challenge can take before we retry

Default

60_000
provisionTimeout?: number

How long to attempt to acquire a certificate before timing out in ms

Default

120_000
renewThreshold?: number

How long before the expiry of the certificate to renew it in ms, defaults to one day

Default

86_400_000