Creates a new TunnelInstance with the provided native addon and options.
The tunnel configuration options.
Retrieves Allow-Preflight configuration for this tunnel instance.
The Allow-Preflight sconfig
Gets the current argument string for the tunnel configuration.
Delegates to Config#getArgument.
The argument string, or null if unavailable.
Returns auto-reconnect configuration for this tunnel instance.
The auto-reconnect setting, or null if not configured.
Retrieves the basic authentication values from the instance configuration.
An array of basic auth credentials when configured, or null if none are set.
Returns bearer token authentication values defined in the configuration.
An array of bearer token strings if present; otherwise an empty array.
Returns the current tunnel configuration as a PinggyOptions object.
Extracts values from the instance and parses argument strings for advanced options.
The tunnel configuration, or null if unavailable.
Gets the current force configuration setting for the tunnel.
Delegates to Config#getForce.
The force setting, or null if unavailable.
Get greeting message for the tunnel.
Delegates to Tunnel#getTunnelGreetMessage.
The greeting message.
Returns header modification values defined in the configuration.
An array of header modification objects if present; otherwise null.
Returns whether HTTPS-only mode is enabled for the tunnel instance.
true if HTTPS-only mode is enabled, false if disabled, or null if the configuration is unavailable.
Retrieves IP whitelist for this tunnel instance.
An array of whitelisted IP addresses, or an empty array if no whitelist is configured.
Get the latest usage statistics for the tunnel.
Delegates to Tunnel#getLatestUsage.
The latest usage statistics, or null if unavailable.
Returns local server TLS configuration for this tunnel instance.
The local server TLS setting, or null if not configured.
Returns MaxReconnectAttempts configuration for this tunnel instance.
The MaxReconnectAttempts setting, or null if not configured.
Retrieves No-Reverse-Proxy configuration for this tunnel instance.
The No-Reverse-Proxy setting, or null if not configured.
Retrieves Original-Request-URL configuration for this tunnel instance.
The Original-Request-URL setting, or null if not configured.
Returns reconnect interval configuration for this tunnel instance.
The reconnect interval setting, or null if not configured.
Gets the current server address for the tunnel.
Delegates to Config#getServerAddress.
The server address, or null if unavailable.
Gets the current SNI server name for the tunnel.
Delegates to Config#getSniServerName.
The SNI server name, or null if unavailable.
Gets the current status of the tunnel.
Returns the status from Tunnel#status.
The tunnel status.
Gets the TCP forward-to address for the tunnel.
Delegates to Config#getTcpForwardTo.
The TCP forward-to address, or null if unavailable.
Gets the current authentication token for the tunnel.
Delegates to Config#getToken.
The authentication token, or null if unavailable.
Gets the current SSL setting for the tunnel.
Delegates to Config#getTunnelSsl.
The SSL setting, or null if unavailable.
Gets the current tunnel type for the tunnel.
Delegates to Config#getTunnelType.
The tunnel type, or null if unavailable.
Gets the UDP forward-to address for the tunnel.
Delegates to Config#getUdpForwardTo.
The UDP forward-to address, or null if unavailable.
Gets the current UDP type for the tunnel.
Delegates to Config#getUdpType.
The UDP type, or null if unavailable.
Retrieves usage information from the underlying tunnel instance.
This method delegates to the tunnel's getTunnelUsages() implementation. If the tunnel is not initialized or its reference is missing, an Error is thrown.
The tunnel usages as a string, or null if no usages are available.
Returns WebDebuggerPort configuration for this tunnel instance.
The WebDebuggerPort setting, or null if not configured.
Retrieves X-Forwarded-For configuration for this tunnel instance.
The X-Forwarded-For setting, or null if not configured.
Checks if the tunnel is currently active.
Delegates to Tunnel#tunnelIsActive.
True if the tunnel is active, false otherwise.
Sets a callback function to receive AdditionalForwarding events.
Delegates to Tunnel#setAdditionalForwardingCallback.
The callback function to receive AdditionalForwarding events.
Sets a callback function to receive Authenticated events.
Delegates to Tunnel#setAuthenticatedCallback.
The callback function to receive Authenticated events.
Sets a callback function to receive PrimaryForwarding events.
Delegates to Tunnel#setPrimaryForwardingCallback.
The callback function to receive PrimaryForwarding events.
Sets a callback function to receive disconnected events.
Delegates to Tunnel#setTunnelDisconnectedCallback.
The callback function to receive disconnected events.
Sets a callback function to receive errors.
Delegates to Tunnel#setTunnelErrorCallback.
The callback function to receive errors.
Sets a callback function to receive usage updates.
Delegates to Tunnel#setUsageUpdateCallback.
The callback function to receive usage updates.
Registers a callback function to receive errors from the tunnel worker. It is recommended to always set this callback to ensure your program exits gracefully, since if the tunnel worker exits, the tunnel is no longer active.
The callback function to receive errors.
Starts the tunnel and returns the public URLs.
Delegates to Tunnel#start.
Resolves with the list of public tunnel URLs.
Starts web debugging for the tunnel on the specified local port.
Delegates to Tunnel#startWebDebugging.
The local port to start web debugging on.
Stops the tunnel and cleans up resources.
Delegates to Tunnel#tunnelStop.
Requests additional forwarding for the tunnel.
Delegates to Tunnel#tunnelRequestAdditionalForwarding.
The remote address to forward from.
The local address to forward to.
Gets the list of public URLs for the tunnel.
Delegates to Tunnel#getUrls.
The list of public tunnel URLs.
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.