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

    Class Config

    Represents the configuration for a Pinggy tunnel. Handles setting up and managing tunnel options and arguments for the native addon.

    Implements

    • Config
    Index

    Constructors

    • Creates a new Config instance and initializes it with the provided options.

      Parameters

      • addon: PinggyNative

        The native addon instance.

      • Optionaloptions: PinggyOptions

        The tunnel configuration options.

      Returns Config

    Methods

    • Gets the current argument string for the tunnel configuration.

      Returns string | null

      The argument string, or null if unavailable.

    • Gets the current force configuration setting.

      Returns boolean | null

      The force setting, or null if unavailable.

    • Gets the forwarding rules configuration. Returns a JSON string containing all forwarding rules configured for this tunnel.

      Returns string | null

      The forwarding rules as a JSON string, or null if unavailable.

      // Returns something like:
      // [{"type":"http","listenAddress":"","address":"http://localhost:3000"}]
    • Gets the current HTTPS-only configuration setting.

      Returns boolean | null

      The HTTPS-only setting, or null if unavailable.

    • Gets the current server address.

      Returns string | null

      The server address, or null if unavailable.

    • Gets the current SNI server name.

      Returns string | null

      The SNI server name, or null if unavailable.

    • Gets the current authentication token.

      Returns string | null

      The authentication token, or null if unavailable.

    • Gets the current SSL configuration for the tunnel.

      Returns boolean | null

      The SSL setting, or null if unavailable.

    • Sets the force configuration for the tunnel. When enabled, forces the tunnel to use specific settings or bypass certain restrictions.

      Parameters

      • force: boolean

        Whether to enable force mode.

      Returns void

    • Sets the server address for the tunnel.

      Parameters

      • Optionaladdress: string = "a.pinggy.io:443"

        The server address.

      Returns void

    • Sets the authentication token for the tunnel.

      Parameters

      • token: string

        The authentication token.

      Returns void

    Properties

    configRef: number

    Reference to the native config object.