libp2p
    Preparing search index...

    Interface MapPortOptions

    interface MapPortOptions {
        autoRefresh?: boolean;
        description?: string;
        externalPort?: number;
        protocol?: Protocol;
        refreshThreshold?: number;
        refreshTimeout?: number;
        remoteHost?: string;
        signal?: AbortSignal;
        ttl?: number;
    }

    Hierarchy

    Index

    Properties

    autoRefresh?: boolean

    If true, any mapped ports will be refreshed when their lease expires

    true
    
    description?: string

    If passed this will be used as the default description when mapping ports

    '@achingbrain/nat-port-mapper'
    
    externalPort?: number

    The external port to map. If omitted a free port will be chosen.

    localPort
    
    protocol?: Protocol

    The protocol the port uses

    'TCP'
    
    refreshThreshold?: number

    How long before expiry to remap the port mapping in ms

    60_000
    
    refreshTimeout?: number

    How long to wait while trying to refresh a port mapping in ms

    10_000
    
    remoteHost?: string

    If specified, only packets from this host will be accepted by the gateway.

    An empty string specifies any host.

    ''
    
    signal?: AbortSignal
    ttl?: number

    TTL for port mappings in ms

    3_600_000