Pinggy SDK - v0.1.3
    Preparing search index...

    Class TunnelInstance

    Represents a high-level tunnel instance, managing both configuration and tunnel lifecycle. Provides methods to start, stop, and interact with a Pinggy tunnel.

    Internally uses Config for configuration and Tunnel for tunnel management.

    Index

    Constructors

    Methods

    • Gets the current argument string for the tunnel configuration.

      Delegates to Config#getArgument.

      Returns null | string

      The argument string, or null if unavailable.

    • Gets the current force configuration setting for the tunnel.

      Delegates to Config#getForce.

      Returns null | boolean

      The force setting, or null if unavailable.

    • Gets the current status of the tunnel.

      Returns the status from Tunnel#status.

      Returns "starting" | "live" | "closed"

      The tunnel status.

    • Gets the current authentication token for the tunnel.

      Delegates to Config#getToken.

      Returns null | string

      The authentication token, or null if unavailable.

    • Starts the tunnel and returns the public URLs.

      Delegates to Tunnel#start.

      Returns Promise<string[]>

      Resolves with the list of public tunnel URLs.

      If the tunnel is not initialized or fails to start.

    • Starts web debugging for the tunnel on the specified local port.

      Delegates to Tunnel#startWebDebugging.

      Parameters

      • port: number

        The local port to start web debugging on.

      Returns void

      If the tunnel is not initialized.

    • Requests additional forwarding for the tunnel.

      Delegates to Tunnel#tunnelRequestAdditionalForwarding.

      Parameters

      • hostname: string

        The remote address to forward from.

      • target: string

        The local address to forward to.

      Returns void

      If the tunnel is not initialized.